View Single Post
Old 11-17-2010, 03:39 PM   #25
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by obiwan View Post
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.

Last edited by Starson17; 11-17-2010 at 04:09 PM.
Starson17 is offline   Reply With Quote