From 79d0fa7168ed80000637470f10b3da79ebe6069c Mon Sep 17 00:00:00 2001 From: khamidou Date: Sat, 30 Jan 2010 20:06:02 +0100 Subject: [PATCH] added help --- liszt | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/liszt b/liszt index 3a4f09e..d0f620e 100755 --- a/liszt +++ b/liszt @@ -62,9 +62,24 @@ class LisztSession: for entry in entries["contents"]: print entry["title"] + "\t" + entry["date"] + def remove_list(self, listname): + try: + urllib2.urlopen(base + "/remove/" + quote(listname) + "/") + except HTTPError: + bailout("Unable to remove the list " + listname) + def remove_list_entry(self, listname, index): + try: + urllib2.urlopen(base + "/remove/" + quote(listname) + "/" + quote(index) + "/") + except HTTPError: + bailout("Unable to create the list " + listname) + def help(): - print "liszt create" + print "liszt c|create listname ?entryname? " + print "liszt r[remove|d|delete listname ?entryindex?" + print "liszt s listname ?entryindex?" + print "liszt chk|check listname index" + print "liszt m|mod|modify listname index ?'new description'? ?'check'? ?'date'?" def parse_create(args): pass @@ -90,8 +105,8 @@ if __name__ == "__main__": session.login("s", "s") session.show_list("travail") -# if sys.argv[1] in dispatch: -# dispatch[sys.argv[1]](sys.argv[2:]) -# else: -# # Assume the user just wants to see a list -# parse_show(sys.argv[2:]) + if sys.argv[1] in dispatch: + dispatch[sys.argv[1]](sys.argv[2:]) + else: + # Assume the user just wants to see a list + parse_show(sys.argv[2:]) -- 2.43.0