forked from openlp/openlp
Songbeamer-import: added additional verse-marks for recognition (Misc,Part,Teil,$$M=), changed check_verse_marks to handle the special mark $$M=, page-break-recognition handles now also --
This commit is contained in:
parent
3cf9094e5f
commit
69500907c0
@ -56,11 +56,15 @@ class SongBeamerTypes(object):
|
||||
'Zwischenspiel': VerseType.tags[VerseType.Bridge],
|
||||
'Pre-Chorus': VerseType.tags[VerseType.PreChorus],
|
||||
'Pre-Refrain': VerseType.tags[VerseType.PreChorus],
|
||||
'Misc': VerseType.tags[VerseType.Other],
|
||||
'Pre-Bridge': VerseType.tags[VerseType.Other],
|
||||
'Pre-Coda': VerseType.tags[VerseType.Other],
|
||||
'Part': VerseType.tags[VerseType.Other],
|
||||
'Teil': VerseType.tags[VerseType.Other],
|
||||
'Unbekannt': VerseType.tags[VerseType.Other],
|
||||
'Unknown': VerseType.tags[VerseType.Other],
|
||||
'Unbenannt': VerseType.tags[VerseType.Other]
|
||||
'Unbenannt': VerseType.tags[VerseType.Other],
|
||||
'$$M=': VerseType.tags[VerseType.Other]
|
||||
}
|
||||
|
||||
|
||||
@ -132,7 +136,8 @@ class SongBeamerImport(SongImport):
|
||||
line = str(line).strip()
|
||||
if line.startswith('#') and not read_verses:
|
||||
self.parseTags(line)
|
||||
elif line.startswith('---'):
|
||||
elif line.startswith('--'):
|
||||
# --- and -- allowed for page-breaks (difference in Songbeamer only in printout)
|
||||
if self.current_verse:
|
||||
self.replace_html_tags()
|
||||
self.add_verse(self.current_verse, self.current_verse_type)
|
||||
@ -282,4 +287,7 @@ class SongBeamerImport(SongImport):
|
||||
if marks[1].isdigit():
|
||||
self.current_verse_type += marks[1]
|
||||
return True
|
||||
elif marks[0].startswith('$$M='): # this verse-mark cannot be numbered
|
||||
self.current_verse_type = SongBeamerTypes.MarkTypes['$$M=']
|
||||
return True
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user