Skip to content

Instantly share code, notes, and snippets.

@btskinner
Last active September 30, 2017 20:07
Show Gist options
  • Save btskinner/f22e53e0a840c31d21f478b7996cfa98 to your computer and use it in GitHub Desktop.
Save btskinner/f22e53e0a840c31d21f478b7996cfa98 to your computer and use it in GitHub Desktop.
BibDesk to Jekyll scholar brace fix
#!/bin/bash
# PURPOSE
#
# To fix {{...}} used by BibDesk that don't play well with Jekyll scholar.
# Replaces {{...}} with "{...}". This respects capitalization and corporation
# names in the author field, but doesn't break Jekyll scholar.
#
# USAGE
#
# ./fixbib.sh <name of bib file>
#
# NB
#
# May need to make executable w/:
#
# chmod +x fixbib.sh
#
bib=$1
cat $bib | sed 's/{{\(.*\)}}/"{\1}"/g' > tmp
mv tmp $bib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment