summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/main.py b/main.py
index 7427961d..e30e229e 100644
--- a/main.py
+++ b/main.py
@@ -9,16 +9,18 @@ def hello (str):
def goodbye (str):
print "Goodbye:", str
-register_option ("hello", "h:", hello)
-register_option ("goodbye", "g:", goodbye)
+add_config_option_handlers ()
+add_option_handler ("hello", ":", hello)
+add_option_handler ("goodbye", ":", goodbye)
+
args = process_arguments (sys.argv[1:])
-process_environment (os.environ, "TEST_")
+process_environment (os.environ, "LEDGER_")
-parser = TextualParser ()
-register_parser (parser)
+text_parser = TextualParser ()
+register_parser (text_parser)
journal = Journal ()
-parse_journal_file (args[0], journal)
+print parse_journal_file (args[0], journal), "entries"
class FormatTransaction (TransactionHandler):
def __init__ (self, fmt):