Skip to content

Commit 5f708df

Browse files
committedJul 4, 2017
Add license
1 parent a074324 commit 5f708df

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
 

‎doi2bib

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# doi2bib
55
#
66
# purpose: get bibtex reference from DOI
7+
# license: MIT License
78
# author: François-Xavier Coudert
89
# e-mail: fxcoudert@gmail.com
910
# updated: 2016-01-08
@@ -208,6 +209,12 @@ crossRefKey = "fx.coudert@chimie-paristech.fr"
208209

209210
def getCrossRef(doi):
210211

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+
211218
# Get the XML from CrossRef
212219
params = urlencode({ "id" : "doi:" + doi, "noredirect" : "true",
213220
"pid" : crossRefKey, "format" : "unixref" })

‎texsize

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# texsize
55
#
66
# purpose: list graphics file included in latex doc, and their size
7+
# license: MIT License
78
# author: François-Xavier Coudert
89
# e-mail: fxcoudert@gmail.com
910
# updated: 2014-05-12

0 commit comments

Comments
 (0)
Please sign in to comment.