allow adjusting moon size
parent
7e36e07996
commit
809e9ed87c
|
@ -26,7 +26,7 @@ def to_timestr(t, date=False, local=True):
|
||||||
return t.strftime('%Y-%m-%d %H:%M:%S')
|
return t.strftime('%Y-%m-%d %H:%M:%S')
|
||||||
return t.strftime('%H:%M:%S')
|
return t.strftime('%H:%M:%S')
|
||||||
|
|
||||||
def fmt(cols, t, az, el, phase, illum, moonrise, transit, moonset, hemi):
|
def fmt(cols, t, az, el, phase, illum, moonrise, transit, moonset, moonlines, hemi):
|
||||||
"""Formats data into string to print"""
|
"""Formats data into string to print"""
|
||||||
_date = t.utc_datetime().astimezone().strftime('%Y-%m-%d %H:%M:%S') # 18 chars
|
_date = t.utc_datetime().astimezone().strftime('%Y-%m-%d %H:%M:%S') # 18 chars
|
||||||
_azel = f"Az:{az.degrees:.0f}° El:{el.degrees:.0f}°".ljust(16) # 16 chars
|
_azel = f"Az:{az.degrees:.0f}° El:{el.degrees:.0f}°".ljust(16) # 16 chars
|
||||||
|
@ -34,8 +34,7 @@ def fmt(cols, t, az, el, phase, illum, moonrise, transit, moonset, hemi):
|
||||||
_r = f"R:{to_timestr(moonrise)}" # 10 chars
|
_r = f"R:{to_timestr(moonrise)}" # 10 chars
|
||||||
_t = f"T:{to_timestr(transit)}" # 10 chars
|
_t = f"T:{to_timestr(transit)}" # 10 chars
|
||||||
_s = f"S:{to_timestr(moonset)}" # 10 chars
|
_s = f"S:{to_timestr(moonset)}" # 10 chars
|
||||||
# TODO: 21 needs to scale
|
_moon = putmoon(phase.degrees/360, moonlines, hemi) # ! scalable width
|
||||||
_moon = putmoon(phase.degrees/360, 21, hemi) # ! scalable width
|
|
||||||
|
|
||||||
# 2 groups of spacing, filling cols minus total RTS width
|
# 2 groups of spacing, filling cols minus total RTS width
|
||||||
_rts_spacing = ' '*int((cols-30)/2)
|
_rts_spacing = ' '*int((cols-30)/2)
|
||||||
|
@ -108,7 +107,7 @@ def main():
|
||||||
|
|
||||||
#print(phase.degrees/360*100)
|
#print(phase.degrees/360*100)
|
||||||
#print(putmoon(phase.degrees/360, 21, 'north' if args.lat > 0 else 'south'))
|
#print(putmoon(phase.degrees/360, 21, 'north' if args.lat > 0 else 'south'))
|
||||||
print(fmt(args.columns, t, az, el, phase, illum, moonrise, transit, moonset, hemi))
|
print(fmt(args.columns, t, az, el, phase, illum, moonrise, transit, moonset, args.lines - 4,hemi))
|
||||||
#print(putmoon(phase.degrees/360, 21, '@', hemi))
|
#print(putmoon(phase.degrees/360, 21, '@', hemi))
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue