Skip to content

Add pandoc-pretty wrapper with self-contained output and tests#18

Open
FreedomBen wants to merge 1 commit intojez:masterfrom
FreedomBen:add-pandoc-pretty
Open

Add pandoc-pretty wrapper with self-contained output and tests#18
FreedomBen wants to merge 1 commit intojez:masterfrom
FreedomBen:add-pandoc-pretty

Conversation

@FreedomBen
Copy link
Copy Markdown

First of all, thank you for this tool! It was very helpful to getting what I needed which was a reliable and quick way to convert markdown files to HTML that doesn't look terrible :-)

To make usage easier, I wrapped it in a self-contained binary. I did this mostly for myself but wanted to share back in case you liked it or found it useful, but no obligation whatsoever.

Cheers

Commit notes:

  • add Rust pandoc-pretty wrapper that shells out to user-installed pandoc, embeds template/CSS/Lua filter, defaults output name, and preflights pandoc presence
  • support self-contained output with --embed-resources, fallback title metadata, and configurable KaTeX URL
  • wire Makefile targets for build and tests; ignore build artifacts
  • include pandoc-sidenote Lua filter locally
  • add integration tests with fake pandoc stubs and real pandoc check, plus rich fixture coverage and local KaTeX fixtures to keep tests fast

- add Rust `pandoc-pretty` wrapper that shells out to user-installed pandoc, embeds template/CSS/Lua filter, defaults output name, and preflights pandoc presence
- support self-contained output with `--embed-resources`, fallback title metadata, and configurable KaTeX URL
- wire Makefile targets for build and tests; ignore build artifacts
- include pandoc-sidenote Lua filter locally
- add integration tests with fake pandoc stubs and real pandoc check, plus rich fixture coverage and local KaTeX fixtures to keep tests fast
@FreedomBen
Copy link
Copy Markdown
Author

Oh forgot to mention/disclose, I used AI to assist with dev, but it is not "vibe coded"

@jez
Copy link
Copy Markdown
Owner

jez commented Dec 23, 2025

First of all, thank you for this tool!

You're welcome!

To make usage easier, I wrapped it in a self-contained binary.

This is a really neat idea! It's definitely something that I have to fuss with every time I set up a new project: setting up all the files in the right places. I like how this simplifies that to a single file.

I did this mostly for myself but wanted to share back in case you liked it or found it useful, but no obligation whatsoever.

Super glad that you shared it and I got to see it!

At this point in my career, I find that I don't have a ton of time to spend maintaining projects like these, and every time when I do, I have to go figure out how the tests/compiler/build system work in order to make fixes. So I think I'll pass on incorporating these changes into this project, so that I'm on the hook for fewer things. But you should definitely feel free to wrap this up into a project of your own!

If you end up doing that, let me know, I'd be happy to link to it.

  • include pandoc-sidenote Lua filter locally

Heads up, it looks like you made a Lua port of the Haskell version of pandoc-sidenote?

A while back, I also did the same, and included the result upstream in the pandoc-sidenote repo:

https://github.com/jez/pandoc-sidenote/blob/master/pandoc-sidenote.lua

It looks like we ended up with different implementations of the same concept. You're welcome to keep using yours, or maybe you want to replace it with the version from upstream. Just figured I'd point it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants