Add openlibrary selector to list
This commit is contained in:
		| @@ -31,6 +31,9 @@ | |||||||
|                     <option value="LibraryThing" {% if current == 'LibraryThing' %}selected{% endif %}> |                     <option value="LibraryThing" {% if current == 'LibraryThing' %}selected{% endif %}> | ||||||
|                         LibraryThing (TSV) |                         LibraryThing (TSV) | ||||||
|                     </option> |                     </option> | ||||||
|  |                     <option value="OpenLibrary" {% if current == 'OpenLibrary' %}selected{% endif %}> | ||||||
|  |                         OpenLibrary (CSV) | ||||||
|  |                     </option> | ||||||
|                 </select> |                 </select> | ||||||
|             </div> |             </div> | ||||||
|             <div class="field"> |             <div class="field"> | ||||||
|   | |||||||
| @@ -105,6 +105,11 @@ | |||||||
|                 <th> |                 <th> | ||||||
|                     {% trans "ISBN" %} |                     {% trans "ISBN" %} | ||||||
|                 </th> |                 </th> | ||||||
|  |                 {% if job.source == "OpenLibrary" %} | ||||||
|  |                 <th> | ||||||
|  |                     {% trans "Openlibrary key" %} | ||||||
|  |                 </th> | ||||||
|  |                 {% endif %} | ||||||
|                 <th> |                 <th> | ||||||
|                     {% trans "Author" %} |                     {% trans "Author" %} | ||||||
|                 </th> |                 </th> | ||||||
| @@ -145,6 +150,11 @@ | |||||||
|                 <td> |                 <td> | ||||||
|                     {{ item.isbn|default:'' }} |                     {{ item.isbn|default:'' }} | ||||||
|                 </td> |                 </td> | ||||||
|  |                 {% if job.source == "OpenLibrary" %} | ||||||
|  |                 <td> | ||||||
|  |                     {{ item.openlibrary_key }} | ||||||
|  |                 </td> | ||||||
|  |                 {% endif %} | ||||||
|                 <td> |                 <td> | ||||||
|                     {{ item.normalized_data.authors }} |                     {{ item.normalized_data.authors }} | ||||||
|                 </td> |                 </td> | ||||||
|   | |||||||
| @@ -14,6 +14,7 @@ from bookwyrm.importers import ( | |||||||
|     LibrarythingImporter, |     LibrarythingImporter, | ||||||
|     GoodreadsImporter, |     GoodreadsImporter, | ||||||
|     StorygraphImporter, |     StorygraphImporter, | ||||||
|  |     OpenLibraryImporter, | ||||||
| ) | ) | ||||||
|  |  | ||||||
| # pylint: disable= no-self-use | # pylint: disable= no-self-use | ||||||
| @@ -49,6 +50,8 @@ class Import(View): | |||||||
|             importer = LibrarythingImporter() |             importer = LibrarythingImporter() | ||||||
|         elif source == "Storygraph": |         elif source == "Storygraph": | ||||||
|             importer = StorygraphImporter() |             importer = StorygraphImporter() | ||||||
|  |         elif source == "OpenLibrary": | ||||||
|  |             importer = OpenLibraryImporter() | ||||||
|         else: |         else: | ||||||
|             # Default : Goodreads |             # Default : Goodreads | ||||||
|             importer = GoodreadsImporter() |             importer = GoodreadsImporter() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user