View Single Post
Old 10-22-2009, 09:43 AM   #15
JvdW
Zealot
JvdW doesn't litterJvdW doesn't litter
 
Posts: 115
Karma: 150
Join Date: Jul 2008
Location: Netherlands Veenendaal
Device: Palm T5, Sony PRS-505, Nook Color
Quote:
Originally Posted by cdecaf View Post
Hi, I had a similar problem recently. (see https://www.mobileread.com/forums/showthread.php?t=59282 )

My problem was the regexp editor doesn't show you the text the regex acts on.

Try something like:
Code:
(?ism)<a href="http://www.abbyy.com/buy"><b>(\w|\s)*</b></a>(<br>)?
Calibre 0.6.19 does show you the correct text whether from an epub file or in my case from a pdf.
Problem that I have right now is that it doesn't highlight the text which the regexp works on. The regexp does work when I convert the pdf to epub

I wanted to show what is displayed and what I think should happen but now I'm getting an error:
Code:
ERROR: ERROR: Unhandled exception: <b>WindowsError</b>:[Error 6] The handle is invalid

Traceback (most recent call last):
  File "site-packages\calibre\gui2\convert\regex_builder.py", line 101, in button_clicked
  File "site-packages\calibre\gui2\convert\regex_builder.py", line 90, in open_book
  File "site-packages\calibre\ebooks\oeb\iterator.py", line 141, in __enter__
  File "site-packages\calibre\customize\conversion.py", line 208, in __call__
  File "site-packages\calibre\ebooks\pdf\input.py", line 33, in convert
  File "site-packages\calibre\ebooks\pdf\pdftohtml.py", line 49, in pdftohtml
  File "subprocess.py", line 614, in __init__
  File "subprocess.py", line 735, in _get_handles
  File "subprocess.py", line 761, in _make_inheritable
WindowsError: [Error 6] The handle is invalid
I'll see what I can do when I'm at home tonight.

Regards,

Joop
JvdW is offline   Reply With Quote