Engine for LaTeX songbooks http://www.patacrep.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
587 B

#!/bin/sh
#Author: Romain Goffe
#Date: 27/10/2010
#Description: apply typo rules depending on language for songs (.sg files)
#Commentary: to be merge with latex-preprocessing script
for song in songs/*/*.sg; do
if grep -q "selectlanguage{english}" $song
then
sed -i "s/ ?/?/g" $song;
sed -i "s/ !/!/g" $song;
sed -i "s/ :/:/g" $song;
fi;
if grep -q "selectlanguage{french}" $song
then
sed -i "s/?/ ?/g" $song;
sed -i "s/ ?/ ?/g" $song;
sed -i "s/!/ !/g" $song;
sed -i "s/ !/ !/g" $song;
sed -i "s/:/ :/g" $song;
sed -i "s/ :/ :/g" $song;
fi;
done;