Quote:
Originally Posted by obiwan
Ah well... I'm Java / c# developer. Out of curiosity I downloaded sources and it seems python is... well... different 8~(
Anyway, I see fetching is done in web/fetcher. Could you point me in the direction where this feature should be implemented?
I'm not promising anything, but I am a dev who really wants this feature :P
|
calibre/web/feeds/news.py is where I'd probably start.
Perhaps calibre/web/feeds/feedparser.py as well. One of your first questions will be where to store info for whatever kind of comparison you want to do.
This is how I stored the last time a recipe of "recipe_name" ran and the URL of an article retrieved on that run:
Code:
url = last_downloaded_article_url
now = datetime.datetime.now()
dynamic['recipe_name']['last_time'] = now
dynamic['recipe_name']['last_url'] = url
You retrieve it with:
Code:
last_time_this_recipe_ran = dynamic['recipe_name']['last_time']
Have fun.
Edit:
You may need to import pickle and open/load dynamic.pickle, which is where this sort of recipe related history seems to be kept.