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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-18-2010, 04:22 PM   #1
mh445
Enthusiast
mh445 began at the beginning.
 
Posts: 46
Karma: 10
Join Date: Mar 2010
Device: none
Recipe - save some date for later retrieval

Hi!

Is it possible to save some data from inside a recipe.

I need this to save the last article id that the recipe downloaded. So the next time the recipe is started, it can only download new articles.

(This should be such an often needed feature, it should be incorporated into Calibre instead of me including it in every custom recipe.)
mh445 is offline   Reply With Quote
Old 06-18-2010, 04:26 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,430
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can do pretty much anything you like in a custom recipe. If you want to know what the calibre config directory is, use:

from calibre.utils.config import config_dir

As for making it a general calibre feature it's not so easy. The problem is finding a unique identifier for articles that is guaranteed to be unique for ever. No single solution is going to work across all feeds/recipes.
kovidgoyal is offline   Reply With Quote
Old 07-19-2010, 02:42 PM   #3
mh445
Enthusiast
mh445 began at the beginning.
 
Posts: 46
Karma: 10
Join Date: Mar 2010
Device: none
Regarding the general calibre feature, the following would work for quite a lot of recipies. Feed recipies create a list of URLs that they then fetch. One could then add an option to the recipe "dont fetch articles already fetched" together with an option whether the newest URLs are at the top or at the end of the list.

Calibre then always stores the newest URL it has fetched. It always stops going through the list when it would fetch the URL it remembered to be the newest in the last execution of the recipe.

Does that sound sensible?
mh445 is offline   Reply With Quote
Old 07-19-2010, 05:06 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,430
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Its on the todo list
kovidgoyal 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
recipe to pull web page similar to 'print/save as pdf' JPD Recipes 15 09-29-2010 10:20 AM
Up-to-date candy teacher (date being 1921) kacir Deals, Freebies, and Resources (No Self-Promotion) 0 06-16-2010 05:18 PM
Science Fiction Swigart, Rob: Portal A Dataspace Retrieval. V1.1. 16 May 2009 MrBunwah BBeB/LRF Books 0 01-25-2009 11:06 AM
new official shipping date / US invitation date R2D2 iRex 18 07-06-2006 03:32 PM
Web2Mail Lite: Email retrieval through the Web Alexander Turcic Lounge 3 01-26-2004 09:21 AM


All times are GMT -4. The time now is 08:55 PM.


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