Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-23-2011, 12:12 PM   #1
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,728
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Early warning: addition of hierarchical user and built-in categories

A number of changes to the tag browser have been committed to trunk. If you manipulate user categories or tag browser items directly, you might be affected.

Change 1: user categories support sub-categories. If you have a category named A, another named A.B, and another named A.C, B and C will appear as subcategories of A. If you are manipulating the db pref 'user_categories', then you probably don't care about this, because the tree view is rebuilt from that dict. You will definitely care if you want to display the item hierarchy.

Change 2: non-user categories can support hierarchies. For example, assume you have a custom col (text mult) named Genre. If you have the following items in that category:
Cooking.French.Classic
Cooking.French.Nouvelle
Mystery.English
Mystery.Thriller
they will display as a tree. The outermost level will contain Cooking and Mystery. Cooking will contain 1 expandable category, French, which contains two leaf nodes.

Hierarchical processing is enabled for individual categories in preferences.look & feel.

You probably will care about this change only if your plugin (or what-have-you) wants to manipulate these items in a similar way. If not, then you can continue to use the full values (as in A.B.C) and the tag browser will deal with displaying the trees.
chaley is offline   Reply With Quote
Old 02-23-2011, 03:50 PM   #2
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,728
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I forgot to mention: db2.get_metadata returns a new attribute: user_categories. It is a dict of lists, containing {user_category:[items]} for items in the category that the book contains.
chaley is offline   Reply With Quote
Advert
Old 02-24-2011, 03:15 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: 11,728
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I changed the names of some tag_browser APIs to be consistent with the slew of new APIs added to support creation, deletion, and renaming of user categories.

In addition, renaming of category items will now automatically rename the items within the user category, which may simplify some things.
chaley is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
0.7.3 - User Categories nynaevelan Library Management 0 02-03-2011 11:51 AM
Hierarchical multilevel tag-stucture of genres? [Request?] laji Calibre 4 11-28-2010 11:49 AM
iPhone iPhone 4 Shipping Early (+ some early reviews as they come in) kjk Apple Devices 17 06-24-2010 04:17 PM
Xpath hierarchical structure mtravellerh Calibre 4 01-03-2009 02:40 PM


All times are GMT -4. The time now is 03:34 PM.


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