524c5b287258

Remove unnecessary options.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 11 Sep 2009 17:33:16 -0400
parents 00b05aa13b79
children 3f5f4296e040
branches/tags (none)
files t.py

Changes

--- a/t.py	Fri Sep 11 17:29:43 2009 -0400
+++ b/t.py	Fri Sep 11 17:33:16 2009 -0400
@@ -158,10 +158,6 @@
         for task in tasks.values():
             print ('%-' + str(plen) + 's - %s') % (task[label], task['text'])
     
-    def delete_finished(self):
-        """Remove all finished tasks."""
-        self.done = {}
-    
     def write(self):
         """Flush the finished and unfinished tasks to the files on disk."""
         filemap = (('tasks', self.name), ('done', '.%s.done' % self.name))
@@ -183,10 +179,6 @@
     """Return a parser for the command-line interface."""
     parser = OptionParser()
     
-    parser.add_option("-a", "--add",
-                      action="store_true", dest="add", default=True,
-                      help="add the text as a task (default)")
-    
     parser.add_option("-e", "--edit", dest="edit", default="",
                       help="edit TASK", metavar="TASK")
     
@@ -199,10 +191,6 @@
     parser.add_option("-t", "--task-dir", dest="taskdir", default="",
                       help="work in DIR", metavar="DIR")
     
-    parser.add_option("-D", "--delete-finished", dest="delete_finished",
-                      action="store_true", default=False,
-                      help="delete finished items to save space")
-    
     parser.add_option("-v", "--verbose",
                       action="store_true", dest="verbose", default=False,
                       help="print more detailed output (full task ids, etc)")
@@ -219,9 +207,6 @@
         if options.finish:
             td.finish_task(options.finish)
             td.write()
-        elif options.delete_finished:
-            td.delete_finished()
-            td.write()
         elif options.edit:
             td.edit_task(options.edit, text)
             td.write()