songshowplus

The songshowplus module provides the functionality for importing SongShow Plus songs into the OpenLP database.

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

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

The SongShowPlusImport class provides the ability to import song files from SongShow Plus.

SongShow Plus Song File Format:

The SongShow Plus song file format is as follows:

  • Each piece of data in the song file has some information that precedes it.

  • The general format of this data is as follows:
    4 Bytes, forming a 32 bit number, a key if you will, this describes what the data is (see blockKey below)
    4 Bytes, forming a 32 bit number, which is the number of bytes until the next block starts
    1 Byte, which tells how many bytes follows
    1 or 4 Bytes, describes how long the string is, if its 1 byte, the string is less than 255
    The next bytes are the actual data.
    The next block of data follows on.

    This description does differ for verses. Which includes extra bytes stating the verse type or number. In some cases a “custom” verse is used, in that case, this block will in include 2 strings, with the associated string length descriptors. The first string is the name of the verse, the second is the verse content.

    The file is ended with four null bytes.

    Valid extensions for a SongShow Plus song file are:

    • .sbsong
decode(data)[source]
do_import()[source]

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

other_count = 0
other_list = {}
to_openlp_verse_tag(verse_name, ignore_unique=False)[source]

Handle OpenLP verse tags

Parameters:
  • verse_name – The verse name
  • ignore_unique – Ignore if unique
Returns:

The verse tags and verse number concatenated