2021-03-08 16:49:10 +00:00
|
|
|
""" handle reading a csv from goodreads """
|
2021-03-30 15:56:25 +00:00
|
|
|
from . import Importer
|
2020-03-25 12:29:21 +00:00
|
|
|
|
2020-03-29 07:05:09 +00:00
|
|
|
|
2021-02-20 16:02:36 +00:00
|
|
|
class GoodreadsImporter(Importer):
|
2021-10-15 20:47:28 +00:00
|
|
|
"""Goodreads is the default importer, thus Importer follows its structure.
|
2021-03-30 15:46:22 +00:00
|
|
|
For a more complete example of overriding see librarything_import.py"""
|
2021-03-30 15:43:38 +00:00
|
|
|
|
2021-10-15 20:47:28 +00:00
|
|
|
service = "Goodreads"
|
2020-03-25 12:58:27 +00:00
|
|
|
|
2021-03-30 15:43:38 +00:00
|
|
|
def parse_fields(self, entry):
|
2021-04-26 16:15:42 +00:00
|
|
|
"""handle the specific fields in goodreads csvs"""
|
2021-03-30 15:43:38 +00:00
|
|
|
entry.update({"import_source": self.service})
|
2021-02-20 16:02:36 +00:00
|
|
|
# add missing 'Date Started' field
|
2021-03-30 15:43:38 +00:00
|
|
|
entry.update({"Date Started": None})
|
|
|
|
return entry
|