Quote:
Originally Posted by jm289765
How to add the isbn formatting option.
Go to make_book_format_dict in highlight_sender.py. Edit the format_options dict to have an "isbn" element with the book's ISBN. The keys in this dict should be the same as the formatting options you plan to use in H2O, e.g. an "isbn" key in format_options will let you use the {isbn} tag.
You'll need to modify the make_book_format_dict function to take the book's isbn as an input. To do that, put the isbn into a dict similar to how the book titles and authors are handled, and pass that value through make_format_dict (lines 237, 705).
The value of book_titles_authors is set on line 564. The logic for calculating the value of it is in button_actions.py, lines 49 and 227-246. It should be relatively easy to make something similar for isbn.
I think db.field_for("column_name", book_id) will give you the value of custom columns via the lookup name that you choose when creating the column in calibre, but i'm not completely sure.
Formatting options for page length and pub_date can be created similarly.
|
Wow, thank you for such a detailed response from the developer of the plugin themselves. Thank you. I can’t wait to delve into it.
While you are here, is there any chance you could point me in the direction to inherit the chapter number for the highlights/annotations that are coming through please? Similar to when exporting in .md through annotations
That is literally the only other thing I would need to make this perfect for importing in one go.
Again, thank you for taking the time to respond.