Status: | Superseded |
---|---|
Proposed branch: | lp:~phill-ridout/openlp/DreamBeam |
Merge into: | lp:openlp |
Diff against target: |
340 lines (+203/-12) 5 files modified
openlp/core/ui/wizard.py (+1/-0) openlp/plugins/songs/forms/songimportform.py (+44/-1) openlp/plugins/songs/lib/dreambeamimport.py (+142/-0) openlp/plugins/songs/lib/importer.py (+14/-9) openlp/plugins/songs/lib/songshowplusimport.py (+2/-2) |
To merge this branch: | bzr merge lp:~phill-ridout/openlp/DreamBeam |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Corwin (community) | Needs Fixing | ||
Andreas Preikschat | Pending | ||
Review via email: mp+99213@code.launchpad.net |
This proposal supersedes a proposal from 2012-03-24.
This proposal has been superseded by a proposal from 2012-03-27.
Commit message
Description of the change
Adds DreamBeam song importer.
Small fix for SongShowPlus importer.
Removed errant print statment
Fixed doc string
Andreas Preikschat (googol-deactivatedaccount) wrote : Posted in a previous version of this proposal | # |
Jonathan Corwin (j-corwin) wrote : | # |
162: Just one space after the comma
167-170: Just one blank line please
218: Fix comment to say DreamBeam
251: field not feild
340: Spacing is SongShow Plus
- 1920. By Phill
-
Made changes as to Jonathan's requests
- 1921. By Phill
-
Remove constructor as per Raouls comment.
- 1922. By Phill
-
Made changes as per Andreas comments.
- 1923. By Phill
-
Added support for ALL DreamBeam file formats.
- 1924. By Phill
-
Fixed case when there is no version information
- 1925. By Phill
-
changed file version handeling.
Added check for (c) symbol if not use it for the author
- 1926. By Phill
-
removed import that sliped in!
Unmerged revisions
Preview Diff
1 | === modified file 'openlp/core/ui/wizard.py' | |||
2 | --- openlp/core/ui/wizard.py 2011-12-31 14:18:05 +0000 | |||
3 | +++ openlp/core/ui/wizard.py 2012-03-27 20:15:24 +0000 | |||
4 | @@ -46,6 +46,7 @@ | |||
5 | 46 | # the writers translating their own product name. | 46 | # the writers translating their own product name. |
6 | 47 | CCLI = u'CCLI/SongSelect' | 47 | CCLI = u'CCLI/SongSelect' |
7 | 48 | CSV = u'CSV' | 48 | CSV = u'CSV' |
8 | 49 | DB = u'DreamBeam' | ||
9 | 49 | EW = u'EasyWorship' | 50 | EW = u'EasyWorship' |
10 | 50 | ES = u'EasySlides' | 51 | ES = u'EasySlides' |
11 | 51 | FP = u'Foilpresenter' | 52 | FP = u'Foilpresenter' |
12 | 52 | 53 | ||
13 | === modified file 'openlp/plugins/songs/forms/songimportform.py' | |||
14 | --- openlp/plugins/songs/forms/songimportform.py 2011-12-31 14:18:05 +0000 | |||
15 | +++ openlp/plugins/songs/forms/songimportform.py 2012-03-27 20:15:24 +0000 | |||
16 | @@ -129,6 +129,12 @@ | |||
17 | 129 | QtCore.QObject.connect(self.ccliRemoveButton, | 129 | QtCore.QObject.connect(self.ccliRemoveButton, |
18 | 130 | QtCore.SIGNAL(u'clicked()'), | 130 | QtCore.SIGNAL(u'clicked()'), |
19 | 131 | self.onCCLIRemoveButtonClicked) | 131 | self.onCCLIRemoveButtonClicked) |
20 | 132 | QtCore.QObject.connect(self.dreamBeamAddButton, | ||
21 | 133 | QtCore.SIGNAL(u'clicked()'), | ||
22 | 134 | self.onDreamBeamAddButtonClicked) | ||
23 | 135 | QtCore.QObject.connect(self.dreamBeamRemoveButton, | ||
24 | 136 | QtCore.SIGNAL(u'clicked()'), | ||
25 | 137 | self.onDreamBeamRemoveButtonClicked) | ||
26 | 132 | QtCore.QObject.connect(self.songsOfFellowshipAddButton, | 138 | QtCore.QObject.connect(self.songsOfFellowshipAddButton, |
27 | 133 | QtCore.SIGNAL(u'clicked()'), | 139 | QtCore.SIGNAL(u'clicked()'), |
28 | 134 | self.onSongsOfFellowshipAddButtonClicked) | 140 | self.onSongsOfFellowshipAddButtonClicked) |
29 | @@ -201,6 +207,8 @@ | |||
30 | 201 | self.addFileSelectItem(u'generic', None, True) | 207 | self.addFileSelectItem(u'generic', None, True) |
31 | 202 | # CCLI File import | 208 | # CCLI File import |
32 | 203 | self.addFileSelectItem(u'ccli') | 209 | self.addFileSelectItem(u'ccli') |
33 | 210 | # DreamBeam | ||
34 | 211 | self.addFileSelectItem(u'dreamBeam') | ||
35 | 204 | # EasySlides | 212 | # EasySlides |
36 | 205 | self.addFileSelectItem(u'easySlides', single_select=True) | 213 | self.addFileSelectItem(u'easySlides', single_select=True) |
37 | 206 | # EasyWorship | 214 | # EasyWorship |
38 | @@ -248,6 +256,8 @@ | |||
39 | 248 | 'Generic Document/Presentation')) | 256 | 'Generic Document/Presentation')) |
40 | 249 | self.formatComboBox.setItemText(SongFormat.CCLI, WizardStrings.CCLI) | 257 | self.formatComboBox.setItemText(SongFormat.CCLI, WizardStrings.CCLI) |
41 | 250 | self.formatComboBox.setItemText( | 258 | self.formatComboBox.setItemText( |
42 | 259 | SongFormat.DreamBeam, WizardStrings.DB) | ||
43 | 260 | self.formatComboBox.setItemText( | ||
44 | 251 | SongFormat.EasySlides, WizardStrings.ES) | 261 | SongFormat.EasySlides, WizardStrings.ES) |
45 | 252 | self.formatComboBox.setItemText( | 262 | self.formatComboBox.setItemText( |
46 | 253 | SongFormat.EasyWorship, WizardStrings.EW) | 263 | SongFormat.EasyWorship, WizardStrings.EW) |
47 | @@ -291,6 +301,10 @@ | |||
48 | 291 | translate('SongsPlugin.ImportWizardForm', 'Add Files...')) | 301 | translate('SongsPlugin.ImportWizardForm', 'Add Files...')) |
49 | 292 | self.ccliRemoveButton.setText( | 302 | self.ccliRemoveButton.setText( |
50 | 293 | translate('SongsPlugin.ImportWizardForm', 'Remove File(s)')) | 303 | translate('SongsPlugin.ImportWizardForm', 'Remove File(s)')) |
51 | 304 | self.dreamBeamAddButton.setText( | ||
52 | 305 | translate('SongsPlugin.ImportWizardForm', 'Add Files...')) | ||
53 | 306 | self.dreamBeamRemoveButton.setText( | ||
54 | 307 | translate('SongsPlugin.ImportWizardForm', 'Remove File(s)')) | ||
55 | 294 | self.songsOfFellowshipAddButton.setText( | 308 | self.songsOfFellowshipAddButton.setText( |
56 | 295 | translate('SongsPlugin.ImportWizardForm', 'Add Files...')) | 309 | translate('SongsPlugin.ImportWizardForm', 'Add Files...')) |
57 | 296 | self.songsOfFellowshipRemoveButton.setText( | 310 | self.songsOfFellowshipRemoveButton.setText( |
58 | @@ -397,6 +411,12 @@ | |||
59 | 397 | WizardStrings.YouSpecifyFile % WizardStrings.CCLI) | 411 | WizardStrings.YouSpecifyFile % WizardStrings.CCLI) |
60 | 398 | self.ccliAddButton.setFocus() | 412 | self.ccliAddButton.setFocus() |
61 | 399 | return False | 413 | return False |
62 | 414 | elif source_format == SongFormat.DreamBeam: | ||
63 | 415 | if self.dreamBeamFileListWidget.count() == 0: | ||
64 | 416 | critical_error_message_box(UiStrings().NFSp, | ||
65 | 417 | WizardStrings.YouSpecifyFile % WizardStrings.DB) | ||
66 | 418 | self.dreamBeamAddButton.setFocus() | ||
67 | 419 | return False | ||
68 | 400 | elif source_format == SongFormat.SongsOfFellowship: | 420 | elif source_format == SongFormat.SongsOfFellowship: |
69 | 401 | if self.songsOfFellowshipFileListWidget.count() == 0: | 421 | if self.songsOfFellowshipFileListWidget.count() == 0: |
70 | 402 | critical_error_message_box(UiStrings().NFSp, | 422 | critical_error_message_box(UiStrings().NFSp, |
71 | @@ -433,7 +453,7 @@ | |||
72 | 433 | if self.songShowPlusFileListWidget.count() == 0: | 453 | if self.songShowPlusFileListWidget.count() == 0: |
73 | 434 | critical_error_message_box(UiStrings().NFSp, | 454 | critical_error_message_box(UiStrings().NFSp, |
74 | 435 | WizardStrings.YouSpecifyFile % WizardStrings.SSP) | 455 | WizardStrings.YouSpecifyFile % WizardStrings.SSP) |
76 | 436 | self.wordsOfWorshipAddButton.setFocus() | 456 | self.songShowPlusAddButton.setFocus() |
77 | 437 | return False | 457 | return False |
78 | 438 | elif source_format == SongFormat.FoilPresenter: | 458 | elif source_format == SongFormat.FoilPresenter: |
79 | 439 | if self.foilPresenterFileListWidget.count() == 0: | 459 | if self.foilPresenterFileListWidget.count() == 0: |
80 | @@ -562,6 +582,22 @@ | |||
81 | 562 | """ | 582 | """ |
82 | 563 | self.removeSelectedItems(self.ccliFileListWidget) | 583 | self.removeSelectedItems(self.ccliFileListWidget) |
83 | 564 | 584 | ||
84 | 585 | def onDreamBeamAddButtonClicked(self): | ||
85 | 586 | """ | ||
86 | 587 | Get DreamBeam song database files | ||
87 | 588 | """ | ||
88 | 589 | self.getFiles(WizardStrings.OpenTypeFile % WizardStrings.DB, | ||
89 | 590 | self.dreamBeamFileListWidget, u'%s (*.xml)' | ||
90 | 591 | % translate('SongsPlugin.ImportWizardForm', | ||
91 | 592 | 'DreamBeam Song Files') | ||
92 | 593 | ) | ||
93 | 594 | |||
94 | 595 | def onDreamBeamRemoveButtonClicked(self): | ||
95 | 596 | """ | ||
96 | 597 | Remove selected DreamBeam files from the import list | ||
97 | 598 | """ | ||
98 | 599 | self.removeSelectedItems(self.dreamBeamFileListWidget) | ||
99 | 600 | |||
100 | 565 | def onSongsOfFellowshipAddButtonClicked(self): | 601 | def onSongsOfFellowshipAddButtonClicked(self): |
101 | 566 | """ | 602 | """ |
102 | 567 | Get Songs of Fellowship song database files | 603 | Get Songs of Fellowship song database files |
103 | @@ -671,6 +707,7 @@ | |||
104 | 671 | self.openSongFileListWidget.clear() | 707 | self.openSongFileListWidget.clear() |
105 | 672 | self.wordsOfWorshipFileListWidget.clear() | 708 | self.wordsOfWorshipFileListWidget.clear() |
106 | 673 | self.ccliFileListWidget.clear() | 709 | self.ccliFileListWidget.clear() |
107 | 710 | self.dreamBeamFileListWidget.clear() | ||
108 | 674 | self.songsOfFellowshipFileListWidget.clear() | 711 | self.songsOfFellowshipFileListWidget.clear() |
109 | 675 | self.genericFileListWidget.clear() | 712 | self.genericFileListWidget.clear() |
110 | 676 | self.easySlidesFilenameEdit.setText(u'') | 713 | self.easySlidesFilenameEdit.setText(u'') |
111 | @@ -732,6 +769,12 @@ | |||
112 | 732 | importer = self.plugin.importSongs(SongFormat.CCLI, | 769 | importer = self.plugin.importSongs(SongFormat.CCLI, |
113 | 733 | filenames=self.getListOfFiles(self.ccliFileListWidget) | 770 | filenames=self.getListOfFiles(self.ccliFileListWidget) |
114 | 734 | ) | 771 | ) |
115 | 772 | elif source_format == SongFormat.DreamBeam: | ||
116 | 773 | # Import DreamBeam songs | ||
117 | 774 | importer = self.plugin.importSongs(SongFormat.DreamBeam, | ||
118 | 775 | filenames=self.getListOfFiles( | ||
119 | 776 | self.dreamBeamFileListWidget) | ||
120 | 777 | ) | ||
121 | 735 | elif source_format == SongFormat.SongsOfFellowship: | 778 | elif source_format == SongFormat.SongsOfFellowship: |
122 | 736 | # Import a Songs of Fellowship RTF file | 779 | # Import a Songs of Fellowship RTF file |
123 | 737 | importer = self.plugin.importSongs(SongFormat.SongsOfFellowship, | 780 | importer = self.plugin.importSongs(SongFormat.SongsOfFellowship, |
124 | 738 | 781 | ||
125 | === added file 'openlp/plugins/songs/lib/dreambeamimport.py' | |||
126 | --- openlp/plugins/songs/lib/dreambeamimport.py 1970-01-01 00:00:00 +0000 | |||
127 | +++ openlp/plugins/songs/lib/dreambeamimport.py 2012-03-27 20:15:24 +0000 | |||
128 | @@ -0,0 +1,142 @@ | |||
129 | 1 | # -*- coding: utf-8 -*- | ||
130 | 2 | # vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 | ||
131 | 3 | |||
132 | 4 | ############################################################################### | ||
133 | 5 | # OpenLP - Open Source Lyrics Projection # | ||
134 | 6 | # --------------------------------------------------------------------------- # | ||
135 | 7 | # Copyright (c) 2008-2012 Raoul Snyman # | ||
136 | 8 | # Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan # | ||
137 | 9 | # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, # | ||
138 | 10 | # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias # | ||
139 | 11 | # Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, # | ||
140 | 12 | # Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # | ||
141 | 13 | # --------------------------------------------------------------------------- # | ||
142 | 14 | # This program is free software; you can redistribute it and/or modify it # | ||
143 | 15 | # under the terms of the GNU General Public License as published by the Free # | ||
144 | 16 | # Software Foundation; version 2 of the License. # | ||
145 | 17 | # # | ||
146 | 18 | # This program is distributed in the hope that it will be useful, but WITHOUT # | ||
147 | 19 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # | ||
148 | 20 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # | ||
149 | 21 | # more details. # | ||
150 | 22 | # # | ||
151 | 23 | # You should have received a copy of the GNU General Public License along # | ||
152 | 24 | # with this program; if not, write to the Free Software Foundation, Inc., 59 # | ||
153 | 25 | # Temple Place, Suite 330, Boston, MA 02111-1307 USA # | ||
154 | 26 | ############################################################################### | ||
155 | 27 | """ | ||
156 | 28 | The :mod:`dreambeamimport` module provides the functionality for importing | ||
157 | 29 | DreamBeam songs into the OpenLP database. | ||
158 | 30 | """ | ||
159 | 31 | import os, sys | ||
160 | 32 | import logging | ||
161 | 33 | |||
162 | 34 | from lxml import etree, objectify | ||
163 | 35 | |||
164 | 36 | from openlp.core.lib import translate | ||
165 | 37 | from openlp.plugins.songs.lib.songimport import SongImport | ||
166 | 38 | from openlp.plugins.songs.lib.ui import SongStrings | ||
167 | 39 | |||
168 | 40 | log = logging.getLogger(__name__) | ||
169 | 41 | |||
170 | 42 | class DreamBeamImport(SongImport): | ||
171 | 43 | """ | ||
172 | 44 | The :class:`DreamBeamImport` class provides the ability to import song files from | ||
173 | 45 | DreamBeam. | ||
174 | 46 | |||
175 | 47 | An example of DreamBeam xml mark-up:: | ||
176 | 48 | |||
177 | 49 | <?xml version="1.0"?> | ||
178 | 50 | <DreamSong xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
179 | 51 | xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
180 | 52 | <WordWrap>false</WordWrap> | ||
181 | 53 | <Version>0.80</Version> | ||
182 | 54 | <Title>Amazing Grace</Title> | ||
183 | 55 | <Author>John Newton</Author> | ||
184 | 56 | <Collection /> | ||
185 | 57 | <Number /> | ||
186 | 58 | <Notes /> | ||
187 | 59 | <KeyRangeLow>F</KeyRangeLow> | ||
188 | 60 | <KeyRangeHigh>G</KeyRangeHigh> | ||
189 | 61 | <MinorKey>false</MinorKey> | ||
190 | 62 | <DualLanguage>false</DualLanguage> | ||
191 | 63 | <SongLyrics> | ||
192 | 64 | <LyricsItem Type="Verse" Number="1">Amazing Grace, how sweet the sound, | ||
193 | 65 | That saved a wretch like me. | ||
194 | 66 | I once was lost but now am found, | ||
195 | 67 | Was blind, but now, I see.</LyricsItem> | ||
196 | 68 | <LyricsItem Type="Verse" Number="2">T’was Grace that taught my heart to fear. | ||
197 | 69 | And Grace, my fears relieved. | ||
198 | 70 | How precious did that Grace appear… | ||
199 | 71 | the hour I first believed.</LyricsItem> | ||
200 | 72 | </SongLyrics> | ||
201 | 73 | <Sequence> | ||
202 | 74 | <LyricsSequenceItem Type="Verse" Number="1" /> | ||
203 | 75 | <LyricsSequenceItem Type="Verse" Number="2" /> | ||
204 | 76 | </Sequence> | ||
205 | 77 | <ShowRectangles>false</ShowRectangles> | ||
206 | 78 | </DreamSong> | ||
207 | 79 | |||
208 | 80 | Valid extensions for a DreamBeam song file are: | ||
209 | 81 | |||
210 | 82 | * \*.xml | ||
211 | 83 | """ | ||
212 | 84 | |||
213 | 85 | def __init__(self, manager, **kwargs): | ||
214 | 86 | """ | ||
215 | 87 | Initialise the DreamBeam importer. | ||
216 | 88 | """ | ||
217 | 89 | SongImport.__init__(self, manager, **kwargs) | ||
218 | 90 | |||
219 | 91 | def doImport(self): | ||
220 | 92 | """ | ||
221 | 93 | Receive a single file or a list of files to import. | ||
222 | 94 | """ | ||
223 | 95 | if isinstance(self.importSource, list): | ||
224 | 96 | self.importWizard.progressBar.setMaximum(len(self.importSource)) | ||
225 | 97 | for file in self.importSource: | ||
226 | 98 | if self.stopImportFlag: | ||
227 | 99 | return | ||
228 | 100 | self.setDefaults() | ||
229 | 101 | parser = etree.XMLParser(remove_blank_text=True) | ||
230 | 102 | try: | ||
231 | 103 | parsed_file = etree.parse(open(file, u'r'), parser) | ||
232 | 104 | except etree.XMLSyntaxError: | ||
233 | 105 | log.exception(u'XML syntax error in file %s' % file) | ||
234 | 106 | self.logError(file, SongStrings.XMLSyntaxError) | ||
235 | 107 | continue | ||
236 | 108 | xml = unicode(etree.tostring(parsed_file)) | ||
237 | 109 | song_xml = objectify.fromstring(xml) | ||
238 | 110 | if song_xml.tag != u'DreamSong': | ||
239 | 111 | self.logError(file, unicode( | ||
240 | 112 | translate('SongsPlugin.DreamBeamImport', | ||
241 | 113 | ('Invalid DreamBeam song file. Missing ' | ||
242 | 114 | 'DreamSong tag.')))) | ||
243 | 115 | continue | ||
244 | 116 | if hasattr(song_xml, u'Title'): | ||
245 | 117 | self.title = unicode(song_xml.Title.text) | ||
246 | 118 | if hasattr(song_xml, u'Author'): | ||
247 | 119 | # DreamBeam does not have a copyright field, instead it | ||
248 | 120 | # some times uses the author field | ||
249 | 121 | self.addCopyright(unicode(song_xml.Author.text)) | ||
250 | 122 | self.parseAuthor(unicode(song_xml.Author.text)) | ||
251 | 123 | if hasattr(song_xml, u'SongLyrics'): | ||
252 | 124 | for lyrics_item in song_xml.SongLyrics.iterchildren(): | ||
253 | 125 | verse_type = lyrics_item.get(u'Type') | ||
254 | 126 | verse_number = lyrics_item.get(u'Number') | ||
255 | 127 | verse_text = unicode(lyrics_item.text) | ||
256 | 128 | self.addVerse(verse_text, | ||
257 | 129 | (u'%s%s' % (verse_type[:1], verse_number))) | ||
258 | 130 | if hasattr(song_xml, u'Collection'): | ||
259 | 131 | self.songBookName = unicode(song_xml.Collection.text) | ||
260 | 132 | if hasattr(song_xml, u'Number'): | ||
261 | 133 | self.songNumber = unicode(song_xml.Number.text) | ||
262 | 134 | if hasattr(song_xml, u'Sequence'): | ||
263 | 135 | for LyricsSequenceItem in song_xml.Sequence.iterchildren(): | ||
264 | 136 | self.verseOrderList.append( | ||
265 | 137 | "%s%s" % (LyricsSequenceItem.get(u'Type')[:1], | ||
266 | 138 | LyricsSequenceItem.get(u'Number'))) | ||
267 | 139 | if hasattr(song_xml, u'Notes'): | ||
268 | 140 | self.comments = unicode(song_xml.Notes.text) | ||
269 | 141 | if not self.finish(): | ||
270 | 142 | self.logError(file) | ||
271 | 0 | 143 | ||
272 | === modified file 'openlp/plugins/songs/lib/importer.py' | |||
273 | --- openlp/plugins/songs/lib/importer.py 2011-12-31 14:18:05 +0000 | |||
274 | +++ openlp/plugins/songs/lib/importer.py 2012-03-27 20:15:24 +0000 | |||
275 | @@ -35,6 +35,7 @@ | |||
276 | 35 | from openlyricsimport import OpenLyricsImport | 35 | from openlyricsimport import OpenLyricsImport |
277 | 36 | from wowimport import WowImport | 36 | from wowimport import WowImport |
278 | 37 | from cclifileimport import CCLIFileImport | 37 | from cclifileimport import CCLIFileImport |
279 | 38 | from dreambeamimport import DreamBeamImport | ||
280 | 38 | from ewimport import EasyWorshipSongImport | 39 | from ewimport import EasyWorshipSongImport |
281 | 39 | from songbeamerimport import SongBeamerImport | 40 | from songbeamerimport import SongBeamerImport |
282 | 40 | from songshowplusimport import SongShowPlusImport | 41 | from songshowplusimport import SongShowPlusImport |
283 | @@ -73,15 +74,16 @@ | |||
284 | 73 | OpenLP1 = 2 | 74 | OpenLP1 = 2 |
285 | 74 | Generic = 3 | 75 | Generic = 3 |
286 | 75 | CCLI = 4 | 76 | CCLI = 4 |
296 | 76 | EasySlides = 5 | 77 | DreamBeam = 5 |
297 | 77 | EasyWorship = 6 | 78 | EasySlides = 6 |
298 | 78 | FoilPresenter = 7 | 79 | EasyWorship = 7 |
299 | 79 | OpenSong = 8 | 80 | FoilPresenter = 8 |
300 | 80 | SongBeamer = 9 | 81 | OpenSong = 9 |
301 | 81 | SongShowPlus = 10 | 82 | SongBeamer = 10 |
302 | 82 | SongsOfFellowship = 11 | 83 | SongShowPlus = 11 |
303 | 83 | WordsOfWorship = 12 | 84 | SongsOfFellowship = 12 |
304 | 84 | #CSV = 13 | 85 | WordsOfWorship = 13 |
305 | 86 | #CSV = 14 | ||
306 | 85 | 87 | ||
307 | 86 | @staticmethod | 88 | @staticmethod |
308 | 87 | def get_class(format): | 89 | def get_class(format): |
309 | @@ -107,6 +109,8 @@ | |||
310 | 107 | return OooImport | 109 | return OooImport |
311 | 108 | elif format == SongFormat.CCLI: | 110 | elif format == SongFormat.CCLI: |
312 | 109 | return CCLIFileImport | 111 | return CCLIFileImport |
313 | 112 | elif format == SongFormat.DreamBeam: | ||
314 | 113 | return DreamBeamImport | ||
315 | 110 | elif format == SongFormat.EasySlides: | 114 | elif format == SongFormat.EasySlides: |
316 | 111 | return EasySlidesImport | 115 | return EasySlidesImport |
317 | 112 | elif format == SongFormat.EasyWorship: | 116 | elif format == SongFormat.EasyWorship: |
318 | @@ -130,6 +134,7 @@ | |||
319 | 130 | SongFormat.OpenLP1, | 134 | SongFormat.OpenLP1, |
320 | 131 | SongFormat.Generic, | 135 | SongFormat.Generic, |
321 | 132 | SongFormat.CCLI, | 136 | SongFormat.CCLI, |
322 | 137 | SongFormat.DreamBeam, | ||
323 | 133 | SongFormat.EasySlides, | 138 | SongFormat.EasySlides, |
324 | 134 | SongFormat.EasyWorship, | 139 | SongFormat.EasyWorship, |
325 | 135 | SongFormat.FoilPresenter, | 140 | SongFormat.FoilPresenter, |
326 | 136 | 141 | ||
327 | === modified file 'openlp/plugins/songs/lib/songshowplusimport.py' | |||
328 | --- openlp/plugins/songs/lib/songshowplusimport.py 2011-12-27 10:33:55 +0000 | |||
329 | +++ openlp/plugins/songs/lib/songshowplusimport.py 2012-03-27 20:15:24 +0000 | |||
330 | @@ -25,8 +25,8 @@ | |||
331 | 25 | # Temple Place, Suite 330, Boston, MA 02111-1307 USA # | 25 | # Temple Place, Suite 330, Boston, MA 02111-1307 USA # |
332 | 26 | ############################################################################### | 26 | ############################################################################### |
333 | 27 | """ | 27 | """ |
336 | 28 | The :mod:`wowimport` module provides the functionality for importing Words of | 28 | The :mod:`songshowplusimport` module provides the functionality for importing |
337 | 29 | Worship songs into the OpenLP database. | 29 | SongShow Plus songs into the OpenLP database. |
338 | 30 | """ | 30 | """ |
339 | 31 | import os | 31 | import os |
340 | 32 | import logging | 32 | import logging |
The docstring should rather look like this:
An example of DreamBeam xml mark-up::
<?xml version="1.0"?> www.w3. org/2001/ XMLSchema- instance"
xmlns: xsd="http:// www.w3. org/2001/ XMLSchema">
<WordWrap> false</ WordWrap>
<Version> 0.80</Version>
<Title> Amazing Grace</Title>
<Author> John Newton</Author>
<Collection />
<KeyRangeLow >F</KeyRangeLow >
<KeyRangeHig h>G</KeyRangeHi gh>
<MinorKey> false</ MinorKey>
<DualLanguag e>false< /DualLanguage>
<SongLyrics>
<LyricsIte m Type="Verse" Number="1">Amazing Grace, how sweet the sound,
<LyricsIte m Type="Verse" Number="2">T’was Grace that taught my heart to fear. </LyricsItem>
</SongLyrics >
<Sequence>
<LyricsSeq uenceItem Type="Verse" Number="1" />
<LyricsSeq uenceItem Type="Verse" Number="2" />
</Sequence>
<ShowRectang les>false< /ShowRectangles >
</DreamSong>
<DreamSong xmlns:xsi="http://
<Number />
<Notes />
That saved a wretch like me.
I once was lost but now am found,
Was blind, but now, I see.</LyricsItem>
And Grace, my fears relieved.
How precious did that Grace appear…
the hour I first believed.
Valid extensions for a DreamBeam song file are:
* \*.xml
My version: http:// rst.ninjs. org/?n= 8cccf5fe3208cfc c6825032d63484a 78&theme= basic rst.ninjs. org/?n= 992060bbf63648d 8cda3ae1b7e3b07 cc&theme= basic
Your version: http://