- Python 100%
| src/MarkdownTodoPrint | ||
| tests | ||
| .gitignore | ||
| .python-version | ||
| main.py | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
MarkdownTodoPrint
Introduction
MarkdownTodoPrint can run regularly in a directory, where it will recursively find any Markdown files (identified by the .md extension) and parse them for tasks.
It will create beautiful little receipts for every task it finds, which it can send to a receipt printer.
It remembers what it's printed already, so can be run repeatedly.
With a little metadata in an HTML comment, a task can be set to repeat, in which case it will be marked as incomplete a defined period after being completed.
It's compatible with Obsidian vaults.
Requirements
- poppler utils (PDF)
Usage
A task is defined in Markdown with a list item and checkbox. For example:
- [ ] Remember the milk
- [x] Throw away the milk, you don't drink it
Already completed tasks will not be printed.
Tasks may consist of sub-tasks using indents:
- [ ] Replace bedroom wardrobe
- [ ] Choose a new model
- [ ] Visit the Swedish meatball emporium
- [ ] Get in and out with a wardrobe in under 1 hour
- [ ] Build wardrobe
- [ ] Dispose of old wardrobe
No attempt is made to manage completion in either up or down a stack of tasks and sub-tasks. Completing all sub-tasks will not automatically mark a parent task as complete, and completing a parent tasks does not automatically mark sub-tasks as complete.
When tasks are found under layers of headings, these will be used to inform what appears on the task receipt:
# Chores
## Stephen
- [ ] Mow the lawn
An HTML comment can be used to have tasks be marked as incomplete some time they are completed:
- [ ] Take out the recycling bin <!-- repeat:2w -->
Tasks can be marked as not for printing:
- [ ] Buy a birthday gift for Ruby <!-- noprint -->
Metadata will be stored inline in an HTML comment, the same one you can use to indicated repeating tasks, etc:
- [x] Write the MarkdownTodoPrint README <!-- completed:2025-08-10T15:00 printed -->
- [ ] Order the weekly groceries <!-- repeat:1w completed:never printed -->
If you update a task and want to reprint it, just remove printed from the metadata comment.
Building this thing todos
- A tree walker for finding Markdown files in a directory and sub-directories
- A Markdown parser that produces a hierachy of tasks from a file, retaining links to the AST
- Metadata parser
- Record when a task is marked as completed
- Apply any
repeat:rules to completed tasks, updating the task metadata in the AST as needed - Produce raster of each unprinted task
- Marked as printed in the task metadata in the AST
- If AST has been modified, rewrite the original Markdown doc
- How is feedback given if this is run as a cron job or similar?
Crazy ideas
- Web server, QR codes on the receipt to tick off completed tasks