From bce5f3f3b50725ba583d3fc1a72732eb84fde415 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 31 Oct 2021 17:58:15 +1100 Subject: [PATCH] populate new authors with isni data If a user selects an author pulled from the ISNI service when editing a book, use any relevant data from ISNI to populate the new author record. This includes - bio - aliases - isni - wikipedia url - viaf --- bookwyrm/templates/book/edit/edit_book.html | 34 +++--- bookwyrm/utils/isni.py | 119 ++++++++++++++++---- bookwyrm/views/books/edit_book.py | 13 ++- 3 files changed, 119 insertions(+), 47 deletions(-) diff --git a/bookwyrm/templates/book/edit/edit_book.html b/bookwyrm/templates/book/edit/edit_book.html index 3d79bed85..104cef4df 100644 --- a/bookwyrm/templates/book/edit/edit_book.html +++ b/bookwyrm/templates/book/edit/edit_book.html @@ -50,39 +50,33 @@
{% for author in author_matches %} - {% if author.isni_matches %}
- {% blocktrans with name=author.name %}Is "{{ name }}" one of these?{% endblocktrans %} + {% blocktrans with name=author.name %}Is "{{ name }}" one of these authors?{% endblocktrans %} {% with forloop.counter0 as counter %} - {% for match in author.isni_matches %} -
- {% endif %} -
- - {% blocktrans with name=author.name %}Is "{{ name }}" an existing author?{% endblocktrans %} - - {% with forloop.counter0 as counter %} + {% endif %} {% for match in author.matches %} -