Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 02-21-2026, 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,299
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 offline   Reply With Quote
Old 02-21-2026, 07:06 PM   #2
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
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:
Click image for larger version

Name:	MWSnap 2026-02-21, 20_05_19.png
Views:	17
Size:	414.3 KB
ID:	221219
Comfy.n is offline   Reply With Quote
Old 02-21-2026, 09:38 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is online now   Reply With Quote
Old 02-21-2026, 10:00 PM   #4
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,299
Karma: 5007213
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Fair enough. I will look into it.
JimmXinu is offline   Reply With Quote
Old 02-21-2026, 11:06 PM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
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
Attached Files
File Type: epub BR's Shortcuts.epub (4.0 KB, 7 views)
BetterRed is offline   Reply With Quote
Old Yesterday, 05:22 AM   #6
Katja_hbg
Groupie
Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.Katja_hbg can program the VCR without an owner's manual.
 
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
Katja_hbg is offline   Reply With Quote
Old Yesterday, 08:33 PM   #7
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
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.
Attached Thumbnails
Click image for larger version

Name:	Captura de tela 2026-02-22 213018.png
Views:	7
Size:	242.3 KB
ID:	221296  
Attached Files
File Type: py epub_mobi.py (25.3 KB, 1 views)
File Type: py epub_mobi_builder.py (180.5 KB, 0 views)
thiago.eec is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 04:41 AM.


MobileRead.com is a privately owned, operated and funded community.