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-25-2012, 09:59 AM   #1
femgeek
Junior Member
femgeek began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jun 2011
Location: Edinburgh, United Kingdom
Device: Sony PRS-600
Plugboards help & Updating metadata from device to Library

I'm hoping someone here can help me out with these two questions, or at least point me in the right direction, because I'm feeling a little lost. (Or just tell me if I'm trying to do something impossible again.)

1. When transferring metadata from Calibre to my Sony T1 Reader, the tags get "converted" to collections, obviously. What I'm trying to is prefix the collection names with the tag's (user or predefined) category (and sub-category, if applicable).

So, for example, if a book is tagged "Adventure", which is under the User Category "Genre", I want it to be part of the collection "Genre: Adventure; all the books that are part of the Dark Tower series in Calibre should be in a "Series: The Dark Tower" collection on the reader, etc.

I know (or at least I'm pretty sure) that this should be done with plugboards, but I'm lost as to how to go about this, and google doesn't seem to be cooperating today. Help?

2. How do I "re-convert", so to speak, Collections "back" to tags for books already in the Library, and is it possible to do this selectively (either manually for certain books, or (automatically?) for certain collections?

I have three collections on the reader to keep track of which books I've already read (as in, finished, as opposed to just opened), which I'm currently reading (which might be several), and which I'm planning to read next, and I usually "move" books from one collection to the other on the reader itself. Is there a way to make Calibre "import" these changes, or do I need to add/remove these tags manually? (This is the part I suspect may not be possible, but I figured I'd ask.)

Thanks for any help, folks, and my apologies for rambling.
femgeek is offline   Reply With Quote
Old 07-25-2012, 11:08 AM   #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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Sorry, I am confused about what you are doing. When you say "User Category", what do you mean? Is that a custom column, or really a user-defined category in the tag browser? What is a sub-category?

If:
- genre is a custom column (assume the lookup name is #genre)
- the column name is the "category",
- the column value is the sub-category,
- you use automatic metadata management (good idea with the T1)
then the tweak "Specify renaming rules for SONY collections" will solve your problem. In this example I assume that you have changed your T1 setup to build categories from series and #genre, but not from tags. Set the tweaks as follows:
Code:
sony_collection_renaming_rules = {'series':'Series'}
sony_collection_name_template = '{category:||: }{value}'
The first tweak tells calibre to use the category name 'Series' for the series column. The category name of a standard field is normally empty. The second tweak puts the category name in front of the category value, separated by a colon.

Regarding importing collections back from the device, there is no way to do that.
chaley is offline   Reply With Quote
Old 07-25-2012, 11:43 AM   #3
femgeek
Junior Member
femgeek began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jun 2011
Location: Edinburgh, United Kingdom
Device: Sony PRS-600
Quote:
Originally Posted by chaley View Post
Sorry, I am confused about what you are doing. When you say "User Category", what do you mean? Is that a custom column, or really a user-defined category in the tag browser? What is a sub-category?
I mean a user-defined category in the tag browser, yes. For user-defined categories, it's possible to have hierarchical categories, e.g. I could have a category "Authors", with a subcategory "British", and then tags for each British author. Ideally, I'd like those to appear on the Reader as collections "Authors: British: [author name]".

Does that make more/any sense?

... Okay, running into additional problems, now. Augh.

The example you gave should work for predefined categories like Series or Languages ... except I just tried it, and it does nothing. o_O I even tried c&ping the example used in the help section (the last one -- as in, the last two lines, basically), applied, restarted, checked that the tweak is still there, tried to transfer a book, and nada. the series is just a collection "Test Series", rather than "Series: Test Series", which it should be. Could I be missing something? o_O

Quote:
Regarding importing collections back from the device, there is no way to do that.
Bugger, that's what I thought. Oh well, I'll just do that manually in Calibre, then. It's only a few books a week, after all. Thanks for confirming my suspicions!
femgeek is offline   Reply With Quote
Old 07-25-2012, 12:03 PM   #4
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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by femgeek View Post
I mean a user-defined category in the tag browser, yes. For user-defined categories, it's possible to have hierarchical categories, e.g. I could have a category "Authors", with a subcategory "British", and then tags for each British author. Ideally, I'd like those to appear on the Reader as collections "Authors: British: [author name]".

Does that make more/any sense?
Yes, but ...

User defined categories aren't real metadata. They are useful for organizing within calibre, but cannot be generally used as metadata items.

I think that what you want to do is use hierarchical categories. See this tutorial for an example. If you set up a multi-level genre column matching your example, then with some template magic you can get these to build collection the way you want. Jumping way ahead, the tweak sony_collection_name_template would be defined as:
Code:
sony_collection_name_template = '{value:'re($, '\.', ': ')'}'
This replaces every period in the hierarchical item with a colon followed by a space.
Quote:
... Okay, running into additional problems, now. Augh.

The example you gave should work for predefined categories like Series or Languages ... except I just tried it, and it does nothing. o_O
Probably you have not turned on automatic metadata management. Go to preferences -> sending books to devices and check what is in the "Metadata management" box. Note: if you change this box, calibre will take total control of your collections. All your personally-defined collections will be nuked. Be sure that you have set up those collections in calibre before changing this box.

The advantage of using auto management is that your collections are updated from current metadata every time you connect your device to calibre. Edit some metadata, connect the device, and voila. This is really very convenient, especially when you are still experimenting with a system.
chaley is offline   Reply With Quote
Old 07-25-2012, 12:21 PM   #5
femgeek
Junior Member
femgeek began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jun 2011
Location: Edinburgh, United Kingdom
Device: Sony PRS-600
Quote:
Originally Posted by chaley View Post
I think that what you want to do is use hierarchical categories.
After a look at the tutorial you linked, this is in fact exactly what I want. Many, many thanks! Now I just have to change all the tags to columns. (A project! Yaye!)

Quote:
Probably you have not turned on automatic metadata management.
Yup, there we go. I'd switched it to "Only on send" to minimise the amount of metadata being sent over every time I made a tweak, then promptly forgot I'd done so. I think I need more coffee. (Or possible less.)

Thanks again for your help!
femgeek is offline   Reply With Quote
Old 07-25-2012, 05:40 PM   #6
femgeek
Junior Member
femgeek began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jun 2011
Location: Edinburgh, United Kingdom
Device: Sony PRS-600
Yay, it worked! Minor note for anyone finding this thread later, you want:

Code:
sony_collection_name_template = '{category:||: }{value:re(\\.,: )}'
(The version with the single quotes throws up a syntax error.)
femgeek is offline   Reply With Quote
Old 07-26-2012, 02:05 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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by femgeek View Post
Yay, it worked! Minor note for anyone finding this thread later, you want:

Code:
sony_collection_name_template = '{category:||: }{value:re(\\.,: )}'
(The version with the single quotes throws up a syntax error.)
Ahh, silly me. I should have used double quotes to surround the template.
Code:
sony_collection_name_template = "{value:'re($, '\.', ': ')'}"
I prefer template program mode over single function mode because it is clearer what the values of the parameters are. But no never mind -- it is good you have something working.
chaley is offline   Reply With Quote
Reply

Tags
calibre, sony reader, user categories


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
emailing books and 'On Device' / series / metadata plugboards affa Library Management 10 06-18-2012 12:45 AM
Metadata Plugboards and send to Storage Card A ejacevich Devices 0 05-25-2011 11:10 AM
Metadata Plugboards and "On Device" kranu Library Management 2 04-10-2011 01:37 AM
DR800 updating metadata externally Mr. X iRex 7 04-10-2010 12:14 PM
Send to Device & Metadata Bob Butler Calibre 18 02-22-2009 09:33 PM


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


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