Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export with template #9

Open
duckinator opened this issue Sep 25, 2024 · 1 comment
Open

Export with template #9

duckinator opened this issue Sep 25, 2024 · 1 comment

Comments

@duckinator
Copy link
Owner

Given:

  • A series of tasks, with tags (blocked by Task tags #8)
  • A per-tag template
  • A per-tag file path template

I want to be able to click "Export" and get all of the current information saved to a file.

An example template might be:

Ellen Dash: {{ time }} {{ task }}
{{ notes }}

And an example file path template might be:

/home/puppy/work/{{ tag }}/%y-%m-update.txt

If you have tasks with tags "Foo" and "Bar", this means if I exported things today I'd get:

  • /home/puppy/work/Foo/2024-09-update.txt containing all things tagged Foo
  • /home/puppy/work/Bar/2024-09-update.txt containing all things tagged Bar
@duckinator
Copy link
Owner Author

brain dump:

and notably, the way i'm thinking of making STAYFOCUSED work is:

  • each task can have tags assigned to it
  • each tag can be assigned a template file
  • you can perform an export-to-file of everything associate with that template file

and the export-to-file would apply the template to each task with that tag, ensure there's a blank line between each one, and save it to a specified file

so you could have e.g. a 'Fractal' tag with this template:

{{ elapsed_time }} {{ description }}
{{ notes }}

and the result might look something like:

3h Some example task
Some notes about "Some example task"

2.25h Another task
Notes about "another task"

and maybe an "export time log" option that just uses a template of {{ elapsed_time }} {{ description }}, so with those same tasks you'd get:

3h Some example tasks
2.25h Another task

if whatever templating thing i use has filters, i'll probably ensure there's one for padding strings with spaces to a certain length, so you could e.g. make sure elapsed_time is always formatted with enough spaces to fill 6 characters (enough to fit up to 99.99h -- if you need more than that on one task you should probably break the task up, and you just don't need more than two decimal places of precision, and i'd argue you only need that for .25 and .75).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant