Handles [C] followed by non-numbered lines, by assigned them all to [C1]

This commit is contained in:
Martin Thompson 2010-06-22 22:24:24 +01:00
parent e8a397d3ec
commit 9c573d7bef
2 changed files with 8 additions and 4 deletions

View File

@ -48,6 +48,7 @@ class OpenSongImport:
or:
<lyrics>
[V]
1List of words
2Some words for the 2nd Verse
@ -55,9 +56,9 @@ class OpenSongImport:
2etc...
</lyrics>
Either or both forms can be used in one song.
Either or both forms can be used in one song. The Number does not necessarily appear at the start of the line
The [v1] labels can have either upper or loewr case Vs
The [v1] labels can have either upper or lower case Vs
Other labels can be used also:
C - Chorus
B - Bridge
@ -134,7 +135,7 @@ class OpenSongImport:
versenum=int(l[2:right_bracket])
versetag=u'%s%d'%(versetype,versenum)
else:
versenum = None # allow error trap
versenum = 1
continue
words=None
@ -180,6 +181,7 @@ class OpenSongImport:
assert len(our_verse_order)>0
order=our_verse_order
for tag in order:
print tag
if not versetags.has_key(tag):
raise OpenSongImportError
else:

View File

@ -27,10 +27,12 @@
[b1]
Bridge 1
Bridge 1 line 2
[C1]
[C]
. A B
Chorus 1
[C2]
. A B
Chorus 2
</lyrics>
<style index="default_style">