Browse Source

Utils: add rules to latex-preprocessing

remotes/origin/translate_notes
crep 14 years ago
parent
commit
bf6b3e8445
  1. 4
      songs/Alicia_Keys/If_aint_got_you.sg
  2. 4
      songs/Le_Donjon_de_Naheulbeuk/Noel_en_Mordor.sg
  3. 19
      utils/latex-preprocessing.py

4
songs/Alicia_Keys/If_aint_got_you.sg

@ -21,11 +21,11 @@
\endverse
\beginchorus
\[Sol7]Some \[Lam]peo\[Sim]ple \[Cmaj7]want it all, but
\[Sol7]Some \[Lam]peo\[Sim]ple \[Do7]want it all, but
I don't \[Sim]want nothing at all.
If it ain't \[Lam]you baby;
If I ain't got \[Sol7]you baby
\[Sol7]Some \[Lam]people \[Sim]want \[Cmaj7]diamond rings
\[Sol7]Some \[Lam]people \[Sim]want \[Do7]diamond rings
Some just want \[Sim]everything, but everything means
\[Lam]nothing, If I ain't got \[Sol7]you, yeah
\endchorus

4
songs/Le_Donjon_de_Naheulbeuk/Noel_en_Mordor.sg

@ -14,14 +14,14 @@
Du Mor\[Lam]{dor à} la Com\[Do]té
C'est \[Sol]Noël, c'est \[Mim]Noël
Du Mor\[Lam]{dor à} la Com\[Do]té
Tous les \[Sol]voeux sont \[Mim]exau\[Lam]cés
Tous les \[Sol]vœux sont \[Mim]exau\[Lam]cés
\endchorus
\beginverse
\[Lam]Imagi\[Sol]nez que \[Fa]Père Noël le \[Mim]vieux
\[Lam]Souhaitant sou\[Sol]dain com\[Fa]pléter sa tour\[Mim]née
\[Lam]{S'en} fut per\[Sol]du dans \[Fa]les Terres du Mi\[Mim]lieu
\[Lam]Les voeux de \[Sol]tous vou\[Fa]drait réali\[Mim]ser
\[Lam]Les vœux de \[Sol]tous vou\[Fa]drait réali\[Mim]ser
\endverse
\beginverse

19
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

Loading…
Cancel
Save