06-18-2010, 03:22 PM | #1 |
Enthusiast
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.) |
06-18-2010, 03:26 PM | #2 |
creator of calibre
Posts: 44,319
Karma: 23661992
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. |
Advert | |
|
07-19-2010, 01:42 PM | #3 |
Enthusiast
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? |
07-19-2010, 04:06 PM | #4 |
creator of calibre
Posts: 44,319
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Its on the todo list
|
|
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 |