Pits help

Basic report of original Pit help. Need review
This commit is contained in:
2018-07-21 15:26:23 +02:00
parent dbe6b77e31
commit 438eb2c677
2 changed files with 243 additions and 5 deletions

View File

@@ -11,6 +11,7 @@ import project
import action
import task
import note
import phelp
# logging.basicConfig(level=logging.ERROR, format='%(levelname)7s :: %(message)s')
# logging.basicConfig(level=logging.DEBUG, format='%(asctime)s :: %(levelname)s :: %(message)s')
@@ -90,6 +91,8 @@ def init():
action_msg = 'Initialized pits database - DB Schema version: {}'.format(SCHEMA_VERSION)
conn.execute(action_query, (getpass.getuser(), 'init', action_msg,))
print('Created database ' + db_path)
# logging.info('Inserting initial data')
# conn.executescript("""
# insert into project values(1, 'me', 'test', 'in progress', 'now', 'now')""")
@@ -114,10 +117,6 @@ def count_object(conn, table_name):
def version(*_):
print('pit version 0.1.0')
def pit_help(args, *_):
print('TODO help')
# TODO help
def main():
cmd_handler = [
('project', project.handle_project),
@@ -125,7 +124,7 @@ def main():
('note', note.handle_note),
('log', action.handle_action),
('info', info),
('help', pit_help),
('help', phelp.handle_help),
('version', version),
('init', init)
]