Skip to content

Tags: lancer-code/md2pdf

Tags

v1.0.1

Toggle v1.0.1's commit message
Add network fallback for libavif.so.16 — v1.0.1

Previously, install.sh only searched system paths and vendored Python
wheels (Pillow, OpenCV) for a usable libavif.so.16. Users without any of
those on their machine would hit a dead end.

v1.0.1 adds a third fallback: download a pre-built shim from the md2pdf
GitHub release over HTTPS. The chain is now:

  1. Prince runs as-is
  2. System paths (/usr/lib/..., /usr/local/lib/...)
  3. $HOME walk (Pillow, OpenCV, other vendored wheels)
  4. curl from v1.0.0 release assets — NEW
  5. Clear distro-specific install instructions and exit

The download is sanity-checked as an ELF binary before staging. The
$HOME walk now has a 10-second timeout to prevent hangs on large home
directories or broken NFS mounts. Architecture is gated to Linux
x86_64 — macOS and ARM Linux get platform-specific error messages
instead of a mismatched download.

README and CHANGELOG updated with the new fallback chain and a new
"What if I don't have Pillow installed?" section.

v1.0.0

Toggle v1.0.0's commit message
Initial release: md2pdf v1.0.0

Single-file bash script that converts Markdown to print-ready PDF
via marked (GFM) and Prince.

Highlights:
- One command, one file in, one PDF out
- Print-optimized CSS: A4, page numbers, zebra tables, wrapping code
- Idempotent installer with auto-detected libavif shim for Ubuntu 24.04
- Zero global npm installs (marked fetched on-demand via npx)
- Readable in one sitting (~300 lines of bash and CSS)