diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-11-08 19:25:04 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-11-08 19:25:04 +0100 |
| commit | 2fd066e9c3cb0e45d7a055d090084f941a40fadb (patch) | |
| tree | 64314ae67241923d8433fcd8d76cdd53392dd50c /s2-doi-report.py | |
| parent | e409d67308ba81a95df9740db59f501b23bb1228 (diff) | |
taking another look at the papers
Diffstat (limited to 's2-doi-report.py')
| -rw-r--r-- | s2-doi-report.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/s2-doi-report.py b/s2-doi-report.py index 8be76192..d2facb92 100644 --- a/s2-doi-report.py +++ b/s2-doi-report.py @@ -98,7 +98,9 @@ def load_ieee(paper_id, fn): print('could not read data') return [] affiliations = [ author['affiliation'] for author in data['authors'] ] + institutions = [ [ paper_id, author['affiliation'], author['affiliation'] ] for author in data['authors'] ] # print(affiliations) + write_json('{}/{}'.format(paper_path(paper_id), 'institutions.json'), { 'institutions': institutions }) return affiliations def load_geocode_lookup(): @@ -110,23 +112,14 @@ def load_geocode_lookup(): lookup[inst[3]] = True return lookup -class NameLine(object): - def __init__(self, s): - self.s = s.strip() - def __str__(self): - return '<span class="name">' + self.s + '</span>' - -class BoldLine(object): - def __init__(self, s): - self.s = s.strip() - def __str__(self): - return '<b>' + self.s + '</b>' - def find_authors(authors, line): for a in authors: if a[2] in line: return a return None +def paper_path(paper_id): + return '{}/{}/{}'.format(DOI_DIR, paper_id[0:2], paper_id) + if __name__ == '__main__': doi_report() |
