From 2fd066e9c3cb0e45d7a055d090084f941a40fadb Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 8 Nov 2018 19:25:04 +0100 Subject: taking another look at the papers --- s2-doi-report.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 's2-doi-report.py') 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 '' + self.s + '' - -class BoldLine(object): - def __init__(self, s): - self.s = s.strip() - def __str__(self): - return '' + self.s + '' - 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() -- cgit v1.2.3-70-g09d2