I have two columns, text
#kobobookmark and integer
#chaptercount.
I'd like to create a new column to keep track of read chapters in a fanfic, e.g. 5/25.
I thought the best way to do that is a GPM template that
a) checks a book is a fanfic, is currently being read, and has something in
#kobobookmark to count,
b) extract the number of read chapters from
#kobobookmark,
c) display that number next to
#chaptercount.
I managed to get the first part working already:
Code:
program:
if
$#fanficcat
&&
$#currentlyreading
&&
$#kobobookmark
then
$#chaptercount
fi
Unfortunately the implementation of b and c I'm a bit stuck on. The bookmarks are always in a string similar to this:
OEBPS/file0003.xhtml#kobo.1.1
The "0003.xhtml" means that it's currently on chapter 3. What would be the best way to get the number and display it as '3/
{#chaptercount} chapters read'?