Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-23-2008, 06:21 AM   #1
Roger Wilmut
Roger Wilmut
Roger Wilmut began at the beginning.
 
Posts: 18
Karma: 16
Join Date: Nov 2008
Location: London, UK
Device: Sony PRS505
Dates in Russian (?)

Fetching a custom feed from 'The Observer' newspaper - which worked normally before - produces this interesting result in the latest version of calibre:

and
Roger Wilmut is offline   Reply With Quote
Old 11-23-2008, 10:52 AM   #2
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by Roger Wilmut View Post
Fetching a custom feed from 'The Observer' newspaper - which worked normally before - produces this interesting result in the latest version of calibre:

and
Hmm these are actually dates in Serbian (cyrillic). I wonder if that has anything to do with my latest set of recipes and use of setlocale.

Kovid?

Last edited by kiklop74; 11-23-2008 at 10:55 AM.
kiklop74 is offline   Reply With Quote
Advert
Old 11-23-2008, 11:36 AM   #3
Roger Wilmut
Roger Wilmut
Roger Wilmut began at the beginning.
 
Posts: 18
Karma: 16
Join Date: Nov 2008
Location: London, UK
Device: Sony PRS505
Quote:
Originally Posted by kiklop74 View Post
Hmm these are actually dates in Serbian (cyrillic). I wonder if that has anything to do with my latest set of recipes and use of setlocale.
Serbian! I might add that I have English specified in the settings.

Last edited by Roger Wilmut; 11-23-2008 at 11:38 AM.
Roger Wilmut is offline   Reply With Quote
Old 11-23-2008, 03:03 PM   #4
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by Roger Wilmut View Post
Serbian! I might add that I have English specified in the settings.
Do you by any chance use linux or mac?
kiklop74 is offline   Reply With Quote
Old 11-23-2008, 05:08 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by kiklop74 View Post
Hmm these are actually dates in Serbian (cyrillic). I wonder if that has anything to do with my latest set of recipes and use of setlocale.

Kovid?
Yeah that would be it. I'm disabling the locale settings in those recipes. One way to acheive what you want is to overload the download function in the recipe, something like this:

Code:
def download(self, *args, **kwargs):
  self.timefmt = 'set this to a lcoalized string'
  return BasicNewsRecipe.download(self, *args, **kwargs)
kovidgoyal is offline   Reply With Quote
Advert
Old 11-23-2008, 06:11 PM   #6
Roger Wilmut
Roger Wilmut
Roger Wilmut began at the beginning.
 
Posts: 18
Karma: 16
Join Date: Nov 2008
Location: London, UK
Device: Sony PRS505
Quote:
Originally Posted by kiklop74 View Post
Do you by any chance use linux or mac?
Yes, a Mac (Leopard). I didn't use any recipe, just put the Observer's feeds URL in and set the number of days. A week ago it worked fine: today after the upgrade to the new version of Calibre it had the result you saw. Not a disaster as the actual text was fine.
Roger Wilmut is offline   Reply With Quote
Old 11-23-2008, 06:56 PM   #7
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by kovidgoyal View Post
Yeah that would be it. I'm disabling the locale settings in those recipes. One way to acheive what you want is to overload the download function in the recipe, something like this:

Code:
def download(self, *args, **kwargs):
  self.timefmt = 'set this to a lcoalized string'
  return BasicNewsRecipe.download(self, *args, **kwargs)
That does not resolve the issue since the problem is not the format but the actual localized values of days in week and months.

I'm not that fluent with python but is there something like constructor/destructor in python class? Because if there is I would be able to modify the class to set locale on construction and revert it to the original one in destructor.
kiklop74 is offline   Reply With Quote
Old 11-23-2008, 08:42 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can set timefmt to the actual day and month in serbian, rather than a format string
kovidgoyal is offline   Reply With Quote
Old 11-24-2008, 06:11 AM   #9
Roger Wilmut
Roger Wilmut
Roger Wilmut began at the beginning.
 
Posts: 18
Karma: 16
Join Date: Nov 2008
Location: London, UK
Device: Sony PRS505
I tried this with the New York Times news feed which is already in Calibre, and got the same result: dates in Serbian. I previously tried the Observer in the prior version of Calibre, which was OK, and then in the latest version - again, dates in Serbian. Calibre is set to English. There doesn't appear to be anything I can do to alter this - is it in effect a bug which needs fixing? (I'm using Calibre on Macs with Tiger and Leopard).
Roger Wilmut is offline   Reply With Quote
Old 11-24-2008, 02:29 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yeah this will be fixed in the next release.
kovidgoyal is offline   Reply With Quote
Old 11-24-2008, 06:22 PM   #11
Roger Wilmut
Roger Wilmut
Roger Wilmut began at the beginning.
 
Posts: 18
Karma: 16
Join Date: Nov 2008
Location: London, UK
Device: Sony PRS505
Quote:
Originally Posted by kovidgoyal View Post
Yeah this will be fixed in the next release.
Thank you (not that I have anything against the Serbs, you understand)(Serbia right )
Roger Wilmut is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle3 Order Cut-Off Dates Tuba Amazon Kindle 21 09-06-2010 11:03 PM
Article Dates with parse_index EnergyLens Calibre 6 04-21-2010 10:13 PM
How to search for dates (published or entered)? Starson17 Calibre 29 04-10-2010 11:03 PM
Kindle 2 Shipping Dates Cutestory Amazon Kindle 29 02-13-2009 11:30 AM
HanLin Russian review in Russian TadW HanLin eBook 3 05-23-2006 03:32 AM


All times are GMT -4. The time now is 10:12 PM.


MobileRead.com is a privately owned, operated and funded community.