![]() |
#1 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Oct 2021
Device: Pocketbook Inkpad Color
|
![]()
Question:
Is reverse-tree tagging possible in Calibre, as a custom field or even as a plug-in, or does it require a complete overhaul of the database logic? Explanation: At the moment, subtagging is a top-down tree. Each child tag has one parent tag, which can have a single parent tag, but a parent tag can have multiple child tags. This meets its limitations however, when a subtag can fit in two different parent. For example, when tagging cookbooks: ![]() In this example, the parent tag is Great Britain, which has three children. England, Scotland, and British Cuisine. England and Scotland both have a child tag for their national cuisines. British Cuisine is the collective of both cuisines, but adding English Cuisine as a child creates a separate tag, British.English, versus England.English. Reverse tree tagging, bottom-up, does the reverse: ![]() English Cuisine and Scottish Cuisine are the main tag, and both have two parents: England or Scotland, and British Cuisine. All three of those tags have a parent tag, which is the tag Great Britain. Not just useful for cookbooks, it could also be used for subgenres that blend two genres. Two examples: Starship Troopers and The Forever War are frequently classified under Military Science Fiction subgenre, and The Dancers at the End of Time is frequently classified under the Dying Earth subgenre. This is how those would look: ![]() Note I separated them for readability's sake, but obviously Science Fiction would be the same tag; opening the Science Fiction tag would show both MilSciFi and Dying Earth as child tags. I forgot to link SciFi to SciFantasy, imagine the line's there. Of course, you (and I know I would) could also use it for gorefests like this... |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,069
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
One approach to creating reverse trees would be to tags books with the most specific categories such "Dying Earth" or "Military SF" and then use appropriately named saved searches instead of tags for the more general categories. Since saved searches can reference other saved searches you can build up a hierarchy that way.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,968
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I have a composite column that splits and de-dupes the tags. Mostly because the long hierarchical tags look awful in the book details pane.
But an additional effect is that clicking on "Atlantic Canada" in the details pane will display books for Fiction.Cultures & Regions.Canada.Atlantic Canada, Nonfiction.Travel Guides.Canada.Atlantic Canada, and Nonfiction.History.Canada.Atlantic Canada. Code:
program: g = field('tags'); stripped_hierarchies = list_re_group(g, ',', '.', # This ignores any subtags under specific top-level tags. I have separate columns for them. '^(Fanfiction|Documentation & Manuals)($|\..*$)', '{$}', ''); split_hierarchies = re(stripped_hierarchies, '\.', ','); split_hierarchies = list_difference( split_hierarchies, # These are tags to explicitly ignore. '@cleanup, Cultures & Regions', ','); cleaned = list_union('', split_hierarchies, ','); # Remove or comment this next line to get rid of the alphanetical sorting. sorted = list_sort(cleaned, 0, ',') |
![]() |
![]() |
![]() |
Tags |
tagging |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre not tagging? | tomx2 | Library Management | 14 | 07-11-2018 01:04 AM |
If this then that style tagging? | webhill | Library Management | 1 | 02-23-2013 07:31 AM |
Tagging Error | DagsJT | Library Management | 35 | 03-07-2011 12:26 PM |