bolts icon indicating copy to clipboard operation
bolts copied to clipboard

make: add document generation with pandoc

Open jb55 opened this issue 7 years ago • 4 comments

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:

jb55 avatar Dec 14 '17 05:12 jb55

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.

rustyrussell avatar Jan 01 '18 03:01 rustyrussell

Made a few tweaks in 047fdef9edbe75fd4f24245b6e45e0cf44f3ee59

jb55 avatar Jan 03 '18 20:01 jb55

Was the bug reported upstream?

ysangkok avatar Apr 06 '20 23:04 ysangkok

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

ysangkok avatar Nov 18 '20 18:11 ysangkok