![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
|
![]()
Hi,
I am wondering how I could implement the following. There is a comic site that just updates the image of the day. So they have seven files ma.png di.png wo.png do.png vr.png za.png and zo.png (the short names for the days of the week in dutch). I want to make a recipe to download these files. But I do not have info about the date, and I don't know what day it is when the recipe runs. So I wanted just to keep the files in order (always start with monday). The recipe though needs a date to add an article. How should I build such a recipe? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
why cant you just use today's date?
from datetime import date d = date.today().weekday() |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
|
Sounds logical.
Thanks. But then the next problem, there is no rss. As far as I can see, I can only add articles to an existing feed. (either by parsing a website or using a real rss feed). So I should always start with a basic url right? Or can I just skip the parsing part and add the 7 images in a complete new feed. (Is there a recipe I could use as guide for this?) |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I cant recall any recipe that does that, but the idea is simple, just implement parse index and return the appropriate object from it, as documented in the API documentation. Its up to you whether you want one image per section or one section with one image per article.
|
![]() |
![]() |
![]() |
#5 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
|
Sure, was confused by the name, but parse_index() does not recuire a default url as parameter.
Thanks |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Linking static statically is not just an issue for us. | twobob | Kindle Developer's Corner | 29 | 08-30-2012 11:03 PM |
Content Download a static website to the kindle? | scotter | Amazon Kindle | 1 | 03-07-2011 06:52 PM |
Static screensaver | kindle79 | Amazon Kindle | 2 | 11-17-2010 02:51 PM |
Free Book (Kindle) - The Static of the Spheres | koland | Deals and Resources (No Self-Promotion or Affiliate Links) | 3 | 06-21-2010 06:24 AM |
Static IP grey out | rushkk | enTourage Archive | 1 | 06-04-2010 11:23 AM |