mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 21:50:28 +02:00
feat: Add 'Find Books' page and integrate links to Standard Ebooks and Project Gutenberg
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 world’s 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 %}
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user