importer¶
The importer
modules provides the general song import functionality.
-
class
openlp.plugins.songs.lib.importer.
SongFormat
[source]¶ Bases:
object
This is a special static class that holds an enumeration of the various song formats handled by the importer, the attributes of each song format, and a few helper functions.
Required attributes for each song format:
'class'
- Import class, e.g.
OpenLyricsImport
'name'
- Name of the format, e.g.
'OpenLyrics'
'prefix'
- Prefix for Qt objects. Use mixedCase, e.g.
'openLyrics'
SeeSongImportForm.add_file_select_item()
Optional attributes for each song format:
'canDisable'
- Whether song format importer is disablable.
If
True
, then'disabledLabelText'
must also be defined. 'availability'
- Whether song format importer is available.
'selectMode'
- Whether format accepts single file, multiple files, or single folder
(as per
SongFormatSelect
options). 'filter'
- File extension filter for
QFileDialog
.
Optional/custom text Strings for
SongImportForm
widgets:'comboBoxText'
- Combo box selector (default value is the format’s
'name'
). 'disabledLabelText'
- Required for disablable song formats.
'getFilesTitle'
- Title for
QFileDialog
(default includes the format’s'name'
). 'invalidSourceMsg'
- Message displayed if
is_valid_source()
returnsFalse
. 'descriptionText'
- Short description (1-2 lines) about the song format.
-
CCLI
= 3¶
-
ChordPro
= 4¶
-
DreamBeam
= 5¶
-
EasySlides
= 6¶
-
EasyWorshipDB
= 7¶
-
EasyWorshipService
= 9¶
-
EasyWorshipSqliteDB
= 8¶
-
FoilPresenter
= 10¶
-
Generic
= 2¶
-
Lyrix
= 11¶
-
MediaShout
= 12¶
-
OPSPro
= 14¶
-
OpenLP2
= 1¶
-
OpenLyrics
= 0¶
-
OpenSong
= 13¶
-
PowerPraise
= 15¶
-
PowerSong
= 16¶
-
PresentationManager
= 17¶
-
ProPresenter
= 18¶
-
SongBeamer
= 19¶
-
SongPro
= 20¶
-
SongShowPlus
= 21¶
-
SongsOfFellowship
= 22¶
-
SundayPlus
= 23¶
-
Unknown
= -1¶
-
VideoPsalm
= 24¶
-
WordsOfWorship
= 25¶
-
WorshipAssistant
= 26¶
-
WorshipCenterPro
= 27¶
-
ZionWorx
= 28¶
-
static
get
(song_format, *attributes)[source]¶ Return requested song format attribute(s).
Parameters: - song_format – A song format from SongFormat.
- attributes – Zero or more song format attributes from SongFormat.
Return type depends on number of supplied attributes:
0: Return dict containing all defined attributes for the format. 1: Return the attribute value. >1: Return tuple of requested attribute values.