Quote:
Originally Posted by BetterRed
@rpgmaker - you could look at the code, just unpack the plugin zip somewhere, I think the algos are in statistics.py. The PI author, Kiwidude, isn't very active at the moment, but his code pretty easy to read with generous comments,
BR
|
Thanks for pointing out the file.
The page count for epubs, in case anyone is wondering:
From what I understood the script first counts the lines (comment in script: "A line is either a paragraph starting or every 70 characters in a paragraph."). For the accurate count this number is then divided by 31 (which is the usual number of lines in a page of a paperback, I assume). After this, from script: "we could still have a really weird document and massively understate. As a backstop count the characters using the "fast count" algorithm and use that number instead". The fast count counts the characters in the entire document, divides this number by 2400 and a 1 is added to the result. The biggest of the two counts is used as the resulting page count.