Configure Calibre Page Counts - joshuacant/ProjectTitle GitHub Wiki
Install Plugin
These steps require the following: You have Calibre installed and a library already set up for your books. Please seek another guide to the basics of using Calibre if you need assistance.
- Click Preferences, then "Plugins" and "Get New Plugins"
- In the "Filter by name" box type "count"
- Click on "Count Pages" by Grant Drake and click "Install" and agree to any prompts that follow, including restarting Calibre. Details about this plugin can be found here.
images/calibre-install_plugin.png
Configure Plugin
- Configure column for page count data exactly as follows (CaSe MaTTerS!)
- Click Preferences, then "Interface" and "Add your own columns". Click on
+
button, enter the following, leaving the other boxes empty.
Field Value Comments Lookup name: pages Mandatory Column heading: Pages Mandatory Column type: Integers
Mandatory Formatting: {0:,d}
Mandatory
- Restart Calibre when prompted.
images/calibre-add_custom_pages_column.png
- Click Preferences, then "Plugins", "User interface action", "Count Pages", "Customize plugin"
- Set "#pages (Pages)" as the Page count Custom column. For Algorithm you may read more details here. I like using "Custom (Chars Per Page)" with a number between 2300 and 2900, which matches the range of various hardcover books I own.
images/calibre-customize_count_pages_plugin.png
Scan Books for Page Counts
- Scan a book or two for page count by right clicking and going to the "Count Pages" sub-menu. Update the counts, and verify numbers are appearing in the new column, and that the numbers make sense. Books aren't normally 7 or 83,000 pages long!
- Send books to your device and verify that the progress bars appear as expected. Progress bars show different lengths for books up to 750 pages, and then show an indicator that the book is so large the progress bar was shortened to fit the space available.
- If everything is working, scan and add the rest of your books.
- Note: Only newly added books will be scanned for page counts. If you replace a book on your device with exactly the same filename it had before, the page count will not appear until you rescan the file or all files.
Optional (for Faster Book Loading in KOReader)
The default method for obtaining these Calibre plugin page counts on your device is by looking inside the EPUB file for the OPF metadata file that Calibre modifies to include custom columns. This could be slow on some devices. A faster method is to include the page count at the end of the filename when syncing or sending the file to your device.
- After installing and configuring the plugin, locate the "Save Template" for your device. It is probably in one of the two locations below. There are others but they are less common, such as the per-device config for user-defined USB devices.
- Go to Preferences, "Saving Books To Disk" OR Preferences, "Sending Books to Device"
Disk | Device | User USB Device |
---|---|---|
[images/calibre-saving_files_to_disk.png]] ](/joshuacant/ProjectTitle/wiki/[[images/calibre-sending_files_to_devices.png) | images/calibre-configure_user_def_usb_device.png |
- In the "Save template" text box you should see some text already. Leave that in place and add
P({#pages})
exactly to the end. There must be a space between the end of the existing string and the P. - Now when you copy/sync books to your device the filename will have text like
P(263)
added to the end, where the number is the page count from the plugin. Because the page number is right in the filename no additional time is needed to look for it!
Troubleshooting
If page counts seem wrong or wildly incorrect, check the Algorithm setting in the Count Pages plugin configuration.