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, 03: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, 03: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: 43,778
Karma: 22666666
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
Advert
Old 07-19-2010, 01: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, 04: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: 43,778
Karma: 22666666
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 09:20 AM
Up-to-date candy teacher (date being 1921) kacir Deals and Resources (No Self-Promotion or Affiliate Links) 0 06-16-2010 04:18 PM
Science Fiction Swigart, Rob: Portal A Dataspace Retrieval. V1.1. 16 May 2009 MrBunwah BBeB/LRF Books 0 01-25-2009 10:06 AM
new official shipping date / US invitation date R2D2 iRex 18 07-06-2006 02:32 PM
Web2Mail Lite: Email retrieval through the Web Alexander Turcic Lounge 3 01-26-2004 08:21 AM


All times are GMT -4. The time now is 10:05 AM.


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