Hi,
I have the same problem as PapaJohn. I'm already trying to get the read status in my Calibre for days now.
I have, as described, deleted and tried again many times, waited a day and always rebooted Calibre and it is still displaying "not read".
What am I doing wrong?
Does it work at all with the KPW2
I use the template kindle_read_status_2 with German text.
Kindle PW2 - Calibre 2.10 - OS X 10.9.5
Quote:
def evaluate(self, formatter, kwargs, mi, locals, val, is_read_pct, is_read_str, is_reading_str, no_page_read_str):
try:
test_val = int(is_read_pct)
except:
return 'is_read_pct is not a number'
import re
mg = re.match('.*\s(\d+[-/\.]\d+[-/\.]\d+).*?Zuletzt gelesene Seite: Ort \d+ \((\d+)%\)', val, re.I + re.DOTALL);
if mg is None:
return no_page_read_str
date = mg.group(1)
pct = mg.group(2)
try:
f = int(pct)
if f > test_val:
return is_read_str
elif f > 0:
return is_reading_str + ': ' + pct + '%'
except:
pass
return no_page_read_str
|
pls