Skip to content

Instantly share code, notes, and snippets.

@mrakitin
Created April 20, 2020 15:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrakitin/184ecabdf397a9553ae1d2f12eb392dd to your computer and use it in GitHub Desktop.
Save mrakitin/184ecabdf397a9553ae1d2f12eb392dd to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
bib_src="$HOME/Brookhaven National Laboratory/NSLS-II SUF AI-ML - Beamline Optimization/LAB-20-2261_BL-opt.bib"
xml_src="$HOME/Brookhaven National Laboratory/NSLS-II SUF AI-ML - Beamline Optimization/LAB-20-2261_BL-opt.xml"
xml_dest="$HOME/Library/Containers/com.microsoft.Word/Data/Library/Application Support/Microsoft/Office/Sources.xml"
binary="/Applications/JabRef.localized/JabRef.app/Contents/MacOS/JabRef"
# Convert .bib file to .xml:
$binary -n -o "${xml_src}",MSBib "${bib_src}"
# Get some info about the files
stat "$bib_src"
echo
stat "$xml_src"
echo
stat "$xml_dest"
echo
cp -v "${xml_src}" "${xml_dest}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment