From e20e91fbcf849c80f98823a0be95ca56bd101724 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Wed, 26 Sep 2018 01:26:22 -0500 Subject: [PATCH] Added newline at end if interactive for less bug; changed config --- .gitignore | 1 + main.py | 8 ++++++-- print2d.py | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b572212..647df45 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /release /cta_api_key +/ctabus /output /test.py __pycache__ diff --git a/main.py b/main.py index 6b6f616..8793657 100644 --- a/main.py +++ b/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 ) diff --git a/print2d.py b/print2d.py index bf3326a..39a545b 100644 --- a/print2d.py +++ b/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 \ No newline at end of file