|
@ -5,16 +5,16 @@ |
|
|
#Description: apply typo rules depending on language for songs (.sg files) |
|
|
#Description: apply typo rules depending on language for songs (.sg files) |
|
|
#Commentary: to be merge with latex-preprocessing script |
|
|
#Commentary: to be merge with latex-preprocessing script |
|
|
|
|
|
|
|
|
for song in songs/*/*.sg; do |
|
|
for song in $@; do |
|
|
|
|
|
echo $song |
|
|
if grep -q "selectlanguage{english}" $song |
|
|
if grep -q "selectlanguage{english}" $song |
|
|
then |
|
|
then |
|
|
sed -i \ |
|
|
sed -i \ |
|
|
-e 's/(\s)*?/?/g' \ |
|
|
-e 's/[\s]*?/?/g' \ |
|
|
-e 's/(\s)*!/!/g' \ |
|
|
-e 's/[\s]*!/!/g' \ |
|
|
-e 's/(\s)*:/:/g' \ |
|
|
-e 's/[\s]*:/:/g' \ |
|
|
$song; |
|
|
$song; |
|
|
fi; |
|
|
elif grep -q "selectlanguage{french}" $song |
|
|
if grep -q "selectlanguage{french}" $song |
|
|
|
|
|
then |
|
|
then |
|
|
sed -i \ |
|
|
sed -i \ |
|
|
-e 's/\([^ ]\)?/\1 ?/g' \ |
|
|
-e 's/\([^ ]\)?/\1 ?/g' \ |
|
|