View Single Post
Old 08-09-2020, 07:35 PM   #1
droopy
Guru
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
Bulk auto-delete redudant hierarchical tags

A computer has directories and those directories can have subdirectories. I think we all do better organizing computer files into directories and subdirectories. I think that I would find it beneficial, personally speaking, to have tags in hierarchies where it’s relevant. Thus, I have recently enabled hierarchical tags.

With that as context, I’ve recently enabled a number of Metadata-Source plugins, including the KoboBooks plugin. With both the use of hierarchical tags and KoboBooks plugin active, the tags for a book may now look like this:

Nonfiction.Religion & Spirituality.Philosophy, Nonfiction, Nonfiction.Religion & Spirituality.Philosophy.Aesthetics, Nonfiction.Art & Architecture.Art History, Nonfiction.Social & Cultural Studies.Social Science, Nonfiction.Religion & Spirituality, Nonfiction.Art & Architecture, Nonfiction.Social & Cultural Studies

If we had one tag per line, it would look something like this:
Nonfiction
Nonfiction.Religion & Spirituality
Nonfiction.Religion & Spirituality.Philosophy
Nonfiction.Religion & Spirituality.Philosophy.Aesthetics
Nonfiction.Art & Architecture
Nonfiction.Art & Architecture.Art History
Nonfiction.Social & Cultural Studies
Nonfiction.Social & Cultural Studies.Social Science


What I’d like to do is keep just those tags that have the most data (the longest ones) while excising the shorter, redundant ones. Here’s what I mean. The red tags are deleted. The green, bold ones are preserved.

Nonfiction
Nonfiction.Religion & Spirituality
Nonfiction.Religion & Spirituality.Philosophy

Nonfiction.Religion & Spirituality.Philosophy.Aesthetics
Nonfiction.Art & Architecture
Nonfiction.Art & Architecture.Art History
Nonfiction.Social & Cultural Studies
Nonfiction.Social & Cultural Studies.Social Science

Is there a way for Calibre to auto-search through my entire library and do such a bulk purging?
droopy is offline   Reply With Quote