View Single Post
Old 06-20-2025, 07:37 AM   #10912
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,118
Karma: 77213683
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I wanted to see if this would work for a hierarchical column.

Code:
# fanfictags combines several other categories to a single Calibre column. 
# category2 for includes/replaces before inclusion (without editing source category and title pages).
include_in_fictags:,char2,ship2
include_in_char2:characters
include_in_ship2:ships

replace_metadata: 
## Fanfic tags
 char2=>(.*)=>[Characters].\1
 ship2=>(.*)=>[Relationships].\1
The replace messed up so that every character/ship looks like
[Relationships].foo/bar[Relationships]

Messed up regex?

EDIT: Yes looks like. Calibre must've automatically dropped the trailing period: https://regex101.com/r/m9P7u9/1

Last edited by ownedbycats; 06-20-2025 at 08:10 AM.
ownedbycats is offline   Reply With Quote