diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-11-15 13:11:52 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-11-15 13:15:15 -0800 |
commit | bb28a3fc1cc900f2dde31e1dbc492d9661034f41 (patch) | |
tree | f037dd3d1bab6cbf08a562dbdd4c09361fe0c030 /python/fatcat_tools/importers/issn.py | |
parent | 9f817c6c70a749f2ac449ab4edfd26c6dd8a7410 (diff) | |
download | fatcat-bb28a3fc1cc900f2dde31e1dbc492d9661034f41.tar.gz fatcat-bb28a3fc1cc900f2dde31e1dbc492d9661034f41.zip |
large refactor of python names/paths
- Add __init__.py files for fatcat_tools submodules, and use them in
imports
- Add a bunch of comments to files.
- rename a number of classes and functions to be less verbose
Diffstat (limited to 'python/fatcat_tools/importers/issn.py')
-rw-r--r-- | python/fatcat_tools/importers/issn.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/python/fatcat_tools/importers/issn.py b/python/fatcat_tools/importers/issn.py index ba8492c6..0b0efccb 100644 --- a/python/fatcat_tools/importers/issn.py +++ b/python/fatcat_tools/importers/issn.py @@ -3,10 +3,8 @@ import sys import json import itertools import fatcat_client -from fatcat_tools.importers.common import FatcatImporter +from .common import FatcatImporter -# CSV format (generated from git.archive.org/webgroup/oa-journal-analysis): -# ISSN-L,in_doaj,in_road,in_norwegian,in_crossref,title,publisher,url,lang,ISSN-print,ISSN-electronic,doi_count,has_doi,is_oa,is_kept,publisher_size,url_live,url_live_status,url_live_final_status,url_live_final_url,url_live_status_simple,url_live_final_status_simple,url_domain,gwb_pdf_count def or_none(s): if s is None: @@ -26,7 +24,15 @@ def truthy(s): else: return None -class FatcatIssnImporter(FatcatImporter): +class IssnImporter(FatcatImporter): + """ + Imports journal metadata ("containers") by ISSN, currently from a custom + (data munged) .csv file format + + CSV format (generated from git.archive.org/webgroup/oa-journal-analysis): + + ISSN-L,in_doaj,in_road,in_norwegian,in_crossref,title,publisher,url,lang,ISSN-print,ISSN-electronic,doi_count,has_doi,is_oa,is_kept,publisher_size,url_live,url_live_status,url_live_final_status,url_live_final_url,url_live_status_simple,url_live_final_status_simple,url_domain,gwb_pdf_count + """ def parse_issn_row(self, row): """ |