I wrote a pretty basic script a long time ago that converts TaskPaper files to Markdown for nice previewing/publishing. I recently updated it with a bunch of modernizations.
I originally wrote this script (*goes to check*) — jebus, fifteen years ago. I guess I’ve been doing this stuff for a while now. Anyway, the original gist had require statements and processor flags that weren’t valid anymore, so I decided to fix that.
While I was in there, I added a few tweaks:
Use GFM-style - [ ] markers
Fix block quote indentation
convert @tags to #tags
bare URLs
Accept input piped on STDIN
The - [ ] markers mean that when rendered on GitHub (or in Marked with the right settings), the tasks will show up with checkboxes (checked if the line contains @done).
The ability to accept input on STDIN means you can include the script in a pipeline without having to read/write files. Not something I need to do often, but seemed like an obvious improvement.
The script is a bit kludgy — I added to it but didn’t bother rewriting it, so it
reflects my Ruby skills 15 years ago. Maybe if I get bored on some
downtime, I’ll take another stab at it, but it works, so I’m not
inclined to put time into that right now. If you feel like rewriting it more
elegantly, I’ll gladly publish your changes 😊.
The other updates are just niceties. Let me know if you have suggestions/questions, either in the Gist comments or on the forum!