Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 01-27-2023, 01:15 AM   #1
FandomWitch
Member
FandomWitch began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Jan 2023
Device: none
Alter TagBrowser count

Is it possible to use a plugin to alter the count of books in the tag browser based on the selected tags? For example, if I selected Romance the rest of the tags in the browser would update to show the count of those with the Romance tag. Basically, I like the way Archive of Our Own's filtering system updates with the counts and was wondering if it was possible to replicate it in Calibre.
FandomWitch is offline   Reply With Quote
Old 01-27-2023, 01:17 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,017
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Create a vritual library with the expression tags:=romance

then when you apply the virtual library, the tag browser will show data only from books in that virtual library
kovidgoyal is offline   Reply With Quote
Advert
Old 01-27-2023, 01:20 AM   #3
FandomWitch
Member
FandomWitch began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Jan 2023
Device: none
I have done this for the biggest searches, but if I do that with all the searches that would be A LOT of VLs. Also, I thought this would be a fun project to work on. If not possible just let me know.
FandomWitch is offline   Reply With Quote
Old 01-27-2023, 01:25 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,017
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
plugins dont have any way to hook into clicks on the tag browser (without major hackery) so no, its not possible from a plugin.
kovidgoyal is offline   Reply With Quote
Old 01-27-2023, 01:26 AM   #5
FandomWitch
Member
FandomWitch began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Jan 2023
Device: none
okay thank you for letting me know
FandomWitch is offline   Reply With Quote
Advert
Old 01-27-2023, 04:53 AM   #6
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: 11,788
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
You might get close to what you want using calibre's "Additional restrictions". These create an unnamed VL based on the current search or a saved search. For example:
  • Search for tags:=whatever
  • Click the Virtual library button
  • Click "Additional restriction"
  • Choose "Current search"
The tag browser will show the information for the books matched by the search.

Change it to "None" to reset it back.

EDIT: a plugin can set the additional restriction. The View manager plugin does it. For example, a plugin could offer keyboard shortcuts to set it to current search or to clear it, saving a few clicks.

EDIT2: you could also do this with the Action chains plugin, with an action that runs Python code to set/clear the additional restriction.

Last edited by chaley; 01-27-2023 at 05:59 AM.
chaley is offline   Reply With Quote
Old 01-27-2023, 07:56 AM   #7
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: 11,788
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Edit 3: but as a new post. The virtual library button has a menu item that creates a "real" unnamed VL without using the additional restriction. It shows the search string in the "All Books" tab. Creating the unnamed VL has a shortcut: Ctrl + *.

One problem: the shortcut doesn't clear the unnamed VL if the search box is empty. I will fix that.

Last edited by chaley; 01-29-2023 at 05:32 PM. Reason: edits for clarity
chaley is offline   Reply With Quote
Old 01-29-2023, 05:26 PM   #8
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: 8,841
Karma: 62032373
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
If you don't need it to be permanent, marked:true VL may work. Then mark the books you want to separate off. They'll reset upon a restart though.
ownedbycats is offline   Reply With Quote
Old 01-29-2023, 05:30 PM   #9
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: 11,788
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
I use a marked:true VL and mark books instead of constantly creating and deleting VLs based on searches.
The technique I suggested doesn't require creating and deleting VLs. Instead the books of interest (the search) create an unnamed VL. With the change I made (and @kovid accepted), creating an unnamed VL with the search box empty removed that VL.

That said, your solution works. As long as nothing else such as find duplicates is marking books.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Count and Page Count? CrossReach Library Management 2 07-19-2018 05:44 PM
How to alter the margins on a Kindle JollyRoger Devices 1 02-06-2017 06:25 PM
How do you alter the TimeOut? Beamer Smith Recipes 4 04-30-2016 04:17 PM
How do you alter the line spacing? Lynx-lynx Sony Reader 3 12-12-2012 03:55 AM
Can't alter 'Now Reading' List shelmed Kobo Reader 7 08-24-2010 07:36 AM


All times are GMT -4. The time now is 02:24 AM.


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