Quote:
Originally Posted by timlegge
I have no problem getting that out of the database and setting displaying it. However I am trying to figure out how the collection might be managed. Is it done via tags? The current in demand feature for the Kobo is basically providing a method to remove the books from the I.m reading list without actually reading or page turning to the end.
|
This would best be done with a custom field, but you don't have that option yet.
Yes, I would use a tag. Furthermore, I would use the extended customization option to ask the user which tag to use. You would then set/reset the kobo's im_reading flag (a boolean in the database?) depending on the presence/absence of the flag. You do, of course, need to decide on its polarity: tag present -> im_reading == true, or im_reading == false.
There is some help for this in the standard book and booklist classes. In particular, the standard booklist class has a method get_collections that will check tags, etc, and return a dict {collection:[books]}.
Quote:
I am assuming the automatic management collections (option 3 I believe) would allow users to manage the I'm Reading list from Calibre once I figure our what I need to add to the driver to process the change.
|
Any of the options would. If you use the 'standard' collections mechanism, then the user could modify it directly on the device view. The other two settings would modify it as described in previous posts. It is perhaps worth pointing out that if a kobo user sets the automatic option, calibre will call sync_booklists in your driver. You need to be prepared for that to happen and do the right things.
Regarding collections: one way to get more collections would be to use the author column in the DB. The idea is to make several rows per book. One would have the correct author. The others would put the collection into the author, perhaps prefixed with a special character so they would sort all together. All the rows would point at the same book file.
This is clearly a hack, but it might be a useful one. Problems: deleting one of the books from a collection would delete the only book file. Where the reader is in a book would be associated with the row used to open the book, as would any times/dates. Your driver would need to know to modify the collection entries if a book was resent and changed file paths. There are undoubtedly other problems. Notwithstanding, if I had a Kobo, I would want collections, even if I had to put up with this hack.