|
@ -1,23 +1,36 @@ |
|
|
#!/usr/bin/python |
|
|
#!/usr/bin/python |
|
|
# -*- coding: utf-8 -*- |
|
|
# -*- coding: utf-8 -*- |
|
|
|
|
|
|
|
|
|
|
|
# warning: lines beginning with ## are parsed by |
|
|
|
|
|
# the songbook-client as rules categories |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import glob |
|
|
import glob |
|
|
|
|
|
|
|
|
# the dictionary has target_word:replacement_word pairs |
|
|
# the dictionary has target_word:replacement_word pairs |
|
|
word_dic = { |
|
|
word_dic = { |
|
|
#oe inclusion |
|
|
##: oe inclusion |
|
|
"coeur": "cœur", |
|
|
"coeur": "cœur", |
|
|
"boeuf": "bœuf", |
|
|
"boeuf": "bœuf", |
|
|
"oeuvre": "œuvre", |
|
|
"oeuvre": "œuvre", |
|
|
"soeur": "sœur", |
|
|
"soeur": "sœur", |
|
|
"noeud": "nœud", |
|
|
"noeud": "nœud", |
|
|
"oeil": "œil", |
|
|
"oeil": "œil", |
|
|
|
|
|
"voeu": "vœu", |
|
|
"oe{}": "œ", |
|
|
"oe{}": "œ", |
|
|
#punctuation |
|
|
##: Punctuation |
|
|
"’": "'", |
|
|
"’": "'", |
|
|
"Ca ": "Ça ", |
|
|
"Ca ": "Ça ", |
|
|
"...": "\\dots ", |
|
|
"...": "\\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é]", |
|
|
"\\[Re]": "\\[Ré]", |
|
|
"b]": "&]", |
|
|
"b]": "&]", |
|
|
#Do |
|
|
#Do |
|
|