Move importers into module

This commit is contained in:
Mouse Reeve
2021-03-30 08:56:25 -07:00
parent 1f0c4f86c2
commit 754ccaedd6
8 changed files with 16 additions and 10 deletions

View File

@ -0,0 +1,16 @@
""" handle reading a csv from goodreads """
from . import Importer
class GoodreadsImporter(Importer):
"""GoodReads is the default importer, thus Importer follows its structure.
For a more complete example of overriding see librarything_import.py"""
service = "GoodReads"
def parse_fields(self, entry):
""" handle the specific fields in goodreads csvs """
entry.update({"import_source": self.service})
# add missing 'Date Started' field
entry.update({"Date Started": None})
return entry