Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
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
Old 09-04-2020, 09:18 AM   #2
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
bump.
droopy is offline   Reply With Quote
Advert
Old 09-04-2020, 12:35 PM   #3
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by droopy View Post
bump.
No, there isn't an automatic way to do it. The only way I know of with base calibre is book-by-book using the tag editor opened in edit metadata (single) or by Shift F2 on Tags in the book list.

If you know python you could do it using a user-defined template function, sorting the tags by name then deleting any that are a prefix of the next one in the list.
chaley is offline   Reply With Quote
Old 09-09-2020, 11:25 AM   #4
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
I'm in the queue for a python book from the library.
droopy is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I bulk-delete a number of selected tags from all books in my library? droopy Library Management 1 08-09-2020 06:24 PM
Hierarchical Tags - See all books in top tag d.r.l Library Management 2 06-20-2020 07:00 AM
Hierarchical Tags elfed Calibre 0 07-18-2019 04:39 AM
Getting hierarchical tags to show up in FBReader? taratears Devices 0 10-29-2016 11:07 AM
Calibre speed and hierarchical tags Noughty Library Management 10 01-24-2013 01:30 PM


All times are GMT -4. The time now is 07:35 AM.


MobileRead.com is a privately owned, operated and funded community.