View Single Post
Old 01-20-2011, 10:29 AM   #53
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
Exclamation Try this

Quote:
Originally Posted by beckywc View Post
No I was just using a template field in the custom column. I have in the template field:

{comments:'contains($, 'Last Page Read:', re($, '(?is).*(\d\d[-/]\d\d[-/]\d\d\d\d).*?Last Page Read:.*', '\1'), 'Not Read')'}

But I was wondering is there anyway if a book has been partially read to say reading, instead of the date.
Hi bechywc.
Havent had enough time to look at this. Want to, cause this is fun.
A bit hard to learn, but ...
SO - you don't want the last opened date ?
OR you want another custom column showing "read" status ?
Please explain further. Please understand English is not my native language.
So please be precise.
Also, how many books do you have in your Calibre library ?
I have 900, and some of these customn columns using "just" templates, slows Calibre startup from 1-2 second to 1-2 minuttes.
That's why I asked chaley, brilliant work, to help with the python Template functions.

Anyways.
A quick, (slow with many books, not nice) fix for a new column could be:

Code:
{comments:'contains($, 'Last Page Read:', re($, '(?is).*\s(\d+[-/]\d+[-/]\d\d\d\d).*?Last Page Read:.*', 'Reading'), 'Not Read')'}
IF you want to go for a more detailed distinction for the amount (%) read, I suggest the python way. ( need to learn that too )
Please let me know what you're looking for.

Edit:
Simpler template than above, could be faster.
Code:
{comments:'contains($,'Last Page Read: ', 'Read', 'Not Read')'}

Last edited by pchrist7; 01-20-2011 at 10:39 AM. Reason: spelling, new code
pchrist7 is offline   Reply With Quote