Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Any idea on how to best compile it to an ebook? Just stuffing the jpgs into a pdf rarely works well...




I usually do what rarely doesn't work well for you, but it works decently for me. You get 1 page per image and the image isn't compressed or touched at all.

  apt install img2pdf
  img2pdf *.jpg -o leonardo-da-book.pdf

wouldnt this mess up the order? I think you are supposed to view it like R1, V2, R2, V2, etc

Yes, this was just an example. Using wildcard expansion will give you whatever order the your current shell seems fit. Bash does alphabetical order.

More like

    echo $(for page in {1..1119}; do for side in R V; do
      echo "000$side-$page.jpg"; done; done)

I haven't that done this in some time, but templating some markdown code for pandoc and creating an ebup might be a viable avenue.

Maybe what rarely works well for NoMoreNicksLeft is having a gigabyte of JPEGs in a single HTML chapter inside the epub? In that case you could do something like divide the files into 373 "chapters" of 6 pages each?

One of the fragmentary editions I linked on the Archive uses the .cbr Comic Book Reader format; perhaps that is a better format than .epub for high-resolution scans of every page?


Oooh... I have even less luck with epub, when the pages are an image-per-page.

Easy way would be to just drop them in a zip and label it .cbz. Most readers handle CBR/CBZ just fine.

Oh, is .cbz that simple? Does it use the file order of the zipfile members or some other order? (https://acbf.fandom.com/wiki/ACBF_Editor_-_Creating_Metadata says it uses alphabetical order, which is the wrong order in this case.)

It may be useful to use zip -Z store. JPEG data isn't going to get much benefit from another layer of LZ77.


Calibre comes with a ebook-convert command, that one might work

ocrmypdf (rocks!)



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: