Skip to content

Commit

Permalink
CSV added as parameter in run_get_all_documents_py
Browse files Browse the repository at this point in the history
  • Loading branch information
Mazztok45 committed Feb 8, 2024
1 parent 3bee580 commit 084adff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/zbmath_rest2oai/get_all_de.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
from zbmath_rest2oai.writeOai import write_oai

# from https://stackoverflow.com/a/38677619/9215209
CSV_URL = 'https://github.com/MaRDI4NFDI/python-zbMathRest2Oai/releases/download/test/all_de_240115.csv'


def get_all_de(api_source):
def get_all_de(api_source,CSV_URL):
with requests.get(CSV_URL, stream=True) as r:
lines = (line.decode('utf-8') for line in r.iter_lines())
for row in csv.reader(lines):
Expand Down
2 changes: 1 addition & 1 deletion src/zbmath_rest2oai/run_get_all_de_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
CSV_URL = 'https://github.com/MaRDI4NFDI/python-zbMathRest2Oai/releases/download/test/all_de_240115.csv'

if __name__ == '__main__':
get_all_de('https://api.zbmath.org/v1/document/')
get_all_de('https://api.zbmath.org/v1/document/',CSV_URL)

0 comments on commit 084adff

Please sign in to comment.