Created
May 22, 2017 16:16
-
-
Save fabiobatalha/1b8f72741cd2486e9909f3232d3f87e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from xylose.scielodocument import Article | |
def load_document_from_file(filename): | |
with open(filename, 'r') as f: | |
for line in f: | |
data = json.loads(line) | |
article = Article(data) | |
yield article | |
for doc in load_document_from_file('0034-7329.json'): | |
""" | |
Do you mess here | |
""" | |
print( | |
doc.original_title(), | |
doc.publication_date, | |
doc.journal.title, | |
doc.issue.label, | |
len(doc.citations) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment