1
0
Fork 0

Isfdb ID for books and authors (#2482)

* New ID: Audible ASIN

Audible belongs to Amazon BUT they do not share the same IDs. The Audible ASIN of an audiobook is never the same as the Amazon ASIN.

Yeah, I know, Amazon is great. The fact that the ASIN is a good distinction for different works and editions bothers me more than I will ever be willing to admint.

* New ID "ISFDB"

Internet Speculative Ficiton Database ID for books and authors.
Links to the entry if set.

* Added aasin to test

Added aasin to test

* the answer expects more emptxy fields...
This commit is contained in:
Jascha Ezra Urbach 2022-12-11 20:33:33 +01:00 committed by GitHub
parent 0e2b88ad0c
commit ac8b060d58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 150 additions and 4 deletions

View file

@ -28,7 +28,7 @@
<meta itemprop="name" content="{{ author.name }}">
{% firstof author.aliases author.born author.died as details %}
{% firstof author.wikipedia_link author.openlibrary_key author.inventaire_id author.isni as links %}
{% firstof author.wikipedia_link author.openlibrary_key author.inventaire_id author.isni author.isfdb as links %}
{% if details or links %}
<div class="column is-3">
{% if details %}
@ -81,6 +81,14 @@
</div>
{% endif %}
{% if author.isfdb %}
<div class="mt-1">
<a itemprop="sameAs" href="{{ author.isfdb_link }}" rel="nofollow noopener noreferrer" target="_blank">
{% trans "View on ISFDB" %}
</a>
</div>
{% endif %}
{% trans "Load data" as button_text %}
{% if author.openlibrary_key %}
<div class="mt-1 is-flex">
@ -128,6 +136,14 @@
</a>
</div>
{% endif %}
{% if author.isfdb %}
<div>
<a itemprop="sameAs" href="https://www.isfdb.org/cgi-bin/ea.cgi?{{ author.isfdb }}" target="_blank" rel="nofollow noopener noreferrer">
{% trans "View ISFDB entry" %}
</a>
</div>
{% endif %}
</div>
</section>
{% endif %}

View file

@ -101,6 +101,13 @@
{% include 'snippets/form_errors.html' with errors_list=form.goodreads_key.errors id="desc_goodreads_key" %}
</div>
<div class="field">
<label class="label" for="id_isfdb">{% trans "ISFDB:" %}</label>
{{ form.isfdb }}
{% include 'snippets/form_errors.html' with errors_list=form.isfdb.errors id="desc_isfdb" %}
</div>
<div class="field">
<label class="label" for="id_isni">{% trans "ISNI:" %}</label>
{{ form.isni }}

View file

@ -158,6 +158,13 @@
{% endif %}
</p>
{% endif %}
{% if book.isfdb %}
<p>
<a href="{{ book.isfdb_link }}" target="_blank" rel="nofollow noopener noreferrer">
{% trans "View on ISFDB" %}
</a>
</p>
{% endif %}
</section>
</div>

View file

@ -1,7 +1,7 @@
{% spaceless %}
{% load i18n %}
{% if book.isbn_13 or book.oclc_number or book.asin %}
{% if book.isbn_13 or book.oclc_number or book.asin or book.aasin or book.isfdb %}
<dl>
{% if book.isbn_13 %}
<div class="is-flex">
@ -23,6 +23,21 @@
<dd>{{ book.asin }}</dd>
</div>
{% endif %}
{% if book.aasin %}
<div class="is-flex">
<dt class="mr-1">{% trans "Audible ASIN:" %}</dt>
<dd>{{ book.aasin }}</dd>
</div>
{% endif %}
{% if book.isfdb %}
<div class="is-flex">
<dt class="mr-1">{% trans "ISFDB ID:" %}</dt>
<dd>{{ book.isfdb }}</dd>
</div>
{% endif %}
{% if book.goodreads_key %}
<div class="is-flex">
<dt class="mr-1">{% trans "Goodreads:" %}</dt>

View file

@ -353,6 +353,24 @@
{% include 'snippets/form_errors.html' with errors_list=form.ASIN.errors id="desc_ASIN" %}
</div>
<div class="field">
<label class="label" for="id_aasin">
{% trans "Audible ASIN:" %}
</label>
{{ form.aasin }}
{% include 'snippets/form_errors.html' with errors_list=form.AASIN.errors id="desc_AASIN" %}
</div>
<div class="field">
<label class="label" for="id_isfdb">
{% trans "ISFDB ID:" %}
</label>
{{ form.isfdb }}
{% include 'snippets/form_errors.html' with errors_list=form.isfdb.errors id="desc_isfdb" %}
</div>
</div>
</section>
</div>