Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bruno Chareyre
3sr-biblio
Commits
2928db8c
Commit
2928db8c
authored
Jun 11, 2021
by
Bruno Chareyre
Browse files
one output without "book" type
parent
2a85a13e
Pipeline
#69478
passed with stages
in 9 minutes and 55 seconds
Changes
1
Pipelines
13
Hide whitespace changes
Inline
Side-by-side
create_html.py
View file @
2928db8c
...
...
@@ -163,16 +163,11 @@ def get_biblio_structure(structure_name, structure_id, n_publi=100):
def
get_biblio_orcid
(
name
=
'Chareyre'
,
orcid
=
'0000-0001-8505-8540'
,
N
=
10
,
typesLists
=
[[
'journal-article'
],[
'journal-article'
,
'conference-paper'
,
'book'
,
'book-chapter'
],[
'all'
]]):
BRIDGE_TYPES
=
{
"ART"
:
"journal-article"
,
"COMM"
:
"Conferences"
,
"COUV"
:
"Books"
,
"THESE"
:
"These"
}
req
=
"https://pub.orcid.org/v3.0/"
+
orcid
+
"/works"
#req = "http://api.archives-ouvertes.fr/search/?q=(authIdHal_s:{s})&sort={so} desc&rows={n}&fl=*".format(s=idhal, n=N_PUBLI_MAX, so=SORT_BY)
publis_by_type
=
dict
()
individual_types
=
dict
()
api_error
=
dict
()
publis
=
requests
.
get
(
req
,
headers
=
{
'Accept'
:
'application/json'
,}).
json
()
publis
=
publis
[
"group"
]
#req_author = 'https://api.archives-ouvertes.fr/ref/author/?q=idHal_s:{s}'.format(s=idhal)
#idhal_info = requests.get(req_author).json()
req_author
=
'req_author'
idhal_info
=
'idhal_info'
for
i
,
publi
in
enumerate
(
publis
):
work
=
publi
.
get
(
"work-summary"
)[
0
]
type
=
BRIDGE_TYPES
.
get
(
work
.
get
(
"type"
))
if
BRIDGE_TYPES
.
get
(
work
.
get
(
"type"
))
is
not
None
else
work
.
get
(
"type"
)
...
...
@@ -225,7 +220,7 @@ def get_biblio_orcid(name='Chareyre',orcid='0000-0001-8505-8540',N=10,typesLists
return
files
def
get_biblio_group_orcid
(
groupName
=
'geo'
,
N
=
20
,
typesLists
=
[[
'journal-article'
],[
'journal-article'
,
'conference-paper'
,
'book'
,
'book-chapter'
],[
'all'
]]):
def
get_biblio_group_orcid
(
groupName
=
'geo'
,
N
=
20
,
typesLists
=
[[
'journal-article'
],[
'journal-article'
,
'conference-paper'
,
'book'
,
'book-chapter'
],[
'
journal-article'
,
'conference-paper'
,
'book-chapter'
],[
'
all'
]]):
global
test
BRIDGE_TYPES
=
{
"ART"
:
"journal-article"
,
"COMM"
:
"Conferences"
,
"COUV"
:
"Books"
,
"THESE"
:
"These"
}
publis_by_type
=
dict
()
...
...
@@ -235,14 +230,8 @@ def get_biblio_group_orcid(groupName='geo',N=20,typesLists = [['journal-article'
name
=
author
orcid
=
group
[
name
]
req
=
"https://pub.orcid.org/v3.0/"
+
orcid
+
"/works"
#req = "http://api.archives-ouvertes.fr/search/?q=(authIdHal_s:{s})&sort={so} desc&rows={n}&fl=*".format(s=idhal, n=N_PUBLI_MAX, so=SORT_BY)
api_error
=
dict
()
publis
=
requests
.
get
(
req
,
headers
=
{
'Accept'
:
'application/json'
,}).
json
()
publis
=
publis
[
"group"
]
#req_author = 'https://api.archives-ouvertes.fr/ref/author/?q=idHal_s:{s}'.format(s=idhal)
#idhal_info = requests.get(req_author).json()
req_author
=
'req_author'
idhal_info
=
'idhal_info'
for
i
,
publi
in
enumerate
(
publis
):
work
=
publi
.
get
(
"work-summary"
)[
0
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment