View Single Post
Old 02-08-2011, 04:59 AM   #36
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,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by JvdW View Post
Hi Kiwidude,

First of all thanks for you currently slew of plugins, nice work!.
Thanks!
Quote:
As the title suggests a plugin which would do that would be great for some people. Saw a question in the Frequently Asked Questions thread by ArmorDog and quite liked the idea.

Question was:
--
Is there a way to flag books to transfer when the reader is next connected?

Often, when working in Calibre, I don't have my reader hooked up. When I finish fixing up a book, I'd like to flag it to be copied to the reader when it's next connected.
--

I used something like it while I downloaded the NRC epub using a script and used a bit of python code to set the News flag for the imported epub. This has the effect that on next connect of my reader it was automatically sent to it.
This is the relevant line:
Code:
calibre-debug -c "from calibre.library import db; db=db(); from calibre.utils.config import prefs; ids = db.prefs.get('news_to_be_synced', []); ids.append(%id%); db.prefs.set('news_to_be_synced', ids)"
Where %id% is the id of the book that you want flagged.
That sounds a cool idea. A question - when you sync a book to your device in this way, is it the same result as if you were to choose send to device in terms of it applying save template and metabooks? (I've never used news myself).

Pretty trivial to code up assuming I am thinking the same as you about what it needs to do. Presumably you just want a menu with suboptions allowing you to add a book to the news sync list, and another to remove from it? The only "difficult" part I see is coming up with sexy names for the menu items/plugin and the icons .

Is there any configuration required for the plugin? e.g. is this a plugin that needs to have keyboard shortcuts or is its use infrequent enough that a context menu/toolbar action menu is sufficient?
Quote:
Might have a try at it myself but you're free to grab the idea and beat me to it
If you want I could knock this up pretty quickly, up to you. I've got a long todo list but I happily sidetrack myself with small projects like this that only take an hour or two to let the "hard stuff" percolate in the background. I'm only doing this for fun after all...
kiwidude is online now   Reply With Quote