bolts
bolts copied to clipboard
make: add document generation with pandoc
This adds a Makefile for generating pdf, epub and mobi files.
The default targets are pdf and epub, since they are the most common and only requires one dependency, pandoc. Generation of mobi files requires calibre.
I'm not sure if this is an appropriate PR for this repo, but I found it useful to have in case of anyone else was interested in generating ebooks for reading on their kindles, etc. Otherwise feel free to close :eyes:
Why did you close this? I only saw it because I went through my backlog of emails.
This is great, but shows some issues with our formatting: obviously github is more flexible :( Everywhere we use 3 spaces, it doesn't indent properly. 4 spaces works though, so it seems we should use that.
Made a few tweaks in 047fdef9edbe75fd4f24245b6e45e0cf44f3ee59
Was the bug reported upstream?
With a pandoc from today, I am getting an error:
% make lightning.pdf
pandoc -sS -V geometry:margin=1.5in -o lightning.pdf title.txt 00-introduction.md 01-messaging.md 02-peer-protocol.md 03-transactions.md 04-onion-routing.md 05-onchain.md 07-routing-gossip.md 08-transport.md 09-features.md 10-dns-bootstrap.md 11-payment-encoding.md
--smart/-S has been removed. Use +smart or -smart extension instead.
For example: pandoc -f markdown+smart -t markdown-smart.
Try pandoc --help for more information.
make: *** [Makefile:17: lightning.pdf] Error 6