internetarchive / internetarchive/openlibrary
Add the option to sort read books by the date the book was finished
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 138
Description
### Feature Request
Currently, it's only possible to view the list of our read books sorted by the date they were added (most recent/oldest, ascending/descending). It would be great to also be able to view them sorted by the date they were read (finished). This way, if we add now a book that we read a long time ago, that book can still appear correctly ordered on our list, instead of at the top.
Since it's possible to add a date without having to fill in all the fields (just the year, or just the year and the month) --a very useful feature that should be maintained, because we don't always remember the exact date we finished a book--, a solution to this, if technically possible, could be to set the read order based on the total number of fields filled in.
Thus, for a descending order, the read (date finished) order could be as follows:
YY
YY-MM
YYYY-MM-DD
Example:
Descending:
2025
2025-10
2025-10-07
2024
2024-10
2024-10-07
Ascending:
2024-10-07
2024-10
2024
2025-10-07
2025-10
2025
Thank you.
### Instructions for Contributors
* **Before** [creating a new branch](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#making-changes-and-creating-a-pull-request) or pushing up changes to a PR, please first [run these commands](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#working-on-your-branch) to ensure your repository is up to date, as the pre-commit bot may add commits to your PRs upstream.
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by tracing how the read-books list currently applies added-date sorting and how partially specified finished dates are stored. Done means users can sort read books by finished date in both directions while preserving support for year-only and year-month dates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100