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 07-04-2024, 12:46 AM   #1
garberw
Junior Member
garberw began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2015
Device: none
save expanded tags on exit or some other way

on the left of the calibre window is a list of tags (Authors; Languages; Series; ...). they have little triangles pointing to the right. when you click on the triangle the tag expands to show tags subsidiary to that tag (subcategories).
those have further subcategories/tags.

THE QUESTION: is there some way to set a default for which tags are expanded. For example when you exit calibre and restart it could calibre
return to the previous state?

If this is not already possible could someone please add it?
or give me a hint how to do it myself?
thank you :-)
garberw is offline   Reply With Quote
Old 07-04-2024, 01:07 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: 45,316
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
IIRC there is nothing in base calibre to do this. Though check the view manager plugin it might allow you to do it already or if not, is probably the right place to add such functionality.

Things lie the current search and virtual library and tag browser state are deliberately not restored in base calibre.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-14-2024, 02:39 PM   #3
jtmart
Member
jtmart began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2021
Device: Boox Note Air
Question

Thanks Kovid, out of curiosity I checked out the (otherwise terrific) "View Manager" plugin but I could not find a way to automatically expand the tags in "Tag Browser"...@kiwidude can you confirm?
jtmart is offline   Reply With Quote
Old 12-14-2024, 03:58 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,706
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by jtmart View Post
Thanks Kovid, out of curiosity I checked out the (otherwise terrific) "View Manager" plugin but I could not find a way to automatically expand the tags in "Tag Browser"...@kiwidude can you confirm?
If you post your question in the View Manager plugin thread I am sure you'll get a response from @kiwidude.

That said, View Manager (VM) does not have any interaction with the Tag Browser (TB) that I'm aware of, so I doubt it can offer a solution. I use VM extensively across several libraries, and I normally have the TB hidden.

I'm not aware of any plugins that offer any customisation of the TB, everything is done either in the TB itself, or in Preferences->Look & feel->Tag browser. At a surface level, a Preserve category expansion checkbox in L&F->TB->Display would do the trick. @chaley may have some ideas, he does most of the changes in this regard.

BR
BetterRed is offline   Reply With Quote
Old 12-14-2024, 10:36 PM   #5
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,728
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
No the functionality doesn't exist in any of my plugins, the closest to it in terms of code required is the User Category plugin which has the code to view/expand a node in the tag browser.

It's not a feature of personal interest/use nor have I seen it requested so it isn't something I am rushing to add to the View Manager plugin. If someone else wants to submit a patch or indeed as BetterRed suggested incorporate into the tag browser options within calibre itself then those are your more likely options at this point.

Last edited by kiwidude; 12-14-2024 at 10:40 PM.
kiwidude is offline   Reply With Quote
Advert
Old 12-15-2024, 09:59 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: 12,412
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
For several reasons I am not willing to add restoring the expanded/collapsed state of the entire tree. The major reason is that I personally have no use for it and don't want to deal with the inevitable maintenance, complaints, change requests, and bug reports. The second reason is that performance would likely be awful.

However, I could add an option in L&F to restore the visibility of the currently focused item in the TB, which is the last item expanded, collapsed, or clicked upon. Of course, the expansion depends on the item still being there. Let me know if this is of use.
chaley is offline   Reply With Quote
Old 12-16-2024, 01:24 AM   #7
jtmart
Member
jtmart began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2021
Device: Boox Note Air
What @chaley suggests, i.e. to add an option in L&F to restore visibility of the last expanded sub-node, seems to me absolutely ideal. I would definitely find that useful, and while this feature might not have been requested much, I am sure it will find its public. Thanks @chaley, @kovidgoyal and @kiwidude!
jtmart is offline   Reply With Quote
Old 12-16-2024, 02:30 AM   #8
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
I would also find it useful. I have a list of "Saved Searches" that I expand each time I start up Calibre, so that setting would be ideal.

Thank you @chaley
Karellen is offline   Reply With Quote
Old 12-16-2024, 07:56 AM   #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: 12,412
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I submitted the changes. I will add a post if and when Kovid accepts them into calibre source.

Prefs / Look & feel / Tag browser contains the new option, unchecked by default.
Click image for larger version

Name:	Clipboard01.jpg
Views:	109
Size:	176.8 KB
ID:	212518

The implementation provides an API for plugins.

To get the current expanded item:
Code:
	tbw = gui.tb_widget
	state = tbw.get_expansion_state()
To set the current expansion state using a previously retrieved state:
Code:
	tbw = gui.tb_widget
	tbw.restore_expansion_state(state)
chaley is offline   Reply With Quote
Old 12-16-2024, 09:37 AM   #10
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,412
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The changes are now in calibre source.
chaley is offline   Reply With Quote
Old 12-20-2024, 11:01 AM   #11
jtmart
Member
jtmart began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2021
Device: Boox Note Air
Thanks a tonne @chaley, the option works like a charm (although the node of the expanded item appears at the top of the Tag browser list, hence hiding the non-expanded items above it) !
jtmart is offline   Reply With Quote
Old 12-20-2024, 11:20 AM   #12
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,412
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by jtmart View Post
Thanks a tonne @chaley, the option works like a charm (although the node of the expanded item appears at the top of the Tag browser list, hence hiding the non-expanded items above it) !
You're welcome.

Qt scrolls the tree until the selected item is visible, preferring to place that item as close to the center of the widget as it can. Which item is at the top of the screen comes from that. There's no guarantee that it is a top level node.
chaley is offline   Reply With Quote
Old 12-23-2024, 03:30 AM   #13
jtmart
Member
jtmart began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2021
Device: Boox Note Air
Right!
jtmart is offline   Reply With Quote
Reply

Tags
tags list


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dragging a book into an expanded Hierarchy level collapse other expanded levels ChrisMillward Calibre 3 07-04-2020 06:02 AM
How can I save all my tags to a file, and how can another macOS Calibre user it? adrianf Calibre 17 03-15-2020 07:05 PM
Sigil adding unwanted tags on Save Chaihana Joe Sigil 5 12-09-2019 03:28 PM
Remove tags and rating from save-to-disk Sparkling Calibre 5 01-10-2011 03:23 AM
Save to disk and Tags tselling Calibre 2 08-30-2009 09:05 PM


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


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