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 12-05-2008, 11:34 AM   #1
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: 780
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle PaperWhite, Motorola Xoom
Help with writing recipe

I need to replace some character with another one wherever it shows in the downloaded html page but I'm unable to figure out how to do that using preprocess_regexps.

My idea was something like this:

Code:
preprocess_regexps = [(re.compile(r'Đ'), lambda match: r'Ð')]
This should replace Đ (Latin Capital Letter D With stroke - U+0110) with Ð (Latin Capital Letter Eth - U+00D0)

but it does not work since python complains to the presence of unicode letters in script.

I need this since fonts shipped with PRS-505 do not have first character defined (shows up as empty square) while the other is present and they look the same so it would be adequate replacement for better reading.

Thanks,
kiklop74 is offline   Reply With Quote
Old 12-05-2008, 02:48 PM   #2
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: 26,325
Karma: 5382313
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use u'\u0110' (its the unicode representation of the character)
kovidgoyal is offline   Reply With Quote
Old 12-05-2008, 02:54 PM   #3
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: 780
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle PaperWhite, Motorola Xoom
Quote:
Originally Posted by kovidgoyal View Post
Use u'\u0110' (its the unicode representation of the character)
Great! That was it. Thanks Kovid. I'll now have to update quite a few recipes that will need this
kiklop74 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
What are you currently writing? Dr. Drib Writers' Corner 950 09-13-2012 01:12 AM
Writing with an accent, how do you do it? basilsands Writers' Corner 19 10-03-2010 06:32 AM
Writing Notes MikeKing Sony Reader 33 05-29-2009 04:23 PM
Problems writing recipe kiklop74 Calibre 9 10-28-2008 07:58 PM
Writing to the SD card? Krytes HanLin eBook 3 07-20-2008 09:00 AM


All times are GMT -4. The time now is 12:32 AM.


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