| 
				
				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?
 |