1 from datetime import datetime
9 parser = argparse.ArgumentParser(description='Make a citation network from the cited_by json')
10 parser.add_argument('-i', help='Cited_by file')
11 parser.add_argument('-o', help='TSV output file')
12 args = parser.parse_args()
14 with open(args.i, 'r') as i:
15 with open(args.o, 'w') as o:
16 output = csv.writer(o, delimiter = '\t')
17 output.writerow(['to','from', 'date'])
19 line = json.loads(line)
20 output.writerow([line['parent_eid'], line['eid'], line['prism:coverDate']])
23 if __name__ == '__main__':