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, 10: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: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
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, 01: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: 43,749
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use u'\u0110' (its the unicode representation of the character)
kovidgoyal is online now   Reply With Quote
Advert
Old 12-05-2008, 01: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: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
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 948 09-13-2012 12:12 AM
Writing with an accent, how do you do it? basilsands Writers' Corner 19 10-03-2010 05:32 AM
Writing Notes MikeKing Sony Reader 33 05-29-2009 03:23 PM
Problems writing recipe kiklop74 Calibre 9 10-28-2008 06:58 PM
Writing to the SD card? Krytes HanLin eBook 3 07-20-2008 08:00 AM


All times are GMT -4. The time now is 07:42 AM.


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