From 4b0aa50da6a0cea02616a654dbd80978925cd404 Mon Sep 17 00:00:00 2001 From: JB Date: Sat, 11 Oct 2025 08:58:14 -0700 Subject: [PATCH] feat: Add 'Find Books' page and integrate links to Standard Ebooks and Project Gutenberg --- abogen/web/routes.py | 9 ++++++++ abogen/web/templates/base.html | 1 + abogen/web/templates/find_books.html | 33 +++++++++++++++++++++++++++ abogen/web/templates/prepare_job.html | 7 +++--- 4 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 abogen/web/templates/find_books.html diff --git a/abogen/web/routes.py b/abogen/web/routes.py index c640b3b..f6d4fe5 100644 --- a/abogen/web/routes.py +++ b/abogen/web/routes.py @@ -1598,6 +1598,15 @@ def queue_page() -> ResponseReturnValue: ) +@web_bp.get("/find-books") +def find_books_page() -> ResponseReturnValue: + # Potential integration target: Standard Ebooks OPDS feed + # https://standardebooks.org/feeds/opds + # Potential integration target: Project Gutenberg OPDS search + # https://www.gutenberg.org/ebooks/search.opds/ + return render_template("find_books.html") + + @web_bp.route("/settings", methods=["GET", "POST"]) def settings_page() -> ResponseReturnValue: options = _template_options() diff --git a/abogen/web/templates/base.html b/abogen/web/templates/base.html index c87c291..54a0066 100644 --- a/abogen/web/templates/base.html +++ b/abogen/web/templates/base.html @@ -20,6 +20,7 @@ Dashboard Voice Mixer Speakers + Find Books Queue Settings diff --git a/abogen/web/templates/find_books.html b/abogen/web/templates/find_books.html new file mode 100644 index 0000000..9abccf5 --- /dev/null +++ b/abogen/web/templates/find_books.html @@ -0,0 +1,33 @@ +{% extends "base.html" %} + +{% block title %}abogen · Find Books{% endblock %} + +{% block content %} +
+
Find Books
+

Browse curated public-domain ebooks, then download and queue them for conversion.

+
+
+

Standard Ebooks

+

Discover meticulously produced public-domain ebooks with consistent typography, metadata, and clean EPUB sources.

+

+ + Visit standardebooks.org + +

+

Opens in a new tab so you can grab EPUB downloads and drag them into abogen.

+
+ +
+

Project Gutenberg

+

The world’s largest public-domain ebook library, offering thousands of EPUB and plain-text editions sourced from volunteer transcriptions.

+

+ + Visit gutenberg.org + +

+

Download the EPUB version for best results, then import it into abogen.

+
+
+
+{% endblock %} diff --git a/abogen/web/templates/prepare_job.html b/abogen/web/templates/prepare_job.html index 58acc9c..5354f70 100644 --- a/abogen/web/templates/prepare_job.html +++ b/abogen/web/templates/prepare_job.html @@ -49,7 +49,9 @@ {% endif %}
-
+
-
- {{ '{:,}'.format(chapter.characters) }} characters -