![]() |
#1 |
Head of lunatic asylum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
Fetch news - Date format not optimal
Hallo.
Fetch news imports me several times a week a magazine called Warentest. I see a problem with the dates. Without manual intervention it doesn't list in chronological order due to the date format. Status quo: [mié, 08 jul 2015] - better would be [2015/07/08], [2015.07.08] or [2015-07-08] - or [20150708], possibilities enough! 150708, that's the way I use dates, but maybe isn't altogether so clear. Please change this somehow. Or can I change that somewhere? |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
You can change it to your preferred display format:
calibre User Manual / News / API Documentation for recipes Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Head of lunatic asylum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
Last edited by chaot; 07-14-2015 at 01:47 PM. |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
works for me.
timefmt = ' [%Y-%b-%d, %a]' (see picture below) and timefmt = ' [%Y-%m-%d, %a]' too. Edit: just recognize in your example that there are missing spaces in your code. You need to start at pos. 5 ![]() Last edited by Divingduck; 07-14-2015 at 03:26 PM. |
![]() |
![]() |
![]() |
#5 |
Head of lunatic asylum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
timefmt = ' [%Y-%m-%d]' at position 5 → don't function!? Trying a lot of different figurations, all negativ. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,375
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Using this recipe (the custom one, not the original one): Code:
from calibre.web.feeds.news import BasicNewsRecipe class Warentest(BasicNewsRecipe): title = u'Warentest' language = 'de' timefmt = ' [%Y-%m-%d]' description = 'Stiftung Warentest is a German consumer organisation and foundation involved in investigating and comparing goods and services in an unbiased way' __author__ = 'asdfdsfksd' needs_subscription = False max_articles_per_feed = 100 auto_cleanup = True feeds = [(u'Test', u'http://www.test.de/rss/alles/')] def get_cover_url(self): return 'http://www.test.de/img/pp/logo.png' Be sure you run the customized recipe, not the standard one. |
|
![]() |
![]() |
![]() |
#7 | |
Head of lunatic asylum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
Quote:
Using your recipe for me it doesn't work. ![]() Clicking Show recipe files shows me Warentest_1002.recipe from calibre.web.feeds.news import BasicNewsRecipe class Warentest(BasicNewsRecipe): title = u'Warentest' language = 'de' timefmt = ' [%Y-%m-%d]' description = 'Stiftung Warentest is a German consumer organisation and foundation involved in investigating and comparing goods and services in an unbiased way' __author__ = 'asdfdsfksd' needs_subscription = False max_articles_per_feed = 100 auto_cleanup = True feeds = [(u'Test', u'http://www.test.de/rss/alles/')] def get_cover_url(self): return 'http://www.test.de/img/pp/logo.png' My view! Last edited by chaot; 07-15-2015 at 06:39 AM. |
|
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,375
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I run the recipe using the gui, as shown in the following.
|
![]() |
![]() |
![]() |
#9 |
Head of lunatic asylum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
Now I am also a lucky one!
For completeness, the possibility is mentioned downloading both date formats, if so wanted. One must then activate both, e.g. cross each Schedule for download. Respectively, crossing only ones Schedule for download is the intended procedure to suppress the unwanted date format. Fine! ![]() Last edited by chaot; 08-10-2015 at 07:21 AM. Reason: rephrasing |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to fetch news in AZW3 format? | Eany | Conversion | 9 | 05-28-2018 09:52 PM |
Change date format in fetched news/magazine titles? | truth1ness | Calibre | 6 | 05-27-2015 12:15 PM |
Date In News Titles (Fetch News) | JamboUK | Recipes | 2 | 03-14-2013 10:16 AM |
Fetch News doesn't (fetch news, that is) | DJ Vollkasko | Recipes | 9 | 06-30-2012 03:11 AM |
Fetch news into a specific format? | davotibarna | Calibre | 8 | 01-10-2010 03:52 PM |