File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python3
2
2
#
3
- # crossref-doi-lookup.py 0.2.1
3
+ # crossref-doi-lookup.py 0.2.2
4
4
#
5
5
# Copyright Alan Orth.
6
6
#
@@ -203,6 +203,12 @@ def resolve_doi(doi: str) -> None:
203
203
except KeyError :
204
204
abstract = ""
205
205
206
+ # Get the language if it exists
207
+ try :
208
+ language = data ["message" ]["language" ]
209
+ except KeyError :
210
+ language = ""
211
+
206
212
try :
207
213
journal = data ["message" ]["container-title" ][0 ]
208
214
except IndexError :
@@ -324,6 +330,7 @@ def resolve_doi(doi: str) -> None:
324
330
{
325
331
"title" : title ,
326
332
"abstract" : abstract ,
333
+ "language" : language ,
327
334
"authors" : "||" .join (authors ),
328
335
"affiliations" : "||" .join (affiliations ),
329
336
"funders" : "||" .join (funders ),
@@ -409,6 +416,7 @@ def signal_handler(signal, frame):
409
416
fieldnames = [
410
417
"title" ,
411
418
"abstract" ,
419
+ "language" ,
412
420
"authors" ,
413
421
"affiliations" ,
414
422
"funders" ,
You can’t perform that action at this time.
0 commit comments