Commit Graph

7 Commits

Author SHA1 Message Date
riley 9686e43ec2 Documentation and formatting fixes 2021-09-28 01:36:12 -04:00
riley 134d71f44d Add --file argument & fixes
cli.py:
+ added --file argument to specify the todo file.
~ changed the --task handler to use get_task instead.
~ fixed bug w/ printing information on tasks w/ no due date.
TodoObject.py:
~ modified type-hinting on get_tasks.
~ modified type-hinting on get_task.
~ fixed bug with get_task returning type Task rather than found task.
~ fixed bug with get_note not listening to the immediate parameter.
2021-09-28 00:54:49 -04:00
riley ed0cb5ebc6 Refactor for CLI
General:
+ Improved documentation
cli.py:
+ added basic CLI, will likely be rewritten later.
TodoObject:
~ improved type-hinting for get_children
+ added get_parents method
+ moved get_md method from Todo
+ added get_* methods to get Tasks, Categories, and Notes from children
+ added property has_children
Todo:
~ changed string output to "File: {self.data_file.name}"
- moved get_md method to TodoObject
+ added write_data method
Task:
- removed get_* methods
+ added task_category method to get parent category.
+ added toggle_complete method.
- removed __add__ method.
Note:
- removed get_* methods.
- removed __add__ method.
Category:
- removed get_* methods.
- removed __add__ method.
2021-09-28 00:20:20 -04:00
riley ada7812e3b Parent/Child assignment & fetching refactor
- TodoObject.get_children accepts an obj_type to filter by
- Todo._get_parent accepts an obj_type to filter potential parents
- Todo._parse_category now properly assigns parent categories
- Reworked get_* methods in Task, Category, and Note to use get_children
2021-09-25 23:26:16 -04:00
riley e768dae978 Add \t support to parsing. 2021-09-25 20:16:08 -04:00
riley a696392560 Fix get_md() and parent assignments.
- now properly outputs category spacing in get_md()
  - removed task_spacing and note_spacing, may return later.
- fixed parent assignment, now iterates through the reversed children
  list.
  - this finds the closest parent.
- TodoObject now properly returns output with get_children()
2021-09-25 19:47:55 -04:00
riley e917bea322 Initial Commit 2021-09-25 17:39:27 -04:00