Skip to content

Commit

Permalink
Merge branch 'release/1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
schneiderfelipe committed Jan 17, 2018
2 parents 739888f + 493838b commit a6aba22
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Felipe Silveira de Souza Schneider
Copyright (c) 2016--2018 Felipe Silveira de Souza Schneider

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ any more.
## Usage

$ doi2bib 10.1021/la203078w 10.1103/PhysRev.140.A1133

@article{Cabaleiro_Lago_2012,
title={The Effect of Nanoparticles on Amyloid Aggregation Depends on the Protein Stability and Intrinsic Aggregation Rate},
volume={28},
Expand Down
11 changes: 6 additions & 5 deletions doi2bib
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# The MIT License (MIT)
#
# Copyright (c) 2016 Felipe Silveira de Souza Schneider
# Copyright (c) 2016--2018 Felipe Silveira de Souza Schneider
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
#? doi2bib 1.0
#? doi2bib 1.1
#?
#? Convert Digital Object Identifier (DOI) to BibTeX using crosscite.org.
#? DOIs are received and the corresponding BibTeX entries are output.
Expand Down Expand Up @@ -73,7 +73,8 @@ for doi in "$@"; do

# we retrieve the data from http://dx.doi.org/
curl -s -LH "Accept: text/bibliography; style=bibtex" "http://dx.doi.org/${doi}" | \
sed -e 's/^ *//' \
-e 's/, /,\n /g' \
-e 's/}}$/}\n}\n/'
sed -e $'s/^ *//' \
-e $'s/}, /},\\\n /g' \
-e $'s/, /,\\\n /1' \
-e $'s/}}$/}\\\n}\\\n/'
done

0 comments on commit a6aba22

Please sign in to comment.