|
|
#1 |
|
Member
![]() Posts: 21
Karma: 10
Join Date: Oct 2014
Device: Android
|
Why does this work:
Code:
def populate_article_metadata(self, article, soup, first):
article.title='Hello'
Code:
def populate_article_metadata(self, article, soup, first):
article.date = '1/25/2014'
|
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You dont pass in a string date, you pass in a parsed time struct.
Use import time article.date = time.strftime(...) EDIT: And IIRC to change the actual displayed date, you set formatted_date, not date (date is used internally to expire old articles and so on). And formatted date accepts a unicode string. Last edited by kovidgoyal; 11-12-2014 at 10:41 PM. |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Member
![]() Posts: 21
Karma: 10
Join Date: Oct 2014
Device: Android
|
Ah, thanks -- that will help a lot.
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Update Read date from companion to Calibre | Wirrel | Calibre Companion | 1 | 09-08-2013 09:25 PM |
| How to update metadata information from excel (Publication Date,Tags) | mahaveer | Calibre | 3 | 09-26-2011 01:55 PM |
| Help for populate_article_metadata | ajmoraal | Recipes | 10 | 11-16-2010 05:24 PM |
| Bulk Changing Published Date To Date | hmf | Calibre | 4 | 10-19-2010 11:19 PM |
| Up-to-date candy teacher (date being 1921) | kacir | Deals and Resources (No Self-Promotion or Affiliate Links) | 0 | 06-16-2010 05:18 PM |