Skip to content

Chapter progress bar#664

Open
p-value-sharma wants to merge 3 commits into
LuteOrg:masterfrom
p-value-sharma:chapter-progress-bar
Open

Chapter progress bar#664
p-value-sharma wants to merge 3 commits into
LuteOrg:masterfrom
p-value-sharma:chapter-progress-bar

Conversation

@p-value-sharma

Copy link
Copy Markdown
Contributor

What this does

Adds a chapter progress bar to the reading view. It uses Lute's existing
bookmarks feature as chapter markers — bookmark the first page of each
chapter and the bar automatically tracks your progress within that chapter.

The bar is hidden when no bookmarks exist before the current page, so it
doesn't clutter the UI for books without chapter markers.

Example display:

Chapter 3 · Page 4 of 19 · 15 pages left · 21%

How to use

Bookmark the first page of each chapter via the hamburger menu →
Bookmarks → Add Bookmark, naming it e.g. "Chapter 1", "Part II", etc.
The progress bar appears automatically below the audio player while reading.

Changes

  • lute/bookmarks/routes.py — new endpoint /bookmarks/<bookid>/chapter_progress/<pagenum> that calculates chapter position from bookmarks
  • lute/templates/read/index.html — progress bar HTML and JavaScript
  • lute/static/css/styles.css — progress bar styles using existing CSS variables

Notes

Developed with assistance from Claude (Anthropic). Tested locally.

Add chapter progress bar endpoint
Add chapter progress bar styles
Add chapter progress bar HTML and JavaScript
@jzohrab

jzohrab commented Apr 5, 2026

Copy link
Copy Markdown
Collaborator

Hi @p-value-sharma -- I think I'm going to have to decline this one within the Lute release, as people use the bookmarks in various ways, not necessarily conforming to chapter headings. e.g. I use it sometimes to mark characters, grammar notes, nice passages, etc.

It's still a great idea though. Lute does need some way of identifying chapters. Currently bookmarks are just plain data, it's rather clunky. Having them be "classified" into certain types (chapter heading, eg) would be very natural, but that's a much bigger change than what you've given here. Some people have also suggested using something like Markdown (see #168) which might then correspond to chapters nicely. That's a more interesting, and more painful, change.

Back to you so that we can chat about this a bit more if you'd like. Thanks again, appreciate the effort!

@jzohrab jzohrab added this to Lute-v3 Apr 5, 2026
@jzohrab jzohrab added the wontfix This will not be worked on label Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wontfix This will not be worked on

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants