Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 03-16-2025, 07:22 AM   #1
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,577
Karma: 7463599
Join Date: Sep 2020
Device: none
[GUI Plugin] Template Catalog

Template Catalog Plugin for Calibre!

A powerful template management plugin for Calibre that helps you organize, store, and reuse your templates.

Features
  • Template Organization: Store and categorize your templates in a structured way

    Import Capabilities:
  • Import composite column templates
  • Import Calibre's built-in rules (color rules, icon rules, cover grid emblems)
  • Import/Export entire template catalogs

Smart Template Management:
  • Organize templates into categories
  • Add tags for easy filtering
  • Add descriptions to document your templates
  • Test templates directly on selected books
  • Save templates to files for sharing

Advanced Search & Filter:
  • Filter templates by name, category, or tags
  • Full-text search within template content
  • Support for case-sensitive, whole word, and regex search

Python Template Mode Support:
  • Special handling of Python Template Mode (PTM) templates
  • Visual distinction of PTM templates in the interface

Category Management:
  • Create, rename, and merge categories
  • Auto-categorization of imported templates

Installation

1. Download the latest release zip file
2. In Calibre, go to Preferences → Plugins → Load Plugin from File
3. Select the downloaded zip file
4. Restart Calibre

Usage:

Basic Operations
  • Click the Template Catalog icon in the toolbar to open the manager
  • Use "Add" to create new templates
  • Double-click a template to edit it
  • Use "Test" to try a template on a selected book
  • Use tags and descriptions to organize your templates
  • Use the filter box to quickly find templates

Importing Templates
  • From Composite Columns: Select templates in the Composite Columns section and click Import
  • From Calibre Rules: Use the Import From menu to import various Calibre rules
  • Bulk Import: Use "Import All New" to import all new composite templates at once

Managing Categories
  • Use the "Manage template categories" button to organize your catalog
  • Create new categories as needed
  • Merge categories to consolidate similar templates
  • Templates can be moved between categories during editing

Template Testing

1. Select a book in your library
2. Select a template in the catalog
3. Click "Test" to see the template results
4. Use the template tester dialog to try variations


Search Features
  • Use the filter box to find templates by name, category, or tags
  • Use the search box to search within template content
  • Enable regex mode for advanced pattern matching

Tips & Tricks
  • Use descriptive tags to make templates easier to find
  • Add detailed descriptions to document template behavior
  • Export important templates to files as backups
  • Use categories to group related templates
  • Test templates before using them in columns or rules

Requirements
  • Calibre 6.25 or later
  • Works on Windows, macOS, and Linux (I've only tested on Windows, feedback is welcome)

Support

If you encounter any issues or have suggestions, check this MobileRead thread!

License

This plugin is licensed under the GNU GPL v3.

Latest updates

Version 2.0:

1. Markdown export:

- The markdown export feature generates a structured documentation of the template catalog. It's acessible in the Transfer menu.
- Exported file can then be:
  • Added to Calibre library
  • Converted to DOCX or other formats using Calibre's converter

2. Backup Creation:
- Creates backups in a dedicated folder at `[calibre config dir]/plugins/TemplateCatalog/backups`
- Automatically generates backup files with timestamps in the format `template_catalog_backup_YYYYMMDD_HHMMSS.json`
- Creates backups before major changes like:
- Bulk template deletion
- Category merges/renames
- Full catalog imports

3. Backup Management:
- Keeps only the 5 most recent backups
- Automatically removes older backups when this limit is exceeded

4. Backup Restoration:

- Added a "Restore Last Backup..." option in the Transfer menu
- Shows a confirmation dialog before restoring
- Restores from the most recent backup file

Screencaps

Main dialog:

Click image for larger version

Name:	Main dialog - MWSnap 2025-03-17, 19_55_16.png
Views:	121
Size:	49.7 KB
ID:	214409

Quick access to Calibre's Template Tester:

Click image for larger version

Name:	2025-03-17 19_53_00-Test Template_ From as (only one template dialog allowed).png
Views:	97
Size:	23.2 KB
ID:	214410

Edit:

Click image for larger version

Name:	2025-03-17 19_50_12-Edit Template.png
Views:	104
Size:	10.6 KB
ID:	214412

Manage template categories:

Click image for larger version

Name:	2025-03-17 19_51_16-Manage Categories.png
Views:	84
Size:	9.5 KB
ID:	214411
Attached Thumbnails
Click image for larger version

Name:	main MWSnap 2025-03-19, 01_04_27.png
Views:	79
Size:	40.2 KB
ID:	214437   Click image for larger version

Name:	2025-03-19 00_52_16-Manage template categories.png
Views:	70
Size:	8.5 KB
ID:	214438  
Attached Files
File Type: zip TemplateCatalog_2.0.zip (319.2 KB, 69 views)

Last edited by Comfy.n; 03-22-2025 at 12:52 PM.
Comfy.n is offline   Reply With Quote
Old 03-16-2025, 07:22 AM   #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,577
Karma: 7463599
Join Date: Sep 2020
Device: none
(Reserved for future use)
Comfy.n is offline   Reply With Quote
Advert
Old 03-16-2025, 02:15 PM   #3
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,572
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you, using it now because I've got to create some templates lately.
Terisa de morgan is offline   Reply With Quote
Old 03-16-2025, 05:19 PM   #4
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,577
Karma: 7463599
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by Terisa de morgan View Post
Thank you, using it now because I've got to create some templates lately.
I saw your template that checks if there are non-ascii characters in a title and it works just fine! Now I've saved it and tagged it with 'transliterate' and 'Terisa'.
Attached Files
File Type: txt Check non ascii chars in title.txt (118 Bytes, 70 views)
Comfy.n is offline   Reply With Quote
Old 03-16-2025, 05:34 PM   #5
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,572
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by Comfy.n View Post
I saw your template that checks if there are non-ascii characters in a title and it works just fine! Now I've saved it and tagged it with 'transliterate' and 'Terisa'.
Glad it helps you. I'm using your plugin (and included that template too ), and the function to import templates from custom columns and icon/colouring column is very, very useful, thank you. I think I'm going to be able to clean some custom functions that usually give me pain. So, thank you again.
Terisa de morgan is offline   Reply With Quote
Advert
Old 03-16-2025, 06:30 PM   #6
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,577
Karma: 7463599
Join Date: Sep 2020
Device: none
I have uploaded a new version with Shortcuts support for accessibility.

From what I've seen on tests, it might be necessary to uninstall previous version for the plugin shortcuts to take effect.
Comfy.n is offline   Reply With Quote
Old 03-16-2025, 06:37 PM   #7
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: 21,572
Karma: 29709834
Join Date: Mar 2012
Location: Sydney Australia
Device: none
It's always puzzled me how people who use templates extensively go about managing them.

Q. Is the Template Catalogue global (i.e spans multiple libraries) or per library? I suspect the latter, not a loaded question, just want to confirm.

BR
BetterRed is offline   Reply With Quote
Old 03-16-2025, 06:49 PM   #8
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,577
Karma: 7463599
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by BetterRed View Post
It's always puzzled me how people who use templates extensively go about managing them.

BR
Yep. I always wanted to have a catalogue for this. My original idea was to scrape MobileRead posts and create this big Word document. Never got around to do it.

Quote:
Q. Is the Template Catalogue global (i.e spans multiple libraries) or per library? I suspect the latter, not a loaded question, just want to confirm.
It's global, but it can import Composites from each library! So you may select the detected composites across different libraries, then do multiple select in template list and import them. (shift key works to do multiple selection)
Comfy.n is offline   Reply With Quote
Old 03-16-2025, 07:05 PM   #9
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: 21,572
Karma: 29709834
Join Date: Mar 2012
Location: Sydney Australia
Device: none
So can I assume it stores the catalogue in the %appdata%/calibre/plugins folder?

Edit: - yes it does.

BR

Last edited by BetterRed; 03-16-2025 at 07:27 PM.
BetterRed is offline   Reply With Quote
Old 03-16-2025, 07:18 PM   #10
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,577
Karma: 7463599
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by BetterRed View Post
So can I assume it stores the catalogue in the %appdata%/calibre/plugins folder?

BR
Yes, catalogue filename is template_catalog.json.

I confirm the path is config dir/plugins
Comfy.n is offline   Reply With Quote
Old 03-17-2025, 12:13 AM   #11
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: 21,572
Karma: 29709834
Join Date: Mar 2012
Location: Sydney Australia
Device: none
If I export the icon rules from Look and Feel I can see the column to which the icon is attached e.g.

Quote:
[
"icon",
"authors",
"program:\n# BasicColorRule():5b226d6167617a696e652e706e67222c2 05b5b22666f726d617473222c2022686173222c20224550554 24649584544225d5d5d\ntest(str_in_list(field('forma ts'), ',', \"EPUBFIXED\", '1', ''), 'magazine.png', '');\n"
],
I cannot see that column name in Template Category list or in the Edit/Save dialogue.

Could the name if the column to which the icon is attached be incorporated into the Template Name e.g.… rather than "From column_icon_rules: Rule 1" something like this "authors: Rule 1".

And something similar for column colour templates.

BR
BetterRed is offline   Reply With Quote
Old 03-17-2025, 02:27 AM   #12
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,572
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by BetterRed View Post
It's always puzzled me how people who use templates extensively go about managing them.

Q. Is the Template Catalogue global (i.e spans multiple libraries) or per library? I suspect the latter, not a loaded question, just want to confirm.

BR
Global, and I can say it detects duplicate templates
Terisa de morgan is offline   Reply With Quote
Old 03-17-2025, 02:30 AM   #13
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,572
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
And there is another field where this is going to be useful to catalog: Action Chains
Terisa de morgan is offline   Reply With Quote
Old 03-17-2025, 10:45 AM   #14
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,006
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
Quote:
Originally Posted by Comfy.n View Post
I saw your template that checks if there are non-ascii characters in a title and it works just fine! Now I've saved it and tagged it with 'transliterate' and 'Terisa'.
Yes, it is a nice check: well found . However, I do also have sub-titles, so I had to rework the template a little bit.
Code:
program:
	if (field('title')!=transliterate(field('title')))
	then
		if (field('#subtitle')!=transliterate(field('#subtitle')))
		then
			'true1, true2'
		else
			'true1'
		fi
	else
		if (field('#subtitle')!=transliterate(field('#subtitle')))
		then
			'true2'
		else
			'false'
		fi
	fi
It returns true1 for title, true2 for subtitle, or false when neither contains non-ASCII chars.

The reason I didn't use intermediate vars is because I noticed that the formatter stops processing/evaluating in case of a nil situation, so this seems to be fastest way to process. But as always, correct me if I'm wrong

Last edited by DrChiper; 03-17-2025 at 11:25 AM.
DrChiper is offline   Reply With Quote
Old 03-17-2025, 11:32 AM   #15
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,572
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by DrChiper View Post
Yes, it is a nice check: well found . However, I do also have sub-titles, so I had to rework the template a little bit.
Code:
program:
	if (field('title')!=transliterate(field('title')))
	then
		if (field('#subtitle')!=transliterate(field('#subtitle')))
		then
			'true1, true2'
		else
			'true1'
		fi
	else
		if (field('#subtitle')!=transliterate(field('#subtitle')))
		then
			'true2'
		else
			'false'
		fi
	fi
It returns true1 for title, true2 for subtitle, or false when neither contains non-ASCII chars.

The reason I didn't use intermediate vars is because I noticed that the formatter stops processing/evaluating in case of a nil situation, so this seems to be fastest way to process. But as always, correct me if I'm wrong
You can add author For me, I'm using only title or author because they add an icon to the column. About nil variable... no idea.
Terisa de morgan is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB lrpirlet Plugins 2 08-18-2022 03:15 PM
[GUI Plugin] Manga plugin mastertea Plugins 6 01-06-2022 02:43 AM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 14 04-04-2021 05:25 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 11:55 AM.


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