#AskNostr

This Andreas Antonopoulos ebook about the Lightning Network is available for free in a GitHub repository:

https://github.com/lnbook/lnbook

However, I cannot figure out how to take the repository and compile it into an ePub file. Dropping it into Calibre doesn't work, and I can't find instructions online.

This MUST be a simple task, yet I'm frustrated in my attempts to get an answer.

Help me, Nostr plebs; you're my only hope.

Reply to this note

Please Login to reply.

Discussion

Use pandoc

Yep. ChatGPT had directed me to Pandoc, but it couldn’t handle the asciidoc source files. So that took me to Asciidoctor, which required me to get RubyInstaller. So that’s what I’m waiting on currently.

There's always tried-and-true asciidoctor: https://github.com/asciidoctor/asciidoctor-epub3

Yep. ChatGPT had directed me to Pandoc, but it couldn’t handle the asciidoc source files. So that took me to Asciidoctor, which required me to get RubyInstaller. So that’s what I’m waiting on currently.

Format is asciidoc. Asciidoctor can convert to pdf. In the following article is shown a VS Code addon can do the job as well

https://stackoverflow.com/questions/64443615/generate-single-pdf-from-multiple-asciidoc-files

Thanks, I’ll check it out.

ChatGPT had directed me to Pandoc, but it couldn’t handle the asciidoc source files. So that took me to Asciidoctor, which required me to get RubyInstaller. So that’s what I’m waiting on currently.

1. Compile AsciiDoc Files into a Single HTML File:

Using AsciiDoctor, you can convert all asciidoc files into a single HTML file. The command is:

asciidoctor -b html5 -o output.html input.adoc

Repeat for all asciidoc files and then concatenate them into a single HTML file.

2. Create a CSS File (Optional):

If styling is necessary, create a CSS file and link it within the HTML file.

3. Convert HTML to ePub using Pandoc:

Once you have an HTML file, you can convert it to ePub using Pandoc. The command is:

pandoc output.html -o final.epub

4. Modify Calibre Settings (If Needed):

If you're still considering using Calibre, ensure that the settings match the specific needs of the file you're converting. Sometimes, altering specific input or output settings can resolve conversion issues.