txtify: convert anything to markdown
Convert anything to clean, well-formatted markdown by chatting with an LLM agent. Ebooks, YouTube videos, webpages, PDFs, podcast episodes... You review, ask for changes, and decide when it's good enough.
How to use it
Drop something in the workspace (or provide a URL) and tell the agent to txtify it:
"txtify this epub"
"txtify this YouTube video: https://..."
"txtify this PDF"
The agent takes it from there — picks (or writes) a first-pass converter, runs it on the source, splits the raw markdown into manageable chunks, inspects the first chunk and source material, and writes bash scripts to fix whatever formatting issues it finds (headings, footnotes, junk content, blockquotes, etc.). It tests the scripts on the first chunk, shows you what changed, then immediately runs them against all chunks.
What the output looks like
After conversion, you'll find these files in sources/<source-name>/:
| File | What it is |
raw-001.md, raw-002.md, ... |
Fixed-size chunks (~50KB each) of the raw first-pass output. These are the baseline. |
cleaned-001.md, cleaned-002.md, ... |
Same chunks after the agent's formatting scripts have run. |
cleaned-full.md |
All cleaned chunks concatenated (the final result). |
The raw and cleaned chunks exist side by side so you can diff any chunk to see exactly what the scripts changed. Media lives in .media/ and is referenced from the markdown files.
Reviewing the output
Open cleaned-full.md in your editor and read through it. This is the whole thing in markdown. For a more targeted check, you can look at any individual chunk, and you can view a diff to see what's changed:
diff raw-OO1.md cleaned-001.md
If you want to run the full conversion pipeline yourself: cd sources/<source> && ./convert.sh.
Iterating
If you spot issues in a particular part of the output, just tell the agent:
"Chapter 3 has run-together footnotes — check and fix them"
The agent reads the problematic chunk and its source, writes or adjusts a script, tests it, and re-processes the whole thing.
Finalizing
When the output looks good enough, tell the agent:
"Finalize it"
This assembles a clean output in final/:
final/YYYY-MM-DD - Author - Title/
├── Title.md ← cleaned-full.md with working media paths
└── media/ ← all media from the source
That folder is ready to drop into a notes app, a static site generator, or anywhere else that reads markdown.
Resuming across sessions
To keep context windows reasonable, feel free to start a new chat and continue iterating. The agent knows where to find the current working state of the source.