Browse Source

Added newline at end if interactive for less bug; changed config

no_compress
Raphael Roberts 7 years ago
parent
commit
e20e91fbcf
  1. 1
      .gitignore
  2. 8
      main.py
  3. 2
      print2d.py

1
.gitignore

@ -1,5 +1,6 @@
/release
/cta_api_key
/ctabus
/output
/test.py
__pycache__

8
main.py

@ -80,8 +80,11 @@ def gen_list(objs,data,*displays,key = None,sort = 0,num_pic = True):
pass
return ret
config = '''{delta} ({t}) stop {stop_id}
{route} - {end} ({direction})'''
config = '''\
{route} - {end} ({direction})
{nm}, stop {stop_id}
{delta} ({t})\
'''
if __name__ == "__main__":
parser = argparse.ArgumentParser(prog = 'ctabus')
parser.add_argument('arg',nargs = '+',metavar = '(stop-id | cross streets)')
@ -118,6 +121,7 @@ if __name__ == "__main__":
route = time['rt']
direction = time['rtdir']
end = time['des']
nm = time['stpnm']
print(
config.format(**globals()),end= '\n'*2
)

2
print2d.py

@ -36,6 +36,8 @@ def print2d(l,datetime_format = "%A, %B %e, %Y %H:%M:%S",seperator= ' | ',spacer
if bottom:
final = '\n'.join((bottom,final,bottom))
if interactive:
if not bottom:
final += '\n'
pager(final)
else:
return final
Loading…
Cancel
Save