|
|
#1 |
|
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,299
Karma: 5007213
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
It looks like current Create Catalog code for epub(code link) doesn't allow custom columns in resources/catalog/template.xhtml.
XML/CSV catalog output already includes custom columns. Would it be possible to get custom columns in epub catalog, too? Debug output suggests custom columns are already known in the catalog generation process: Code:
... Custom fields: #chapters 'Ch' int #device_info 'Device info' composite #extranotes 'ExtraNotes' text #fanficfare_error 'FanFicFare Error' comments #fanficfare_metadata 'FanFicFare Metadata' comments #formats 'Formats' composite #noton 'Not On' text #series_title 'Series Title' composite #title_prefix '000' text #updated 'Updated' datetime #urlid 'URL' composite #wordcount 'Words' int #words_added 'Added' int Thumbnails: DPI = 132.0; thumbnail dimensions: 396.0 x 526.6800000000001 existing thumb cache at C:\Users\user\AppData\Local\calibre-cache\catalog\thumbs.zip, cached_thumb_width: 3.00" Sorting titles (0:00:00) Sorting database (0:00:00) Thumbnails (0:00:00) Descriptions HTML (0:00:00) unhandled exception in catalog generator Traceback (most recent call last): File "runpy.py", line 198, in _run_module_as_main File "runpy.py", line 88, in _run_code File "site.py", line 83, in <module> File "site.py", line 78, in main File "site.py", line 50, in run_entry_point File "calibre\utils\ipc\worker.py", line 213, in main File "calibre\gui2\convert\gui_conversion.py", line 82, in gui_catalog File "calibre\library\catalogs\epub_mobi.py", line 403, in run File "calibre\library\catalogs\epub_mobi_builder.py", line 314, in build_sources File "calibre\library\catalogs\epub_mobi_builder.py", line 2828, in generate_html_descriptions File "calibre\library\catalogs\epub_mobi_builder.py", line 2753, in generate_html_description_header File "calibre\library\catalogs\epub_mobi_builder.py", line 2655, in _generate_html KeyError: '#chapters' |
|
|
|
|
|
#2 |
|
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,952
Karma: 7955879
Join Date: Sep 2020
Device: none
|
If that can be made true, I guess I'd appreciate being able to export my GR Author notes author Bio column alongside the book data!
Bio column: |
|
|
|
|
|
#3 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,021
Karma: 29579868
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
EPUB catalog code is unmaintained (apart from bug fixes that I do) since GRiker, it's original author left. So PR is welcome, in this case you will probably need to add custom column metadata into the args passed to format(), possibly underscore prefixed since # is not valid in format keys. And that in turn will require adding custom column metadata into the book dict.
|
|
|
|
|
|
#4 |
|
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,299
Karma: 5007213
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Fair enough. I will look into it.
|
|
|
|
|
|
#5 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,394
Karma: 31000056
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Nirsoft's CSVFileView can create an HTML file which can then be converted into an EPUB.
BR |
|
|
|
|
|
#6 |
|
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 196
Karma: 197760
Join Date: Oct 2015
Device: Kobo Glo HD (landscape), Kobo Aura One
|
JimmXinu,
of course taking over the catalog feature into active management would be great. Actually there is a workaround to include custom column content. The catalog gui offers a field for "additional description" which allows custom fields as well. That field is named "notes" with note_source and note_content in the xhtml |
|
|
|
|
|
#7 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,318
Karma: 1436993
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
@JimmXinu
I made some changes to the catalog code to acomodate my preferences, including the use of custom columns. It's just a simple hack, no GUI option was changed. Basically I modified the python code to use custom columns defined in my 'template.xhtml' and 'stylesheet.css' files. P.S.: There are other changes, including using 'author' instead of 'author_sort', using a custom cover ('CatalogCover.jpg'*), and the use of 'calibreSymbols.otf'* so I can have half stars, but those can be ignored. *'calibreSymbols.otf' was copied from the calibre install directory. 'calibreSymbols.otf' and 'CatalogCover.jpg' were saved to my '..\config_dir\calibre\resources\catalog' directory. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help Needed for Custom Columns Created From other Columns | Tanjamuse | Library Management | 5 | 09-02-2018 07:19 PM |
| Using built-in template functions in a custom template function | ilovejedd | Library Management | 4 | 01-28-2018 01:20 PM |
| Need help in Custom Columns, template syntax, and rounding numbers | dennocoil | Calibre | 0 | 07-10-2017 04:24 PM |
| Add custom columns to Calibre catalog | Sirtel | Library Management | 8 | 07-24-2015 03:03 AM |
| including custom columns in epub catalog | Jade Aislin | Library Management | 2 | 07-13-2012 10:36 AM |