View Single Post
Old 03-01-2011, 10:39 AM   #9
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
Aha - think I found it

Quote:
Originally Posted by PapaJohn View Post
Hi pchrist7
Thanks for your response.

02/22/11
Last Page Read: Location 6736 (99%)
Hi again
Your K only gives 2 digits for the year, and the python template looks for 4.
So you need to change you python template. In Calibre choose Preferences, Template Functions, In the function field, scroll till you find kindle_read_status_2 and choose that.
In the Program code window, go to the line:
Code:
mg = re.match('.*\s(\d+[-/]\d+[-/]\d\d\d\d).*?Last Page Read: Location \d+ \((\d+)%\)', val, re.I + re.DOTALL);
See the 4 \d in bold above ? We have to change this to 1 \d+
This line you can change to:
Code:
mg = re.match('.*\s(\d+[-/]\d+[-/]\d+).*?Last Page Read: Location \d+ \((\d+)%\)', val, re.I + re.DOTALL);
Choose the replace button, choose apply and you should be there. You might have to restart Calibre though.
That should at least fix one of your problems.
Let us know how is goes from here.
pchrist7 is offline   Reply With Quote