|
|
@ -348,15 +348,15 @@ def find_project_by_id(project_data, target_id): # {{{ |
|
|
|
# }}} |
|
|
|
|
|
|
|
|
|
|
|
def show(parent_id, flat=False, filter_all=[], filter_any=[], color="grey"): # {{{ |
|
|
|
def show(parent_id, flat=False, filter_all=None, filter_any=None, color="grey"): # {{{ |
|
|
|
root_data = load_from_storage("root") |
|
|
|
project_data = find_project_by_id(root_data, parent_id) |
|
|
|
project_data = simplify_project(project_data) |
|
|
|
if flat: |
|
|
|
project_data = flatten_project(project_data) |
|
|
|
if filter_all is not []: |
|
|
|
if filter_all is not None: |
|
|
|
pass |
|
|
|
if filter_any is not []: |
|
|
|
if filter_any is not None: |
|
|
|
project_data = filter_project_any(project_data, filter_any) |
|
|
|
project_data = strip(project_data, r"<a href=\".*\">.*</a>") |
|
|
|
project_data = strip(project_data, r"<time .*</time>") |
|
|
@ -386,17 +386,17 @@ def main(): # {{{ |
|
|
|
|
|
|
|
subparsers = parser.add_subparsers(dest="command", required=True) |
|
|
|
|
|
|
|
dump_parser = subparsers.add_parser("dump", help="Dump storage") |
|
|
|
subparsers.add_parser("dump", help="Dump storage") |
|
|
|
|
|
|
|
inbox_parser = subparsers.add_parser("inbox", help="Inbox commands") |
|
|
|
inbox_parser.add_argument("name", help="Item text", nargs="*") |
|
|
|
|
|
|
|
vis_parser = subparsers.add_parser("vis", help="Visualisations") |
|
|
|
active_parser = subparsers.add_parser("active", help="Active projects") |
|
|
|
hold_parser = subparsers.add_parser("hold", help="Hold projects") |
|
|
|
sprint_parser = subparsers.add_parser("sprint", help="Sprint goals") |
|
|
|
today_parser = subparsers.add_parser("today", help="Today's tasks") |
|
|
|
habits_parser = subparsers.add_parser("habits", help="Habits") |
|
|
|
subparsers.add_parser("vis", help="Visualisations") |
|
|
|
subparsers.add_parser("active", help="Active projects") |
|
|
|
subparsers.add_parser("hold", help="Hold projects") |
|
|
|
subparsers.add_parser("sprint", help="Sprint goals") |
|
|
|
subparsers.add_parser("today", help="Today's tasks") |
|
|
|
subparsers.add_parser("habits", help="Habits") |
|
|
|
|
|
|
|
args = parser.parse_args() |
|
|
|
|
|
|
|