From 2b0328e011185ef9525787565c116a6dc55a3a53 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sun, 7 Dec 2008 08:09:59 +0000 Subject: [PATCH] Added the "lib" module for the Songs plugin. bzr-revno: 195 --- .eric4project/openlp.org 2.0.e4q | 2 +- .eric4project/openlp.org 2.0.e4t | 2 +- openlp.org 2.0.e4p | 4 ++-- openlp/core/pluginmanager.py | 1 - openlp/plugins/songs/lib/__init__.py | 21 +++++++++++++++++++++ openlp/plugins/songs/songxml.py | 8 +++++--- 6 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 openlp/plugins/songs/lib/__init__.py diff --git a/.eric4project/openlp.org 2.0.e4q b/.eric4project/openlp.org 2.0.e4q index 5b48947ec..4de5bd776 100644 --- a/.eric4project/openlp.org 2.0.e4q +++ b/.eric4project/openlp.org 2.0.e4q @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/.eric4project/openlp.org 2.0.e4t b/.eric4project/openlp.org 2.0.e4t index 387c6b2dd..eb5050431 100644 --- a/.eric4project/openlp.org 2.0.e4t +++ b/.eric4project/openlp.org 2.0.e4t @@ -1,7 +1,7 @@ - + TODO: what is the tags for bridge, pre-chorus? diff --git a/openlp.org 2.0.e4p b/openlp.org 2.0.e4p index 322e8469c..ffbfd2325 100644 --- a/openlp.org 2.0.e4p +++ b/openlp.org 2.0.e4p @@ -1,7 +1,7 @@ - + Python @@ -80,11 +80,11 @@ openlp/plugins/bibles/lib/bibleDBimpl.py openlp/plugins/bibles/lib/bibleOSISimpl.py openlp/plugins/bibles/lib/bibleHTTPimpl.py - openlp/plugins/bibles/lib/bibleCommon.py openlp/plugins/bibles/lib/bibleCSVimpl.py openlp/plugins/bibles/__init__.py openlp/plugins/bibles/lib/__init__.py openlp/plugins/bibles/forms/__init__.py + openlp/plugins/bibles/lib/biblecommon.py
resources/forms/bibleimport.ui
diff --git a/openlp/core/pluginmanager.py b/openlp/core/pluginmanager.py index 7e96ce764..454d90db8 100644 --- a/openlp/core/pluginmanager.py +++ b/openlp/core/pluginmanager.py @@ -66,7 +66,6 @@ class PluginManager(object): try: __import__(modulename, globals(), locals(), []) except ImportError, e: - print e.message log.error("Failed to import module %s on path %s for reason %s", modulename, path, e.message) self.plugin_classes = Plugin.__subclasses__() self.plugins = [] diff --git a/openlp/plugins/songs/lib/__init__.py b/openlp/plugins/songs/lib/__init__.py new file mode 100644 index 000000000..f516b1381 --- /dev/null +++ b/openlp/plugins/songs/lib/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 +""" +OpenLP - Open Source Lyrics Projection +Copyright (c) 2008 Raoul Snyman +Portions copyright (c) 2008 Martin Thompson, Tim Bentley, + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program; if not, write to the Free Software Foundation, Inc., 59 Temple +Place, Suite 330, Boston, MA 02111-1307 USA +""" + +from songxml import * diff --git a/openlp/plugins/songs/songxml.py b/openlp/plugins/songs/songxml.py index 114861201..b5e9d310f 100644 --- a/openlp/plugins/songs/songxml.py +++ b/openlp/plugins/songs/songxml.py @@ -22,7 +22,7 @@ from types import StringType, ListType, NoneType sys.path.append(os.path.abspath("./../../..")) -from openlp.core.lib.xmlrootclass import XmlRootClass +from openlp.core.lib import XmlRootClass class SongException(Exception): pass @@ -576,11 +576,11 @@ class Song(XmlRootClass) : res.extend() # remove formattingincluding themes return res - + def GetRenderSlide(self, slideNumber): """Return the slide to be rendered including the additional properties - + slideNumber -- 1 .. numberOfSlides Returns a list as: [theme (string), @@ -622,3 +622,5 @@ class Song(XmlRootClass) : # append the correct slide return res +__all__ = ['SongException', 'SongTitleError', 'SongSlideError', 'SongTypeError', + 'Song']