diff --git a/README.md b/README.md index 1f7c357..8611e8f 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,30 @@ # things-3-report -A small script to generate bulleted reports from my Things 3 tasks +A small program written in rust that digests my Things tasks into a format for Slack reporting. -## Usage -The environment should be provided by `nix-shell`. Alternatively you can install the requirements directly with -```bash -$ pip install -r requirements.txt -``` -To run the script, pass in the tag or list of tags to filter on. Projects and Tasks lacking one of the specified tags will be excluded from the generated report. I have a `Report` tag which I use for this. If a project is tagged with the tag, all tasks are considered tagged even if not explicitly done so. +Tasks are pulled out of Things using AppleScript over a JavaScript OSA Bridge. Tasks are then filtered +and formatted based on the selected format schema. -### Specific functionality -I have also included a few pieces of additional functionality: -- The project is headed with a set of 3 randomly selected emojis from `emojis.txt` -- If you have a person's name in the task or project title, you can add an `@` tag to the task or project and the script will automatically replace the vowels in their name with unicode that looks similar. This allows you to post the list on slack without generating mentions. -- Adding a code block that begins with `report` will cause the script to dump the contents into the end of the generated message. This can be used to add notes to the generated output. -- Be default the script draws from today's current list of tasks. If you specify `--signoff` it will instead draw on completed tasks from your logbook. (This is useful for an end of the day message). +## Basic Task format +A task is returned as a markdown list element containing its title and optionally a list of information parsed from +related tag sections in the notes portion of the task. -## Example Usage: -Given a set of tasks tagged `Report` -```txt -Project named "Some Project" tagged as Report: - containing two tasks (not necessarily tagged) "Task 1" and "Task 2" +Tag specific additional bullets are included using a triple backtick (like GitHub code block markdown). Then instead of +specifying the coding style as you would (for example `typescript`) you specify the relevant tag: `MyTag`. Running the +program with a given `--tags` argument will cause related tag blocks to be included as sub-bullets. -A top level task called some task with a notes filed containing -```report -(#9999)[https://example.com] -`` ` <-- No space there but it's hard to escape these ticks -``` +## Name Sanitization +Name tags found on projects and tasks are automatically sanitized by replacing vowel characters with lookalikes. This +behavior can be disabled with the `--no-sanitize` argument. -``` -$ python dump.py Report -``` -will generate: +## Project Formatting +Projects make up a bullet level above tasks. Any tasks in the project will be nested under the project title following +and project specific matched tag block comments in the project notes. -```txt -:emoji: :emoji: :emoji: - - Some Project - - Task 1 - - Task 2 - - Some Task (#9999)(https://example.com) -``` +## Area Formatting +Areas collect up projects, but instead of indenting them further, Area's are returned as section titles above the +generated output. If only one area contains all of the reported tasks, then the area name is omitted entirely. + +## Cycle Message Formatting +The `--mode cycle` argument will output slightly different content. All tasks are collected at a project level, and +only the project name is given. Cycle messages look back in time at the last 6 weeks and therefore have too many values +to meaningfully output at full resolution.