Skip to content
Snippets Groups Projects
Commit e6b4d3f3 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

get the preprint as well

parent a7694263
No related branches found
No related tags found
1 merge request!224Resolve "Rework references"
Pipeline #124492 waiting for manual action with stages
in 11 minutes and 57 seconds
...@@ -22,7 +22,7 @@ def fetch_articles_from_zotero( ...@@ -22,7 +22,7 @@ def fetch_articles_from_zotero(
format="csljson", format="csljson",
limit=batch_size, limit=batch_size,
start=i, start=i,
# itemType="journalArticle", itemType="journalArticle || Preprint",
sort="title", sort="title",
)["items"] )["items"]
for item in items: for item in items:
...@@ -143,7 +143,7 @@ def add_articles_to_zotero_from_doi(doi, key): ...@@ -143,7 +143,7 @@ def add_articles_to_zotero_from_doi(doi, key):
items_to_add = [zitem] items_to_add = [zitem]
zot.check_items(items_to_add) zot.check_items(items_to_add)
res = zot.create_items(items_to_add) # res = zot.create_items(items_to_add)
new_item = res["successful"]["0"] # new_item = res["successful"]["0"]
zot.addto_collection("BSWL96X3", new_item) # zot.addto_collection("BSWL96X3", new_item)
console.print("[green]done") console.print("[green]done")
...@@ -63,7 +63,8 @@ def missing_doi( ...@@ -63,7 +63,8 @@ def missing_doi(
zotero_data = json.load(zotero_f) zotero_data = json.load(zotero_f)
for d in zotero_data: for d in zotero_data:
if "DOI" in d: if "DOI" in d:
zotero_dois_set.add(d["DOI"].lower()) doi_lower = d["DOI"].lower()
zotero_dois_set.add(doi_lower)
dois_set = set() dois_set = set()
for file in dir.rglob("*"): for file in dir.rglob("*"):
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment