github AndyHazz/bookends.koplugin v5.23.0

latest release: v5.23.1
3 hours ago

Auto preset by file type

Bookends can now switch preset, or hide itself entirely, based on the file you open. Under Bookends settings > Auto preset by file type, add a rule for a file extension and pick either a preset or Hidden (no overlay). The picker previews each preset live on the page before you commit.

Comics and manga were the motivating case: a rule that hides the overlay for CBZ keeps the artwork clear, and going back to an EPUB restores your normal preset with nothing to toggle by hand. The same works the other way, e.g. a plainer preset for PDFs.

Rules key off the extension, so one rule covers every file of that type. Your normal preset is remembered separately from whatever a rule switches you to, so removing a rule puts you back where you were.

Progress markers stay put when you change font size

The Today, session and book-opened markers on progress bars were anchored to a page number. Changing font size re-paginates the book, so that number stopped pointing at the same place and the marker drifted away from where you had actually read to. They're now anchored to the text itself and hold their position through font, margin and line-spacing changes.

Hours and minutes in conditionals

chap_time_left_h, chap_time_left_m, book_time_left_h and book_time_left_m now work inside [if:…], matching the tokens of the same names. That makes the stock-Kindle phrasing possible, where the hours only appear when there are any:

[if:chap_time_left_h>0]%chap_time_left_h hr(s) [/if]%chap_time_left_m min(s) left in chapter

giving "2 hrs 5 mins left in chapter", then "42 mins left in chapter" once under an hour. Both the chapter and book versions are in the token picker under Templates.

Tokens that sit flush against text

A token name runs until the next non-letter, so anything typed straight after it gets read as part of the name. Wrapping the name in angle brackets marks where it ends:

%<book_time_left_h>h%<book_time_left_m>m

gives 4h40m. Width limits still work inside, e.g. %<author{200}>.

Position in the folder

%file_num and %file_count give the open file's place among the documents in its folder, so File %file_num/%file_count shows "File 5/10". Ordering follows your file manager sort settings. Aimed at comics and manga kept as one file per chapter, where the page and chapter tokens can only describe the chapter you're in.

Weekday and month names follow your language

%weekday, %weekday_short, %date_long and %datetime{} were rendering English day and month names regardless of your KOReader language. They now use KOReader's own translations, which covers every language KOReader ships rather than only the ones Bookends has a translation file for.

Presets folder in Folder shortcuts

The presets folder now appears in KOReader's Folder shortcuts, so you can reach it from the file manager without typing the path. Useful for copying preset files on or off the device by hand.

Gallery

Install counts load faster and no longer stop working on busy days. The counts endpoint was doing one lookup per preset in the gallery, which grew slower as the gallery grew and was hitting a daily quota; it's now a single lookup regardless of size.

Memory token on older Kindles

%mem rendered as nothing on older devices, because it read a field that only exists on newer Linux kernels. It now falls back to the equivalent older fields. Thanks to ksaMask123 for the fix and the diagnosis, in #106.

New languages

Ukrainian (uk) and European Portuguese (pt_PT), thanks to the contributors in #105 and #93.

Don't miss a new bookends.koplugin release

NewReleases is sending notifications on new releases.