Quote:
Originally Posted by Aleron Ives
Thanks for taking it under consideration. I know it's not the kind of page counting mechanism you originally envisioned, but it would be nice to have one CLI tool for all our EPUB page numbering tasks.
|
While not part of the orignal plan, it turned out that the feature was not actually that complicated to add (honestly, adding the page-map.xml was almost trickier).
Print Page Approximator v1.1.5 should implement pretty much everything you've described.
There's now a new flag, "--autopage" which tells the script to automatically calculate the pages using the numeric second argument as a definition of a single page.
For example:
Code:
.\page_approximator.exe .\example_book.epub 30 --autopage --pagingmode lines
...will paginate your book with 30 lines per page for however many pages that results in.
As usual more details are in the
readme on GitHub.
Quote:
Originally Posted by Aleron Ives
As far as word counting goes, I would think that you'd count any group of characters preceeded and followed by a space or newline as a word, so that differences in punctuation would not influence the count.
|
That's certainly an easy programmatic definition which the Python split() method already incorporates natively so that's what I went with.
Personally I still think that defining pages by word count is a bit questionable because one word could have 2 letters or maybe it could have 16 letters and both would be the same with this method. But well, offering the option doesn't hurt I guess.