View Single Post
Old 10-30-2021, 03:22 PM   #35
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,806
Karma: 103362673
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by BlackWolf1994 View Post
If I understood correctly, I would want to achieve the latter - Have a PDF file that has all the text from the book + highlights and notes inserted at the appropriate places (with the [HL]/[Note:] as you previously explained).
Nobody asked before, and my instructions were incomplete.

It turns out that the output of azw3r.pl needs to be sorted. In addition, notes_insert.pl will not work correctly if both highlights and notes are in its input file.

So assuming the notes or highlights file has been sorted, the usage for notes_insert.pl is:
Code:
perl notes_insert.pl -r assembled_text.dat < notes.txt > annotated_book.html
ebook-convert annotated_book.html annotated_book.pdf
ebook-convert is the calibre ebook converter. I assume the calibre GUI would work as well.

Of course, you can use any file names you like for input and output files.
j.p.s is offline   Reply With Quote