Skip to content

Commit 392368c

Browse files
committed
2 parents b90e6a3 + b9a77f9 commit 392368c

File tree

6 files changed

+126
-7
lines changed

6 files changed

+126
-7
lines changed

_includes/author-profile.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h3 class="author__name">{{ author.name }}</h3>
2828
<li class="author__desktop"><i class="fa-solid fa-location-dot icon-pad-right" aria-hidden="true"></i>{{ author.location }}</li>
2929
{% endif %}
3030
{% if author.employer %}
31-
<li class="author__desktop"><i class="fa fa-solid fa-building-columns icon-pad-right" aria-hidden="true"></i>{{ author.employer }}</li>
31+
<li class="author__desktop"><i class="fas fa-fw fa-building-columns icon-pad-right" aria-hidden="true"></i>{{ author.employer }}</li>
3232
{% endif %}
3333
{% if author.uri %}
3434
<li><a href="{{ author.uri }}"><i class="fas fa-fw fa-link icon-pad-right" aria-hidden="true"></i>{{ site.data.ui-text[site.locale].website_label | default: "Website" }}</a></li>

_sass/_footer.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
@include clearfix;
2828
margin-left: auto;
2929
margin-right: auto;
30-
margin-top: 2em;
30+
margin-top: 1em;
3131
max-width: 100%;
32-
padding: 0 1em 2em;
32+
padding: 0 1em 1em;
3333

3434
@include breakpoint($x-large) {
3535
max-width: $x-large;

_sass/_masthead.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
white-space: nowrap;
5353

5454
&--lg {
55-
padding-right: 3em;
55+
padding-right: 2em;
5656
font-weight: 700;
5757
}
5858
}

_sass/_navigation.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@
405405
font-weight: bold;
406406
line-height: 1.5;
407407
border-bottom: 1px solid $border-color;
408+
text-decoration-line: none !important;
408409

409410
&:hover {
410411
color: #000;

_sass/_variables.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ $x-large : 1280px !default;
132132
Grid
133133
========================================================================== */
134134

135-
$right-sidebar-width-narrow : 0px;
136-
$right-sidebar-width : 0px;
137-
$right-sidebar-width-wide : 0px;
135+
$right-sidebar-width-narrow : 200px !default;
136+
$right-sidebar-width : 300px !default;
137+
$right-sidebar-width-wide : 400px !default;
138138

139139
$susy: (
140140
columns: 12,

scripts/OrcidToBib.ipynb

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "01f0c5c2-619a-48e0-bb7c-e5e0be009f0e",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"orcid = '0000-0000-0000-0000' # Fill your orcid here"
11+
]
12+
},
13+
{
14+
"cell_type": "code",
15+
"execution_count": null,
16+
"id": "2fe4bc4e-4574-4322-8b18-0c4d33a749fa",
17+
"metadata": {},
18+
"outputs": [],
19+
"source": [
20+
"import requests"
21+
]
22+
},
23+
{
24+
"cell_type": "markdown",
25+
"id": "44a8b6cd-4034-4fc4-85a8-e3431dc564f1",
26+
"metadata": {},
27+
"source": [
28+
"We use the `/works` api to list all works related to the orcid. This gives a summary of all works, so citation information is not included. We collect the `put-code` of all works to retrieve the citation information later."
29+
]
30+
},
31+
{
32+
"cell_type": "code",
33+
"execution_count": null,
34+
"id": "3b04331e-4149-4ca3-a0aa-89e3ba892723",
35+
"metadata": {},
36+
"outputs": [],
37+
"source": [
38+
"response = requests.get('https://pub.orcid.org/v3.0/{}/works'.format(orcid),\n",
39+
" headers={\"Accept\": \"application/orcid+json\" })\n",
40+
"record = response.json()"
41+
]
42+
},
43+
{
44+
"cell_type": "code",
45+
"execution_count": null,
46+
"id": "16f7c42d-623b-421a-8d87-bbb389313e3b",
47+
"metadata": {
48+
"scrolled": true
49+
},
50+
"outputs": [],
51+
"source": [
52+
"put_codes = []\n",
53+
"for work in record['group']:\n",
54+
" put_code = work['work-summary'][0]['put-code']\n",
55+
" put_codes.append(put_code)\n",
56+
"put_code = put_codes[0]"
57+
]
58+
},
59+
{
60+
"cell_type": "markdown",
61+
"id": "25e5d2aa-5233-486e-abce-a0d07a36c5ce",
62+
"metadata": {},
63+
"source": [
64+
"We use the `/<orcid>/work/<put-code>` endpoint to retrieve the citation information for each record."
65+
]
66+
},
67+
{
68+
"cell_type": "code",
69+
"execution_count": null,
70+
"id": "dd797a16-0d91-4271-8e1e-b82579a07e45",
71+
"metadata": {},
72+
"outputs": [],
73+
"source": [
74+
"citations = []\n",
75+
"for put_code in put_codes:\n",
76+
" response = requests.get('https://pub.orcid.org/v3.0/{}/work/{}'.format(orcid, put_code),\n",
77+
" headers={\"Accept\": \"application/orcid+json\" })\n",
78+
" work = response.json()\n",
79+
" if work['citation'] is not None:\n",
80+
" citations.append(work['citation']['citation-value'])"
81+
]
82+
},
83+
{
84+
"cell_type": "code",
85+
"execution_count": null,
86+
"id": "ad763df9-261f-41f3-bc32-00921d0a4e11",
87+
"metadata": {},
88+
"outputs": [],
89+
"source": [
90+
"with open('output.bib', 'w') as bibfile:\n",
91+
" for citation in citations:\n",
92+
" bibfile.write(citation)\n",
93+
" bibfile.write('\\n')"
94+
]
95+
}
96+
],
97+
"metadata": {
98+
"kernelspec": {
99+
"display_name": "Python 3 (ipykernel)",
100+
"language": "python",
101+
"name": "python3"
102+
},
103+
"language_info": {
104+
"codemirror_mode": {
105+
"name": "ipython",
106+
"version": 3
107+
},
108+
"file_extension": ".py",
109+
"mimetype": "text/x-python",
110+
"name": "python",
111+
"nbconvert_exporter": "python",
112+
"pygments_lexer": "ipython3",
113+
"version": "3.12.6"
114+
}
115+
},
116+
"nbformat": 4,
117+
"nbformat_minor": 5
118+
}

0 commit comments

Comments
 (0)