powersong module provides the functionality for importing
PowerSong songs into the OpenLP database.
PowerSongImportclass provides the ability to import song files from PowerSong.
PowerSong 1.0 Song File Format:
The file has a number of label-field (think key-value) pairs.
Label and Field strings:
- Every label and field is a variable length string preceded by an integer specifying it’s byte length.
- Integer is 32-bit but is encoded in 7-bit format to save space. Thus if length will fit in 7 bits (ie <= 127) it takes up only one byte.
- Every PowerSong file has a TITLE field.
- There is zero or more AUTHOR fields.
- There is always a COPYRIGHTLINE label, but its field may be empty. This field may also contain a CCLI number: e.g. “CCLI 176263”.
- Each verse is contained in a PART field.
- Lines have Windows line endings
- There is no concept of verse types.
Valid extensions for a PowerSong song file are:
Receive either a list of files or a folder (unicode) to import.
- Checks if source is a PowerSong 1.0 folder:
- is a directory
- contains at least one *.song file