by emerongi · 4y ago · 0 comments
For me, managing tasks in text files is the hard part. Recently I added snippets to VSCode to easily tag my tasks and set due dates (the snippets just add searchable identifiers at the end of the line). Greping these identifiers is easy, however for due dates I will need a quick script to pick up all the tasks and order them. Shouldn't be too hard and can even be in a Gitlab CI pipeline to automatically re-order the list on every push.
Re-reading my comment, it reminds me of the legendary "Dropbox is just FTP" comment :D.
I've been exploring various alternatives recently, and what I really miss with simple text files are features like attachments and inline images. Even color adds a lot of utility. Right now I'm looking at Zim which is a wiki that stores content as text files but offers a bit more structure and functionality. It's not as full featured as I'd like in the fonts/colors department, but it checks a lot of boxes (including having todo lists and actual check boxes). Spellcheck is another problem since it doesn't include one natively and the plug-in a huge pain to install and get working.
Maybe you can re-use the script I shared in this comment [0] to query the GitLab REST API to generate an index. I'm a fan of using the API programmatically, and tend to avoid git checkout/grep/etc. inside CI/CD pipelines (works too, everyone is free to choose their way).
Yet again, I love API challenges, so I've created a new script which parses a defined markdown footer for Tags and Due date, and generates an ordered index by due date. I did not know which format you are using, so I made up my own, see the MR description [1] and docs [2].
The script lives in [3] and is a mix of fetching files, parsing content with regex, and generating the index + creating a commit to upload automatically.
A demo overview is shown in [4] with the generated index.md, ordered by due date and linking the files by parsed heading title, file paths, and tags.
Hope it helps, feel free to repurpose, or ping me for questions on the GitLab community forum [5]. My Python code is a little rusty, I am slowly adopting all the 3.x design patterns after many years with 2.x.
I might follow your idea with notes and custom footer parsing. That's a really nifty idea, and helps solve my own chaos :-)
[0] https://news.ycombinator.com/item?id=32155848
[1] https://gitlab.com/dnsmichi/api-playground/-/merge_requests/...
[2] https://gitlab.com/dnsmichi/api-playground/-/tree/main/pytho...
[3] https://gitlab.com/dnsmichi/api-playground/-/tree/main/pytho...
[4] https://gitlab.com/dnsmichi/api-playground/-/tree/main/demo/...