The wordsofworship module provides the functionality for importing Words of Worship songs into the OpenLP database.

class openlp.plugins.songs.lib.importers.wordsofworship.WordsOfWorshipImport(manager, **kwargs)[source]

Bases: openlp.plugins.songs.lib.importers.songimport.SongImport

The WordsOfWorshipImport class provides the ability to import song files from Words of Worship.

Words Of Worship Song File Format:

The Words Of Worship song file format is as follows:

  • The song title is the file name minus the extension.
  • The song has a header, a number of blocks, followed by footer containing the author and the copyright.
  • A block can be a verse, chorus or bridge.
File Header:
Bytes are counted from one, i.e. the first byte is byte 1. The first 19 bytes should be “WoW File nSong Words” The bytes after this and up to the 56th byte, can change but no real meaning has been found. The 56th byte specifies how many blocks there are. The first block starts with byte 83 after the “CSongDoc::CBlock” declaration.

Each block has a starting header, some lines of text, and an ending footer. Each block starts with a 32 bit number, which specifies how many lines are in that block.

Each block ends with a 32 bit number, which defines what type of block it is:

  • NUL (0x00) - Verse
  • SOH (0x01) - Chorus
  • STX (0x02) - Bridge

Blocks are separated by two bytes. The first byte is 0x01, and the second byte is 0x80.

Each line starts with a byte which specifies how long that line is, the line text, and ends with a null byte.

The footer follows on after the last block, the first byte specifies the length of the author text, followed by the author text, if this byte is null, then there is no author text. The byte after the author text specifies the length of the copyright text, followed by the copyright text.

The file is ended with four null bytes.

Valid extensions for a Words of Worship song file are:

  • .wsg
  • .wow-song

Receive a single file or a list of files to import.