Search code examples
asciidocasciidoctorasciidoctor-pdf

Best way to generate Mastering the Lightning Network PDF from ASCIIDOC


The Book "Mastering the Lightning Network" is accessible through Github (https://github.com/lnbook/lnbook) and there are multiple asciidoc files that make the book. The License is that it is free for the own use to generate a pdf. So I looked a bit how to do it and it seems not too easy. It sounds a bit like Latex, but I found not a quick way to make a pdf from the files. I found something like Asciidoctor . I am not sure if this is the best approach. So I would be grateful for hints how to generate the book in the easiest way.


Solution

  • AsciiDoctor is based on Ruby plus many other related dependancies thus a Mahoosive potential installation of over 32000 files with a learning curve like LaTeX or any other heavyweight book publishing system.

    You asked for the easiest way to "generate" in book format, and you can literally read the docs in a few clicks, but the license specifically allows you to only produce a pdf or similar for private use and you dont need to do a full book at a time for personal everyday reading/reviewing. Note a similar query was how to combine all the book chapters in
    Convert a folder containing asciidocs and pictures to pdf and that could perhaps be answered by building your own book.asciidoc or .asoc as suggested in Generate single PDF from multiple Asciidoc files, however for a few "books for the road" visual or audio, the Ruby Plus Asciidoc installation is overkill and potential for frustrations. Primarily this books navigation is still incomplete.

    For the intervening months this year (2022) "You can't create ebooks in PDF, HTML EPUB or any other format unless it is for personal use only and not shared/distributed." https://github.com/lnbook/lnbook#licensing-change-in-12-months

    Thus you can print parts to pdf if you need them say while traveling with your ebook / audio reader, but must not do so, for your family, friends or other individuals etc...

    Here I am reading the source in FireFox (on the right) and checking a PDF live compilation in my portable book reader. (But please dont read that, its my personal copy for tommorow :-)

    enter image description here

    The AsciiDoc reader is at https://github.com/asciidoctor/asciidoctor-browser-extension and you simply point the extension at the chapter you wish to read.

    enter image description here