bookwyrm-mastodon/bookwyrm/goodreads_import.py

14 lines
490 B
Python
Raw Normal View History

2020-03-29 03:05:09 -04:00
''' handle reading a csv from goodreads '''
2021-02-20 11:02:36 -05:00
from bookwyrm.importer import Importer
2021-02-20 11:02:36 -05:00
# GoodReads is the default importer, thus Importer follows its structure. For a more complete example of overriding see librarything_import.py
2020-03-29 03:05:09 -04:00
2021-02-20 11:02:36 -05:00
class GoodreadsImporter(Importer):
service = 'GoodReads'
2020-03-25 08:58:27 -04:00
2021-02-20 11:02:36 -05:00
def parse_fields(self, data):
data.update({'import_source': self.service })
# add missing 'Date Started' field
data.update({'Date Started': None })
return data