Hacker News new | ask | show | jobs
by kcartlidge 28 days ago
As we're sharing pipelines:

- I write in Markdown files using VS Code and a custom syntax highlighter

- A custom C# tool stitches it together (with YAML metadata)

- It generates reports on chapters, dialogue, character presence etc

- It uses custom code to generate an EPUB (v2)

- It uses custom code to generate a DOCX (validated)

- It uses custom code to generate a PDF (print or with interactive links)

Works great and gives perfect results in seconds (beats Vellum, which I quite like). The only drawback is the yak shaving involved in my totally stand-alone solution leads to more time tinkering than writing.

1 comments

> syntax highlighter

This was critical for me, but I didn't see an easy way for Markdown to bring it to my Linux+Emacs home, so I went with Org-mode.

Custom Go code parses the Org-mode syntax into HTML, WeasyPrint turns that into paginated PDF. The latter step is a bit slow, so I proofread iterative content updates in the HTML.