View Single Post
Old 12-16-2008, 11:03 AM   #1
mccande
Member
mccande began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Oct 2008
Device: PRS-505
Problem with preprocess_regexps and Unicode

I am preparing a recipe for a Belgian newspaper where I have to replace a styled apostrophe with a simple one (Unicode characters 0x92 and 0x27)

The formula I use is

preprocess_regexps = [
(re.compile(ru'\0092'), lambda match: ru'\u0027')
]

but I cannot get the epub2disk to start. I always receive the standard error message
C:\Documents and Settings\Denis\test>feeds2disk --debug --test libe.py
Traceback (most recent call last):
File "main.py", line 167, in <module>
File "main.py", line 162, in main
File "main.py", line 133, in run_recipe
File "calibre\web\feeds\recipes\__init__.pyo", line 80, in compile_recipe
File "c:\docume~1\denis\locals~1\temp\calibre_0.4.115_s _e8f1_recipes\recipe1.p
y", line 4, in <module>
libe.py
NameError: name 'libe' is not defined

What is wrong with the use of regexp?
mccande is offline   Reply With Quote