Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wiki
Manage
Activity
Members
Labels
Plan
Issues
53
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MDM Lab
Wiki
Commits
e6b4d3f3
Commit
e6b4d3f3
authored
1 year ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
get the preprint as well
parent
a7694263
No related branches found
No related tags found
1 merge request
!224
Resolve "Rework references"
Pipeline
#124492
waiting for manual action with stages
in 11 minutes and 57 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/df-wiki-cli/df_wiki_cli/articles/__init__.py
+4
-4
4 additions, 4 deletions
packages/df-wiki-cli/df_wiki_cli/articles/__init__.py
packages/df-wiki-cli/df_wiki_cli/articles/main.py
+2
-1
2 additions, 1 deletion
packages/df-wiki-cli/df_wiki_cli/articles/main.py
with
6 additions
and
5 deletions
packages/df-wiki-cli/df_wiki_cli/articles/__init__.py
+
4
−
4
View file @
e6b4d3f3
...
@@ -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
"
)
This diff is collapsed.
Click to expand it.
packages/df-wiki-cli/df_wiki_cli/articles/main.py
+
2
−
1
View file @
e6b4d3f3
...
@@ -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
(
"
*
"
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment