fixCase.rb: https://gist.github.com/iandol/90684eee ... fixcase-rb
bookends_to_bibtex.scpt: https://gist.github.com/iandol/90684eee ... 6762d5149e
You need to put both bookends_to_bibtex.scpt and fixCase.rb on your path and the run it like so:
Code: Select all
> bookends_to_bibtex.scpt "My Group" /my/output/directory/ DEBUG
You need to edit fixCase.rb keepUpper and makeUpper lists with your own acronyms. I split this into two lists: keepUpper wraps {} only if the item is already the right case, whereas makeUpper enforces case even if the item is not the preferred case.
The script is pretty quick, it takes around 0.8s to process a 5MB bibtex file...
----
[1] I use Pandoc and CSL, however { } to protect case is valid in both CSL and BibLaTeX according to the Pandoc citeproc instructions.