View Single Post
Old Yesterday, 06:56 PM   #1
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,298
Karma: 5007213
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Question Allow Custom Columns in Catalog Template?

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'
JimmXinu is online now   Reply With Quote