Created
January 12, 2013 09:53
-
-
Save mlund/4517019 to your computer and use it in GitHub Desktop.
Simplistic shell script to convert xmgrace (.agr files) figures to PDF. White borders will be removed in the conversion process using `pdfcrop`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tmpfile=".tmp.pdf" | |
if [ $# -ge 1 ]; then | |
if [ $1 != "-h" ]; then | |
outfile=`dirname $1`/`basename "$1" \.agr`.pdf | |
LANG=en xmgrace -hardcopy -hdevice PDF $1 -printfile $tmpfile | |
pdfcrop $tmpfile $outfile | |
rm -f $tmpfile | |
exit | |
fi | |
fi | |
echo "Usage: `basename $0` file.agr" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment