Esempio n. 1
0
 def parser_p_remove(self):
     parser = YokadiOptionParser()
     parser.set_usage("p_remove [options] <project_name>")
     parser.set_description("Remove a project and all its associated tasks.")
     parser.add_option("-f", dest="force", default=False, action="store_true",
                       help="Skip confirmation prompt")
     return parser
Esempio n. 2
0
 def parser_t_remove(self):
     parser = YokadiOptionParser()
     parser.set_usage("t_remove [options] <id>")
     parser.set_description("Delete a task.")
     parser.add_option("-f", dest="force", default=False, action="store_true",
                       help="Skip confirmation prompt")
     return parser
Esempio n. 3
0
 def parser_c_get(self):
     parser = YokadiOptionParser()
     parser.set_usage("c_get [options] [<key>]")
     parser.set_description("Display the value of a configuration key. If no key is given, all keys are shown.")
     parser.add_option("-s", dest="system", default=False, action="store_true",
                       help="Display value of system keys instead of user ones")
     return parser
Esempio n. 4
0
 def parser_t_purge(self):
     parser = YokadiOptionParser()
     parser.set_usage("t_purge [options]")
     parser.set_description("Remove old done tasks from all projects.")
     parser.add_option("-f", "--force", dest="force", default=False, action="store_true",
                       help="Skip confirmation prompt")
     delay = int(Config.byName("PURGE_DELAY").value)
     parser.add_option("-d", "--delay", dest="delay", default=delay,
                       type="int", help="Delay (in days) after which done tasks are destroyed. Default is %d." % delay)
     return parser
Esempio n. 5
0
 def parser_t_show(self):
     parser = YokadiOptionParser()
     parser.set_usage("t_show [options] <id>")
     parser.set_description("Display details of a task.")
     choices = ["all", "summary", "description"]
     parser.add_option("--output", dest="output", type="choice",
                       choices=choices,
                       default="all",
                       help="<output> can be one of %s. If not set, it defaults to all." % ", ".join(choices),
                       metavar="<output>")
     return parser
Esempio n. 6
0
    def parser_t_list(self):
        parser = YokadiOptionParser()
        parser.set_usage("t_list [options] <project_or_keyword_filter>")
        parser.set_description(
            "List tasks filtered by project and/or keywords. "
            "'%' can be used as a wildcard in the project name: "
            "to list projects starting with 'foo', use 'foo%'. "
            "Keyword filtering is achieved with '@'. Ex.: "
            "t_list @home, t_list @_bug=2394")

        parser.add_option("-a", "--all", dest="all",
                          default=False, action="store_true",
                          help="all tasks (done and to be done)")

        rangeList = ["today", "thisweek", "thismonth", "all"]
        parser.add_option("-d", "--done", dest="done",
                          help="only done tasks. <range> must be one of %s" % ", ".join(rangeList),
                          metavar="<range>")

        parser.add_option("-u", "--top-urgent", dest="topUrgent",
                          default=False, action="store_true",
                          help="top 5 urgent tasks of each project based on urgency")

        parser.add_option("-t", "--top-due", dest="topDue",
                          default=False, action="store_true",
                          help="top 5 urgent tasks of each project based on due date")

        parser.add_option("--overdue", dest="overdue",
                          default=False, action="store_true",
                          help="all overdue tasks")

        parser.add_option("-k", "--keyword", dest="keyword",
                          help="Group tasks by given keyword instead of project. The % wildcard can be used.",
                          metavar="<keyword>")

        parser.add_option("-s", "--search", dest="search",
                          action="append",
                          help="only list tasks which title or description match <value>. You can repeat this option to search on multiple words.",
                          metavar="<value>")

        formatList = ["auto"] + gRendererClassDict.keys()
        parser.add_option("-f", "--format", dest="format",
                          type="choice", default="auto", choices=formatList,
                          help="how should the task list be formated. <format> can be %s" % ", ".join(formatList),
                          metavar="<format>")
        parser.add_option("-o", "--output", dest="output",
                          help="Output task list to <file>",
                          metavar="<file>")
        return parser