0

I would like to convert this book Mastering the Lightning Network, which is freely available through GitHub to a pdf for personal use.

Unfortunately, I have only figured out how to "translate" single files using asciidoc or asciidoctor-pdf. The options for folders don't seem to work with the configuration of the repository.

There has to be an easy way to translate everything, including all files and pictures. Would be very thankful if somebody could help me out.

  • "You can't create ebooks in PDF, HTML EPUB or any other format unless it is for personal use only and not shared/distributed." – Ben Heckmann Feb 10 '22 at 16:15

2 Answers2

1

As far as I know it is not possible to convert a folder containing AsciiDoc files to a pdf, a simple script could do it but the problem would be in what order do you want your files to be converted?

The simplest solution for you is to create your own content.adoc file and use the include macro to select what files you want to convert and in what order, it could look something like this:

= Mastering the Lightning Network

include::01_introduction.asciidoc[]
include::02_getting_started.asciidoc[]
include::03_how_ln_works.asciidoc[]
include::04_node_client.asciidoc[]
include::05_node_operations.asciidoc[]
include::06_lightning_architecture.asciidoc[]
include::07_payment_channels.asciidoc[]
include::08_routing_htlcs.asciidoc[]
include::09_channel_operation.asciidoc[]
include::10_onion_routing.asciidoc[]
include::11_gossip_channel_graph.asciidoc[]
include::12_path_finding.asciidoc[]
include::13_wire_protocol.asciidoc[]
include::14_encrypted_transport.asciidoc[]
include::15_payment_requests.asciidoc[]
include::16_security_privacy_ln.asciidoc[]
include::17_conclusion.asciidoc[]

and you convert using asciidoctor-pdf content.adoc

Kiroul
  • 465
  • 2
  • 9
  • Thank you so much! I did get several errors while converting (e.g. "ERROR: failed to parse formatted text: ...."), but it seems to have produced the complete pdf I was looking for! – Ben Heckmann Mar 09 '22 at 10:14
0

You could try using imagemagick: magick *.jpg out.pdf

  • Thanks! I will try it out. @KJ Read Me clearly states the exception for personal use.. – Ben Heckmann Feb 10 '22 at 16:19
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – taylor.2317 Feb 10 '22 at 16:51