songsplugin

The songsplugin module contains the Plugin class for the Songs plugin.

class openlp.plugins.songs.songsplugin.SongsPlugin[source]

Bases: openlp.core.lib.plugin.Plugin

This plugin enables the user to create, edit and display songs. Songs are divided into verses, and the verse order can be specified. Authors, topics and song books can be assigned to songs as well.

static about()[source]

Provides information for the plugin manager to display.

Returns:A translatable string with some basic information about the Songs plugin
add_export_menu_item(export_menu)[source]

Give the Songs plugin the opportunity to add items to the Export menu.

Parameters:export_menu – The actual Export menu item, so that your actions can use it as their parent.
add_import_menu_item(import_menu)[source]

Give the Songs plugin the opportunity to add items to the Import menu.

Parameters:import_menu – The actual Import menu item, so that your actions can use it as their parent.
add_tools_menu_item(tools_menu)[source]

Give the Songs plugin the opportunity to add items to the Tools menu.

Parameters:tools_menu – The actual Tools menu item, so that your actions can use it as their parent.
check_pre_conditions()[source]

Check the plugin can run.

finalise()[source]

Time to tidy up on exit

first_time()[source]

If the first time wizard has run, this function is run to import all the new songs into the database.

import_songs(import_format, **kwargs)[source]

Add the correct importer class

Parameters:
  • import_format – The import_format to be used
  • kwargs – The arguments
Returns:

the correct importer

initialise()[source]

Initialise the plugin

new_service_created()[source]

Remove temporary songs from the database

on_import_songselect_item_triggered()[source]

Run the SongSelect importer.

on_song_export_item_clicked()[source]

Run the song export wizard.

on_song_import_item_clicked()[source]

Run the song import wizard.

on_tools_find_duplicates_triggered()[source]

Search for duplicates in the song database.

on_tools_reindex_item_triggered()[source]

Rebuild each song.

static on_tools_report_song_list_triggered()[source]
rename_theme(old_theme, new_theme)[source]

Renames a theme the song plugin is using making the plugin use the new name.

Parameters:
  • old_theme – The name of the theme the plugin should stop using.
  • new_theme – The new name the plugin should now use.
set_plugin_text_strings()[source]

Called to define all translatable texts of the plugin

uses_theme(theme)[source]

Called to find out if the song plugin is currently using a theme.

Parameters:theme – The theme to check for usage
Returns:count of the number of times the theme is used.