View Single Post
Old 02-19-2012, 02:13 AM   #250
pchrist7
Addict
pchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animals
 
pchrist7's Avatar
 
Posts: 385
Karma: 6514
Join Date: Aug 2010
Location: Denmark
Device: Kindle 3 3G+Wifi, Oasis
German version - kindle_read_status_2

Quote:
Originally Posted by FMarkus View Post
Hello,
I have an issue with the read status in calibre.
I use a Kindle4 and installed the python script and added the column as described in the post from pchrist7. (I uses the kindle_read_status_2)

The reading status is shown in the Meta Preview (pic1) but the custom column only shows not read (pic2).

I used following template for the column:
{comments:kindle_read_status_2(90,Read,Reading,Not Read)}

For my understanding the custom column must show read (or the %) but it shows only Not Read

Edit:
Could it be possible that the python script only checks the english version?
What needs to be changed to match the german language? (17.02.2012
Zuletzt gelesene Seite: Ort 3051 (99%)
Hi Markus
Yes, the examples only works for english status text.
However, here's a German version that should work, at least it does here, using your example. You'll have to modify the template.
Make a copy of the line mg = rematch etc., and insert it below the original line.
Disable the original by entering a # sign at the front
Modify the copy line (or copy from the code below) to handle german text.
Please be carefull you have a TAB in front of the copy line.

Code:
#	mg = re.match('.*\s(\d+[-/]\d+[-/]\d+).*?Last Page Read: Location \d+ \((\d+)%\)', val, re.I + re.DOTALL);
	mg = re.match('.*\s(\d+[-/\.]\d+[-/\.]\d+).*?Zuletzt gelesene Seite: Ort \d+ \((\d+)%\)', val, re.I + re.DOTALL);
Edit: Remember to restart Calibre
Hope this works for you,
Cheers Per

Last edited by pchrist7; 02-19-2012 at 02:17 AM. Reason: typos
pchrist7 is offline   Reply With Quote