View Single Post
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,615
Karma: 7891011
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:	141
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:	111
Size:	23.2 KB
ID:	214410

Edit:

Click image for larger version

Name:	2025-03-17 19_50_12-Edit Template.png
Views:	115
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:	101
Size:	9.5 KB
ID:	214411
Attached Thumbnails
Click image for larger version

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

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

Last edited by Comfy.n; 03-22-2025 at 12:52 PM.
Comfy.n is offline   Reply With Quote