07-08-2023, 01:11 PM | #1651 |
Addict
Posts: 260
Karma: 139980
Join Date: Mar 2014
Device: Android
|
IGNORE OR DELETE POST.
UPDATE: removing original post..I realized my error in what I'm looking at. The #pages column had been off, but got turned on I guess during an update. Now I realize what is happening....so my post doesn't matter.... Last edited by jecilop; 07-08-2023 at 03:23 PM. Reason: UPDATE |
07-08-2023, 01:55 PM | #1652 |
Well trained by Cats
Posts: 30,397
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
If the column name is not available to SET in count pages config, then the column is of the wrong type (or the DB is damaged)
|
Advert | |
|
07-08-2023, 03:23 PM | #1653 |
Addict
Posts: 260
Karma: 139980
Join Date: Mar 2014
Device: Android
|
@the ducks.....I've updated my post..I've figured it out...I don't see how I can delete my post in the thread, so I just made it an update to ignore it.
Says:UPDATE: ignore post..I realized my error in what I'm looking at. The #pages column had been off, but got turned on I guess during an update. Now I realize what is happening....so my post doesn't matter.... |
08-02-2023, 02:51 AM | #1654 |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2021
Location: Netherlands
Device: Kobo Libra H2O
|
Is it possible to show the counted pages that has been stored in a column in Calibre, on my Kobo Libra H2O?
I don't see the counted pages on the Details page right now. I use the KoboExtendedDriver (KePub). |
08-02-2023, 04:55 AM | #1655 | |
Resident Curmudgeon
Posts: 76,008
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Go to the Metadata, on device & advanced tab check Book stats For Words, click Template Editor. Put in Code:
program:floor($$#words) Code:
program:floor($$#pages) |
|
Advert | |
|
08-02-2023, 05:01 AM | #1656 | |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2021
Location: Netherlands
Device: Kobo Libra H2O
|
Quote:
|
|
08-30-2023, 05:06 AM | #1657 |
want to learn what I want
Posts: 1,182
Karma: 6426810
Join Date: Sep 2020
Device: Calibre E-book viewer
|
hey @kiwidude, hope you're fine.
i see this on the Wiki: Alternatively in the configuration you can choose to use the page count used by the calibre e-book viewer Is it actually possible that Count Pages can retrieve the same number of pages displayed in the Viewer header? Currently, it doesn't seem to do so. Perhaps the algorithm has been changed? |
08-30-2023, 06:02 AM | #1658 | |
Resident Curmudgeon
Posts: 76,008
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
08-30-2023, 06:05 AM | #1659 |
want to learn what I want
Posts: 1,182
Karma: 6426810
Join Date: Sep 2020
Device: Calibre E-book viewer
|
|
08-31-2023, 02:54 AM | #1660 |
Calibre Plugins Developer
Posts: 4,678
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Certainly calibre changed in the last 12 years to using a different algorithm. Kovid was kind enough to point to the code that is generating that for the ebook viewer, the problem I have at the moment is it requires parsing the book in a different way than the plugin does currently.
I will see if Kovid has any suggestions that may help with implementing his way of processing the ebook to see if I could reuse his actual viewer code. Frankly without his help this will go in the too hard basket at this point in time as my care factor is pretty low when it comes to "accuracy" of page counts. It is impossible to be definitive about because of all the variables - any algorithm is an estimate only and should be used purely to compare the *relative* size of book A vs book B of both using the same algorithm. You are never going to get "the one true value" as no such thing exists. Go lookup paperback vs hardback edition page counts in the printed world which vary based on font sizes, page sizes, layout choices etc - then all the similar variables in the electronic world of device/screen sizes and you will hopefully realise just how ambiguous the term "page" means outside of a printed edition. Right now this plugin may tell me 410 whereas calibre viewer says 388, yet goodreads says the printed paperback edition is 240! It is simply not worth getting too worked up about. I do agree it is currently misleading to imply this plugin produces the same count as the ebook viewer does in calibre today. If I can't make it produce exactly the same then I will rename things a bit to prevent misconceptions on that. If someone else wants to wrap their head around the relevant calibre code in render_book.py and make a contribution I am happy to take a look at merging it. FYI how the ebook viewer used to estimate (what this plugin does currently for this option) is just a very crude total characters in the html pages of the book / 1000. Whereas the current ebook viewer code parses the body sections of pages, has various tags it will exclude, strips out all whitespace and divides that by 1000. It also treats every img tag it finds as a page. So unsurprisingly you get quite different counts - with the "old" page count approach generally producing a higher count. This plugin does already have a number of algorithms based around processing the body section of html and stripping out all tags. However it does so using raw text and regex, rather than XHTML which Kovid's code uses and some extra rules he has in there. For instance my plugin code would strip all img tags completely rather than treating each as a page. I can't make my text based parsing match the counts of XHTML based parsing, hence why this becomes a lot more work... |
08-31-2023, 03:44 PM | #1661 |
Bibliophagist
Posts: 39,737
Karma: 154147706
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Blasphemer! On a more serious side, that's why I use the same algorithm for all my epub ebooks to make it easy to compare the approximate page counts. I do have one epub that comes in at over 3,000 pages since the Adobe algorithm does not like Base64 inline images.
|
08-31-2023, 08:07 PM | #1662 | |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
The idea that there is one perfect number eludes me. |
|
08-31-2023, 08:08 PM | #1663 |
Resident Curmudgeon
Posts: 76,008
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
While ADE page numbers are not perfect, there are none better for eBooks.
|
08-31-2023, 08:24 PM | #1664 |
Custom User Title
Posts: 9,332
Karma: 63265021
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
To pick the one I use (Calibre ebook, 1500 chars/page) I used some books with both eBooks and phyiscal copies (of various sizes). Then I ran the generation with different settings and picked out the one that made page-counts close to the physical copies. I mostly care that the numbers are consistent with each other.
Last edited by ownedbycats; 08-31-2023 at 08:27 PM. |
08-31-2023, 08:34 PM | #1665 | ||
want to learn what I want
Posts: 1,182
Karma: 6426810
Join Date: Sep 2020
Device: Calibre E-book viewer
|
Quote:
Quote:
For the purpose I'm aiming - to have an accurate #viewer_pages field to go with the Reading Goal plugin - I think a manually updated column will suffice. Thank you for the detailed update! |
||
Tags |
count, count pages, page count, pages, plugin |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Quality Check | kiwidude | Plugins | 1198 | 10-05-2024 01:14 AM |
[GUI Plugin] Open With | kiwidude | Plugins | 403 | 04-01-2024 08:39 AM |
[GUI Plugin] Quick Preferences | kiwidude | Plugins | 62 | 03-16-2024 11:47 PM |
[GUI Plugin] Kindle Collections (old) | meme | Plugins | 2070 | 08-11-2014 12:02 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |