File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 4
4
# doi2bib
5
5
#
6
6
# purpose: get bibtex reference from DOI
7
+ # license: MIT License
7
8
# author: François-Xavier Coudert
8
9
# e-mail: fxcoudert@gmail.com
9
10
# updated: 2016-01-08
@@ -208,6 +209,12 @@ crossRefKey = "fx.coudert@chimie-paristech.fr"
208
209
209
210
def getCrossRef (doi ):
210
211
212
+ # Maybe we got a DOI URL instead of the DOI itself -- strip prefix
213
+ if doi [0 :8 ] == "https://" : doi = doi [8 :]
214
+ if doi [0 :7 ] == "http://" : doi = doi [7 :]
215
+ if doi [0 :3 ] == "dx." : doi = doi [3 :]
216
+ if doi [0 :8 ] == "doi.org/" : doi = doi [8 :]
217
+
211
218
# Get the XML from CrossRef
212
219
params = urlencode ({ "id" : "doi:" + doi , "noredirect" : "true" ,
213
220
"pid" : crossRefKey , "format" : "unixref" })
Original file line number Diff line number Diff line change 4
4
# texsize
5
5
#
6
6
# purpose: list graphics file included in latex doc, and their size
7
+ # license: MIT License
7
8
# author: François-Xavier Coudert
8
9
# e-mail: fxcoudert@gmail.com
9
10
# updated: 2014-05-12
You can’t perform that action at this time.
0 commit comments