View Single Post
Old 11-05-2022, 01:16 AM   #5
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,043
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by Fynjisx View Post
explain how you made the number of read pages in books? How to make a column with the format i/pages, with the ability to extract i and pages separately? You will have to modify i manually every time, reading the pdf format
It isn't for pages. I use it to generate a new percent read after a fanfiction updates. It requires a very specific library/plugin setup that it wouldn't be helpful for most people.

However, I do have an Action Chain that'll let you input the current page number into a dialog, compare it against #pagecount, and then populate #percentread from it. I use it for physical books, or ones in PDF format.

Here's the template.

Code:
program:
	totalpage = $#pagecount;
	currentpage = globals(Current_Page=1);
	newpercent = round(multiply ((currentpage / totalpage), 100));
Note that globals(Current_Page=1) is the number inputted during the runtime of the action chain and it won't work outside the context of the chain (or at least it won't do anything useful).

However, if you want to play around with it: Open the Template Tester and replace the 'globals' bit with various numbers. (Don't forget the semicolon.) You'll see the value change depending on the #pagecount column of the selected books and whatever you define as currentpage.
Attached Files
File Type: zip UpdatePercentRead.zip (2.8 KB, 142 views)

Last edited by ownedbycats; 11-05-2022 at 01:45 AM.
ownedbycats is offline   Reply With Quote