From 23c1f3bd5d2e41c7fe9ccd431a85793668923200 Mon Sep 17 00:00:00 2001 From: endorphant Date: Fri, 29 Apr 2016 23:17:06 -0400 Subject: [PATCH] starting user interface --- bin/config/banner.txt | 5 +++++ bin/ttbp.py | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 bin/config/banner.txt create mode 100644 bin/ttbp.py diff --git a/bin/config/banner.txt b/bin/config/banner.txt new file mode 100644 index 0000000..3e201fb --- /dev/null +++ b/bin/config/banner.txt @@ -0,0 +1,5 @@ +============== +| TILDE TOWN | +| BLOGGING | +| PLATFORM | +============== diff --git a/bin/ttbp.py b/bin/ttbp.py new file mode 100644 index 0000000..05304a7 --- /dev/null +++ b/bin/ttbp.py @@ -0,0 +1,33 @@ +#!/usr/bin/python + +import core + +import os + +WWW = os.path.join("..","www") +CONFIG = os.path.join("config") +DATA = os.path.join("..", "data") + +BANNER = open(os.path.join(CONFIG, "banner.txt")).read() +CLOSER = "\n\tsee you later, space cowboy..." + +def start(): + print(BANNER) + print("\n\n\n\n") + try: + print(main_menu()) + except ValueError or SyntaxError: + print("oh no i didn't understand that") + print(main_menu()) + except KeyboardInterrupt: + print("eject button fired") + print(main_menu()) + print(CLOSER) + +def main_menu(): + + print("how are you feeling today? ") + + input() + + return main_menu()