From a3a77d499542880cdc8062c77a81624812fbba03 Mon Sep 17 00:00:00 2001 From: crep Date: Sun, 18 Jul 2010 17:07:00 +0200 Subject: [PATCH] Utils: add rules to latex-preprocessing --- utils/latex-preprocessing.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/utils/latex-preprocessing.py b/utils/latex-preprocessing.py index 71237b88..27f61bfc 100755 --- a/utils/latex-preprocessing.py +++ b/utils/latex-preprocessing.py @@ -1,23 +1,36 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# warning: lines beginning with ## are parsed by +# the songbook-client as rules categories + + import glob # the dictionary has target_word:replacement_word pairs word_dic = { -#oe inclusion +##: oe inclusion "coeur": "cœur", "boeuf": "bœuf", "oeuvre": "œuvre", "soeur": "sœur", "noeud": "nœud", "oeil": "œil", +"voeu": "vœu", "oe{}": "œ", -#punctuation +##: Punctuation "’": "'", "Ca ": "Ça ", "...": "\\dots ", -#Chords +##: Conversion from anglo-saxon conventions +"\\[A": "\\[La", +"\\[B": "\\[Si", +"\\[C": "\\[Do", +"\\[D]": "\\[Ré]", +"\\[E": "\\[Mi", +"\\[F]": "\\[Fa]", +"\\[G": "\\[Sol", +##: Guitar tabs "\\[Re]": "\\[Ré]", "b]": "&]", #Do