feat: Add 'Find Books' page and integrate links to Standard Ebooks and Project Gutenberg

This commit is contained in:
JB
2025-10-11 08:58:14 -07:00
parent 97fd8b85fc
commit 4b0aa50da6
4 changed files with 46 additions and 4 deletions
+9
View File
@@ -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()
+1
View File
@@ -20,6 +20,7 @@
<a href="{{ url_for('web.index') }}" class="btn{% if endpoint == 'web.index' %} is-active{% endif %}">Dashboard</a>
<a href="{{ url_for('web.voice_profiles_page') }}" class="btn{% if endpoint == 'web.voice_profiles_page' %} is-active{% endif %}">Voice Mixer</a>
<a href="{{ url_for('web.speaker_configs_page') }}" class="btn{% if endpoint == 'web.speaker_configs_page' %} is-active{% endif %}">Speakers</a>
<a href="{{ url_for('web.find_books_page') }}" class="btn{% if endpoint == 'web.find_books_page' %} is-active{% endif %}">Find Books</a>
<a href="{{ url_for('web.queue_page') }}" class="btn{% if endpoint in ['web.queue_page', 'web.job_detail'] %} is-active{% endif %}">Queue</a>
<a href="{{ url_for('web.settings_page') }}" class="btn{% if endpoint == 'web.settings_page' %} is-active{% endif %}">Settings</a>
</nav>
+33
View File
@@ -0,0 +1,33 @@
{% extends "base.html" %}
{% block title %}abogen · Find Books{% endblock %}
{% block content %}
<section class="card">
<div class="card__title">Find Books</div>
<p class="card__subtitle">Browse curated public-domain ebooks, then download and queue them for conversion.</p>
<div class="card__body">
<article class="resource-tile">
<h2>Standard Ebooks</h2>
<p>Discover meticulously produced public-domain ebooks with consistent typography, metadata, and clean EPUB sources.</p>
<p>
<a class="button" href="https://standardebooks.org/ebooks" target="_blank" rel="noopener">
Visit standardebooks.org
</a>
</p>
<p class="hint">Opens in a new tab so you can grab EPUB downloads and drag them into abogen.</p>
</article>
<article class="resource-tile">
<h2>Project Gutenberg</h2>
<p>The worlds largest public-domain ebook library, offering thousands of EPUB and plain-text editions sourced from volunteer transcriptions.</p>
<p>
<a class="button" href="https://gutenberg.org/ebooks/" target="_blank" rel="noopener">
Visit gutenberg.org
</a>
</p>
<p class="hint">Download the EPUB version for best results, then import it into abogen.</p>
</article>
</div>
</section>
{% endblock %}
+3 -4
View File
@@ -49,7 +49,9 @@
{% endif %}
<div class="prepare-steps" data-role="prepare-step-panels">
<section class="prepare-step" data-step-panel="chapters">
<section class="prepare-step"
data-step-panel="chapters"
{% if not is_chapters %}hidden aria-hidden="true"{% endif %}>
<header class="prepare-step__header">
<h2>Step 2 · Select chapters</h2>
<p class="hint">Choose which chapters to convert and tweak conversion options. We'll analyse speakers automatically when you continue.</p>
@@ -74,9 +76,6 @@
<span>Chapter {{ loop.index }} · {{ chapter.title }}</span>
</label>
</div>
<div class="chapter-card__metrics">
{{ '{:,}'.format(chapter.characters) }} characters
</div>
</header>
<div class="chapter-card__body">
<div class="chapter-card__field">