diff --git a/bookwyrm/importers/__init__.py b/bookwyrm/importers/__init__.py index dd3d62e8b..6ce50f160 100644 --- a/bookwyrm/importers/__init__.py +++ b/bookwyrm/importers/__init__.py @@ -1,6 +1,7 @@ """ import classes """ from .importer import Importer +from .calibre_import import CalibreImporter from .goodreads_import import GoodreadsImporter from .librarything_import import LibrarythingImporter from .openlibrary_import import OpenLibraryImporter diff --git a/bookwyrm/importers/calibre_import.py b/bookwyrm/importers/calibre_import.py new file mode 100644 index 000000000..a0d712636 --- /dev/null +++ b/bookwyrm/importers/calibre_import.py @@ -0,0 +1,8 @@ +""" handle reading a csv from calibre """ +from . import Importer + + +class CalibreImporter(Importer): + """csv downloads from OpenLibrary""" + + service = "Calibre" diff --git a/bookwyrm/templates/import/import.html b/bookwyrm/templates/import/import.html index 6df7c0843..fc00389c5 100644 --- a/bookwyrm/templates/import/import.html +++ b/bookwyrm/templates/import/import.html @@ -32,6 +32,9 @@ + diff --git a/bookwyrm/views/imports/import_data.py b/bookwyrm/views/imports/import_data.py index 6e50a14cc..063545895 100644 --- a/bookwyrm/views/imports/import_data.py +++ b/bookwyrm/views/imports/import_data.py @@ -11,6 +11,7 @@ from django.views import View from bookwyrm import forms, models from bookwyrm.importers import ( + CalibreImporter, LibrarythingImporter, GoodreadsImporter, StorygraphImporter, @@ -52,6 +53,8 @@ class Import(View): importer = StorygraphImporter() elif source == "OpenLibrary": importer = OpenLibraryImporter() + elif source == "Calibre": + importer = CalibreImporter() else: # Default : Goodreads importer = GoodreadsImporter()