Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
343 changes: 306 additions & 37 deletions openlibrary/book_providers.py

Large diffs are not rendered by default.

227 changes: 23 additions & 204 deletions openlibrary/i18n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ msgstr ""
msgid "Data Dumps"
msgstr ""

#: Subnavigation.html book_providers/standard_ebooks_download_options.html
#: Subnavigation.html
msgid "Source Code"
msgstr ""

Expand Down Expand Up @@ -3610,16 +3610,13 @@ msgstr ""
msgid "BookReader"
msgstr ""

#: admin/loans_table.html book_providers/cita_press_download_options.html
#: book_providers/ia_download_options.html
#: book_providers/openstax_download_options.html
#: book_providers/wikisource_download_options.html books/edit/edition.html
#: admin/loans_table.html book_providers/download_options.html
#: books/edit/edition.html
msgid "PDF"
msgstr ""

#: admin/loans_table.html book_providers/gutenberg_download_options.html
#: book_providers/ia_download_options.html
#: book_providers/standard_ebooks_download_options.html books/edit/edition.html
#: admin/loans_table.html book_providers/download_options.html
#: books/edit/edition.html
msgid "ePub"
msgstr ""

Expand Down Expand Up @@ -4174,114 +4171,24 @@ msgstr ""
msgid "Died"
msgstr ""

#: book_providers/cita_press_download_options.html
#: book_providers/gutenberg_download_options.html
#: book_providers/ia_download_options.html
#: book_providers/librivox_download_options.html
#: book_providers/openstax_download_options.html
#: book_providers/runeberg_download_options.html
#: book_providers/standard_ebooks_download_options.html
#: book_providers/wikisource_download_options.html
msgid "Download Options"
msgstr ""

#: book_providers/cita_press_download_options.html
msgid "Download PDF from Cita Press"
msgstr ""

#: book_providers/cita_press_download_options.html
msgid "More at Cita Press"
msgstr ""

#: book_providers/gutenberg_download_options.html
msgid "Download an HTML from Project Gutenberg"
msgstr ""

#: book_providers/gutenberg_download_options.html
#: book_providers/runeberg_download_options.html
#: book_providers/standard_ebooks_download_options.html type/list/exports.html
msgid "HTML"
msgstr ""

#: book_providers/gutenberg_download_options.html
msgid "Download a text version from Project Gutenberg"
msgstr ""

#: book_providers/gutenberg_download_options.html
#: book_providers/ia_download_options.html
msgid "Plain text"
msgstr ""

#: book_providers/gutenberg_download_options.html
msgid "Download an ePub from Project Gutenberg"
msgstr ""

#: book_providers/gutenberg_download_options.html
msgid "Download a Kindle file from Project Gutenberg"
msgstr ""

#: book_providers/gutenberg_download_options.html
msgid "Kindle"
msgstr ""

#: book_providers/gutenberg_download_options.html
msgid "More at Project Gutenberg"
msgstr ""

#: book_providers/ia_download_options.html
msgid "Download a PDF from Internet Archive"
msgstr ""

#: book_providers/ia_download_options.html
msgid "Download a text version from Internet Archive"
msgstr ""

#: book_providers/ia_download_options.html
msgid "Download an ePub from Internet Archive"
msgstr ""

#: book_providers/ia_download_options.html
msgid "Download a MOBI file from Internet Archive"
msgstr ""

#: book_providers/ia_download_options.html
msgid "MOBI"
msgstr ""

#: book_providers/ia_download_options.html
msgid "Download open DAISY from Internet Archive (print-disabled format)"
msgstr ""

#: book_providers/ia_download_options.html type/list/embed.html
msgid "DAISY"
msgstr ""

#: book_providers/librivox_download_options.html
msgid "Download a ZIP file of the whole book from Internet Archive"
msgstr ""

#: book_providers/librivox_download_options.html
msgid "Whole Book MP3"
msgstr ""

#: book_providers/librivox_download_options.html
msgid "Get the RSS Feed from LibriVox"
#: book_providers/download_options.html
msgid "Read Online"
msgstr ""

#: book_providers/librivox_download_options.html
msgid "RSS Feed"
#: book_providers/download_options.html
msgid "Audio"
msgstr ""

#: book_providers/librivox_download_options.html
msgid "More at LibriVox"
#: book_providers/download_options.html
msgid "Download Options"
msgstr ""

#: book_providers/openstax_download_options.html
msgid "Download PDF from OpenStax"
#: book_providers/download_options.html
msgid "Download from"
msgstr ""

#: book_providers/openstax_download_options.html
msgid "More at OpenStax"
#: book_providers/download_options.html
msgid "Download"
msgstr ""

#: book_providers/read_button.html
Expand All @@ -4298,102 +4205,6 @@ msgstr ""
msgid "Read free online from %s"
msgstr ""

#: book_providers/runeberg_download_options.html
msgid "Download all scanned images from Project Runeberg"
msgstr ""

#: book_providers/runeberg_download_options.html
msgid "Scanned images"
msgstr ""

#: book_providers/runeberg_download_options.html
msgid "Download all color images from Project Runeberg"
msgstr ""

#: book_providers/runeberg_download_options.html
msgid "Color images"
msgstr ""

#: book_providers/runeberg_download_options.html
msgid "Download all HTML files from Project Runeberg"
msgstr ""

#: book_providers/runeberg_download_options.html
msgid "Download all text and index files from Project Runeberg"
msgstr ""

#: book_providers/runeberg_download_options.html
msgid "Text and index files"
msgstr ""

#: book_providers/runeberg_download_options.html
msgid "Download all OCR text from Project Runeberg"
msgstr ""

#: book_providers/runeberg_download_options.html
msgid "OCR text"
msgstr ""

#: book_providers/runeberg_download_options.html
msgid "More at Project Runeberg"
msgstr ""

#: book_providers/standard_ebooks_download_options.html
msgid "Download an HTML from Standard Ebooks"
msgstr ""

#: book_providers/standard_ebooks_download_options.html
msgid "Download an ePub from Standard Ebook."
msgstr ""

#: book_providers/standard_ebooks_download_options.html
msgid "Download a Kindle file from Standard Ebooks"
msgstr ""

#: book_providers/standard_ebooks_download_options.html
msgid "Kindle (azw3)"
msgstr ""

#: book_providers/standard_ebooks_download_options.html
msgid "Download a Kobo file from Standard Ebooks"
msgstr ""

#: book_providers/standard_ebooks_download_options.html
msgid "Kobo (kepub)"
msgstr ""

#: book_providers/standard_ebooks_download_options.html
msgid "View the source code for this Standard Ebook at GitHub"
msgstr ""

#: book_providers/standard_ebooks_download_options.html
msgid "More at Standard Ebooks"
msgstr ""

#: book_providers/wikisource_download_options.html
msgid "Download PDF from Wikisource"
msgstr ""

#: book_providers/wikisource_download_options.html
msgid "Download MOBI from Wikisource"
msgstr ""

#: book_providers/wikisource_download_options.html
msgid "MOBI (for Kindle)"
msgstr ""

#: book_providers/wikisource_download_options.html
msgid "Download EPUB from Wikisource"
msgstr ""

#: book_providers/wikisource_download_options.html
msgid "EPUB (for most other e-readers)"
msgstr ""

#: book_providers/wikisource_download_options.html
msgid "Read at Wikisource"
msgstr ""

#: books/RelatedWorksCarousel.html
msgid "You might also like"
msgstr ""
Expand Down Expand Up @@ -7831,6 +7642,14 @@ msgstr ""
msgid "Protected DAISY"
msgstr ""

#: type/list/embed.html
msgid "DAISY"
msgstr ""

#: type/list/exports.html
msgid "HTML"
msgstr ""

#: type/list/exports.html
msgid "BibTex"
msgstr ""
Expand Down

This file was deleted.

30 changes: 30 additions & 0 deletions openlibrary/templates/book_providers/download_options.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
$def with(acquisitions)

$if not acquisitions:
$return

$def get_label(acq):
$if acq.label:
$return _(acq.label)
$elif acq.format == 'web':
$return _('Read Online')
$elif acq.format == 'pdf':
$return _('PDF')
$elif acq.format == 'epub':
$return _('ePub')
$elif acq.format == 'audio':
$return _('Audio')
$else:
$return acq.format.upper()

<hr>
<div class="cta-section">
<p class="cta-section-title">$_("Download Options")</p>
<ul class="ebook-download-options">
$for acq in acquisitions:
$if acq.provider_name:
<li><a href="$acq.url" data-ol-link-track="Download|$(acq.format)_$(acq.provider_name)" title="$_('Download from') $acq.provider_name">$(get_label(acq))</a></li>
$else:
<li><a href="$acq.url" data-ol-link-track="Download|$(acq.format)" title="$_('Download')">$(get_label(acq))</a></li>
</ul>
</div>

This file was deleted.

17 changes: 0 additions & 17 deletions openlibrary/templates/book_providers/ia_download_options.html

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading