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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-24-2011, 01:10 PM   #1
gena0411
Member
gena0411 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Oct 2011
Device: Sony PRS-T1
Custom columns as collections on the T1

Hi,

Sorry if this a general question and not specific to T1.

I am trying to create a custom collection on the device.
There is a custom column called "ToRead" which is of "Yes/No" type.

I would like to have a collection on device called "ToRead" (if "Yes", the book is included).

If customizing field for plugin looks like:
tags, #toread
Then a new collection is created that is called "Yes".
If I try to use template syntax, no new collection is created.
For example, I tried: {#toread:contains(Yes, ToRead,))}

Could somebody help, please?

Thanks,
Genady
gena0411 is offline   Reply With Quote
Old 10-24-2011, 02:25 PM   #2
chaley
"chaley", not "charley"
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: 5,919
Karma: 1673776
Join Date: Jan 2010
Location: France
Device: Many android devices
If this conversation goes on, I will move it to its own thread.

Quote:
Originally Posted by gena0411 View Post
I am trying to create a custom collection on the device.
There is a custom column called "ToRead" which is of "Yes/No" type.

I would like to have a collection on device called "ToRead" (if "Yes", the book is included).

If customizing field for plugin looks like:
tags, #toread
Then a new collection is created that is called "Yes".
Isn't the collection created named "Yes (ToRead)", where ToRead is the column heading for the #toread column? If it is not, and if you haven't messed with the tweak "Specify renaming rules for SONY collections", then much of what is below is wrong.
Quote:
If I try to use template syntax, no new collection is created.
For example, I tried: {#toread:contains(Yes, ToRead,))}
I assume you are putting that in the plugin's customization? That won't work, because the only thing you can put there is the lookup name for a column.

I assume that you don't want to see the collection name "Yes (ToRead)". You have three choices:
  • If seeing "ToRead: Yes" is acceptable, then change the tweak sony_collection_name_template found in "Specify renaming rules for SONY collections":
    Code:
    sony_collection_name_template = '{category:||: }{value}'
    You could also use a template written in general program mode or a custom template function to reformat just values for the #toread column however you wish.
  • create another custom column "made from other columns" containing the your template from above. Make your collection from that. Note that you might want to remove the column name using the renaming rules tweak.
  • Change #toread to a text column. Add an enumeration column (text with a permitted set of values). Permit one value: "To Read". Search for #toread:true, select all books, and use bulk edit to set the new column.
chaley is offline   Reply With Quote
 
Advertisement
Old 10-24-2011, 02:54 PM   #3
gena0411
Member
gena0411 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Oct 2011
Device: Sony PRS-T1
Quote:
Originally Posted by chaley View Post
If this conversation goes on, I will move it to its own thread.

Isn't the collection created named "Yes (ToRead)", where ToRead is the column heading for the #toread column? If it is not, and if you haven't messed with the tweak "Specify renaming rules for SONY collections", then much of what is below is wrong.
I assume you are putting that in the plugin's customization? That won't work, because the only thing you can put there is the lookup name for a column.

I assume that you don't want to see the collection name "Yes (ToRead)". You have three choices:
  • If seeing "ToRead: Yes" is acceptable, then change the tweak sony_collection_name_template found in "Specify renaming rules for SONY collections":
    Code:
    sony_collection_name_template = '{category:||: }{value}'
    You could also use a template written in general program mode or a custom template function to reformat just values for the #toread column however you wish.
  • create another custom column "made from other columns" containing the your template from above. Make your collection from that. Note that you might want to remove the column name using the renaming rules tweak.
  • Change #toread to a text column. Add an enumeration column (text with a permitted set of values). Permit one value: "To Read". Search for #toread:true, select all books, and use bulk edit to set the new column.
Many thanks Chaley.
The collection I see is just "Yes", not "Yes (ToRead)" and I didn't play with any tweaks. I have, indeed, put the statement in the plugin's customization field which you say cannot work.

Your latest suggestion with enumerated column seems the simplest one and the most convenient. I'll try it.

Please tell which thread it should usually be posted to, if I need to ask something next time.

Thanks a lot,
Genady
gena0411 is offline   Reply With Quote
Old 10-24-2011, 03:33 PM   #4
gena0411
Member
gena0411 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Oct 2011
Device: Sony PRS-T1
Quote:
Originally Posted by gena0411 View Post
Many thanks Chaley.
The collection I see is just "Yes", not "Yes (ToRead)" and I didn't play with any tweaks. I have, indeed, put the statement in the plugin's customization field which you say cannot work.

Your latest suggestion with enumerated column seems the simplest one and the most convenient. I'll try it.

Please tell which thread it should usually be posted to, if I need to ask something next time.

Thanks a lot,
Genady
Worked as a charm (enumerated column method).
gena0411 is offline   Reply With Quote
Old 10-24-2011, 03:53 PM   #5
chaley
"chaley", not "charley"
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: 5,919
Karma: 1673776
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by gena0411 View Post
The collection I see is just "Yes", not "Yes (ToRead)" and I didn't play with any tweaks.
That means that something is broken. I will test on my 300 (waiting for it to charge), and if it works there then Kolenka might have some work to do on the T1 driver.
Quote:
Please tell which thread it should usually be posted to, if I need to ask something next time.
Generally new questions should go into a new thread. Only reuse an existing thread if you are reasonably sure that all of the subscribers will be interested in the sub-conversation.
chaley is offline   Reply With Quote
Old 10-24-2011, 04:06 PM   #6
chaley
"chaley", not "charley"
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: 5,919
Karma: 1673776
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by gena0411 View Post
The collection I see is just "Yes", not "Yes (ToRead)"
The renaming tweak is used and "( column name )" is added only if metadata management (preferences -> sending books to devices) is set to automatic. Is yours set to some other value? That would explain it.

BTW: I think that most people who use calibre to manage book metadata use automatic management. Setting it that way causes calibre to update the covers and the device database whenever the device is connected. That way you see new collections and metadata changes. Of course, if you manage your collections by hand, you don't want to use automatic.
chaley is offline   Reply With Quote
Old 10-24-2011, 04:14 PM   #7
gena0411
Member
gena0411 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Oct 2011
Device: Sony PRS-T1
Quote:
Originally Posted by chaley View Post
The renaming tweak is used and "( column name )" is added only if metadata management (preferences -> sending books to devices) is set to automatic. Is yours set to some other value? That would explain it.

BTW: I think that most people who use calibre to manage book metadata use automatic management. Setting it that way causes calibre to update the covers and the device database whenever the device is connected. That way you see new collections and metadata changes. Of course, if you manage your collections by hand, you don't want to use automatic.
Mine is set to "Manual". If one takes his book on vacation or business trip and wants to delete book from "To Read" collection because it's finished, it would be awkward not to be able to do so. If "Automatic" would do the same as it does now but wouldn't lock the editing on device, I would use it.
gena0411 is offline   Reply With Quote
Old 10-24-2011, 04:27 PM   #8
chaley
"chaley", not "charley"
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: 5,919
Karma: 1673776
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by gena0411 View Post
Mine is set to "Manual". If one takes his book on vacation or business trip and wants to delete book from "To Read" collection because it's finished, it would be awkward not to be able to do so. If "Automatic" would do the same as it does now but wouldn't lock the editing on device, I would use it.
Editing isn't locked. You can edit the collections in any way you wish in any way that the device permits. However, if you mean by "locked" that upon connection calibre will restore the collections to match the metadata in the library, then you are correct. That is what automatic management is designed to do.

I have no interest in implementing reverse editing (propagating device edits back to calibre). If someone else wants to do it, and if such propagation is optional, then FWIW I would support it. It wouldn't be a particularly easy feature to build, though.
chaley is offline   Reply With Quote
Old 10-25-2011, 01:48 AM   #9
gena0411
Member
gena0411 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Oct 2011
Device: Sony PRS-T1
Quote:
Originally Posted by chaley View Post
Editing isn't locked. You can edit the collections in any way you wish in any way that the device permits. However, if you mean by "locked" that upon connection calibre will restore the collections to match the metadata in the library, then you are correct. That is what automatic management is designed to do.

I have no interest in implementing reverse editing (propagating device edits back to calibre). If someone else wants to do it, and if such propagation is optional, then FWIW I would support it. It wouldn't be a particularly easy feature to build, though.
That's was my misunderstanding then. Thanks.
Bidirectional sync would be nice but cannot be justified as a request.
gena0411 is offline   Reply With Quote
Old 11-10-2011, 03:37 PM   #10
Ozric
Zealot
Ozric is clearly one to watchOzric is clearly one to watchOzric is clearly one to watchOzric is clearly one to watchOzric is clearly one to watchOzric is clearly one to watchOzric is clearly one to watchOzric is clearly one to watchOzric is clearly one to watchOzric is clearly one to watchOzric is clearly one to watch
 
Posts: 146
Karma: 10671
Join Date: Nov 2007
Device: way too many =)
Hi,

This thread sounds a lot like something I'd like to do with calibre and my T1, but haven't had any success. I've been trying to distill a specific process from the conversation, but all my attempts either result in syntax errors or undesirable name changes to my existing collections.

Would someone mind outlining a series of steps to follow, starting from the beginning--what kind of column to create in calibre, how its fields should be filled out, and including a properly formatted Sony renaming rule?

Hopefully something that still works with this:

sony_collection_renaming_rules = {'#genre': ''}

If it helps, I'm quoting from a post I made elsewhere that explains exactly what I'm hoping to do:

Quote:
In calibre, I would like to have something like a Read? column where I can make a check mark on books I've read. If I send books marked as Read to my Sony, I'd like caliber to automatically populate a new set of Collections that separate the read and unread books. I think it might be possible to use the template language to check if Read? is true, and if it is, use a SONY renaming rule to append (Read) to the genre-based Collection name, creating a new Collection for read books. If something along these lines is possible, would someone mind explaining how to set this up?
Ozric 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
Custom columns question Noughty Library Management 9 10-11-2011 09:46 AM
Custom Columns - How are you using yours? nynaevelan Library Management 19 04-18-2011 01:42 AM
0.7.46 and custom columns meme Library Management 4 02-21-2011 05:21 AM
Managing Custom Columns ddjohn Library Management 3 02-19-2011 11:42 AM
Custom Columns - the Future? Starson17 Calibre 2 07-13-2010 10:56 AM


All times are GMT -4. The time now is 01:13 AM.


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