forked from openlp/openlp
Remove unnecessary import and move one more constant to module level. Thanks, Tim.
This commit is contained in:
parent
7871dfdf00
commit
16186c3960
@ -25,7 +25,6 @@
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
|
||||
@ -33,16 +32,7 @@ from openlp.plugins.songs.lib import VerseType, retrieve_windows_encoding
|
||||
from openlp.plugins.songs.lib import strip_rtf
|
||||
from openlp.plugins.songs.lib.songimport import SongImport
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
class SundayPlusImport(SongImport):
|
||||
"""
|
||||
Import Sunday Plus songs
|
||||
|
||||
The format examples can be found attached to bug report at
|
||||
<http://support.openlp.org/issues/395>
|
||||
"""
|
||||
HOTKEY_TO_VERSE_TYPE = {
|
||||
HOTKEY_TO_VERSE_TYPE = {
|
||||
u'1': u'v1',
|
||||
u'2': u'v2',
|
||||
u'3': u'v3',
|
||||
@ -56,6 +46,14 @@ class SundayPlusImport(SongImport):
|
||||
u'+': u'b',
|
||||
u'Z': u'o'}
|
||||
|
||||
class SundayPlusImport(SongImport):
|
||||
"""
|
||||
Import Sunday Plus songs
|
||||
|
||||
The format examples can be found attached to bug report at
|
||||
<http://support.openlp.org/issues/395>
|
||||
"""
|
||||
|
||||
def __init__(self, manager, **kwargs):
|
||||
"""
|
||||
Initialise the class.
|
||||
@ -146,8 +144,8 @@ class SundayPlusImport(SongImport):
|
||||
# Hotkey always appears after MARKER_NAME, so it
|
||||
# effectively overrides MARKER_NAME, if present.
|
||||
if len(value) and \
|
||||
value in self.HOTKEY_TO_VERSE_TYPE.keys():
|
||||
verse_type = self.HOTKEY_TO_VERSE_TYPE[value]
|
||||
value in HOTKEY_TO_VERSE_TYPE.keys():
|
||||
verse_type = HOTKEY_TO_VERSE_TYPE[value]
|
||||
if name == 'rtf':
|
||||
value = self.unescape(value)
|
||||
verse, self.encoding = strip_rtf(value, self.encoding)
|
||||
|
Loading…
Reference in New Issue
Block a user