~googol-deactivatedaccount/openlp/bug-1296104-2.0

« back to all changes in this revision

Viewing changes to openlp/plugins/songs/lib/dreambeamimport.py

  • Committer: Tim Bentley
  • Author(s): Raoul Snyman
  • Date: 2014-01-19 08:10:39 UTC
  • mfrom: (2186.1.4 bug-1157938-2.0)
  • Revision ID: tim.bentley@gmail.com-20140119081039-cx7dsu8lo2sm47w8
Try to fix bug #1157938 by changing all the png icons to svg
Change the copyright year

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
###############################################################################
5
5
# OpenLP - Open Source Lyrics Projection                                      #
6
6
# --------------------------------------------------------------------------- #
7
 
# Copyright (c) 2008-2013 Raoul Snyman                                        #
8
 
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
 
7
# Copyright (c) 2008-2014 Raoul Snyman                                        #
 
8
# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
9
9
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
10
10
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
11
11
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
46
46
    """
47
47
    The :class:`DreamBeamImport` class provides the ability to import song files from
48
48
    DreamBeam.
49
 
    
 
49
 
50
50
    An example of DreamBeam xml mark-up::
51
 
    
 
51
 
52
52
        <?xml version="1.0"?>
53
 
        <DreamSong xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 
53
        <DreamSong xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
54
54
            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
55
55
          <WordWrap>false</WordWrap>
56
56
          <Version>0.80</Version>
84
84
 
85
85
        * \*.xml
86
86
    """
87
 
    
 
87
 
88
88
    def doImport(self):
89
89
        """
90
90
        Receive a single file or a list of files to import.
125
125
                            verse_type =  lyrics_item.get(u'Type')
126
126
                            verse_number = lyrics_item.get(u'Number')
127
127
                            verse_text = unicode(lyrics_item.text)
128
 
                            self.addVerse(verse_text, 
 
128
                            self.addVerse(verse_text,
129
129
                                (u'%s%s' % (verse_type[:1], verse_number)))
130
130
                    if hasattr(song_xml, u'Collection'):
131
131
                        self.songBookName = unicode(song_xml.Collection.text)
135
135
                        for LyricsSequenceItem in (
136
136
                            song_xml.Sequence.iterchildren()):
137
137
                            self.verseOrderList.append(
138
 
                                "%s%s" % (LyricsSequenceItem.get(u'Type')[:1], 
 
138
                                "%s%s" % (LyricsSequenceItem.get(u'Type')[:1],
139
139
                                LyricsSequenceItem.get(u'Number')))
140
140
                    if hasattr(song_xml, u'Notes'):
141
141
                        self.comments = unicode(song_xml.Notes.text)