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

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

Import songs exported from OpenSong

The format is described loosely on the OpenSong File Format Specification page on the OpenSong web site. However, it doesn’t describe the <lyrics> section, so here’s an attempt:

If the first character of a line is a space, then the rest of that line is lyrics. If it is not a space the following applies.

Verses can be expressed in one of 2 ways, either in complete verses, or by line grouping, i.e. grouping all line 1’s of a verse together, all line 2’s of a verse together, and so on.

An example of complete verses:

 List of words
 Another Line

 Some words for the 2nd verse

The ‘v’ in the verse specifiers above can be left out, it is implied.

An example of line grouping:

1List of words
2Some words for the 2nd Verse

1Another Line

Either or both forms can be used in one song. The number does not necessarily appear at the start of the line. Additionally, the [v1] labels can have either upper or lower case Vs.

Other labels can be used also:


All verses are imported and tagged appropriately.

Guitar chords can be provided “above” the lyrics (the line is preceded by a period “.”), and one or more “_” can be used to signify long-drawn-out words. For example:

. A7        Bm
1 Some____ Words

Lines that contain only whitespace are ignored. | indicates a blank line, and || a new slide.

Slide 1 Line 1|Slide 1 Line 2||Slide 2 Line 1|Slide 2 Line 2

Lines beginning with ; are comments

The <presentation> tag is used to populate the OpenLP verse display order field. The Author and Copyright tags are also imported to the appropriate places.


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


Process the OpenSong file - pass in a file-like object, not a file path.