diff --git a/OpenLP.spec b/OpenLP.spec deleted file mode 100644 index 9569af6c1..000000000 --- a/OpenLP.spec +++ /dev/null @@ -1,19 +0,0 @@ -# -*- mode: python -*- -a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'), os.path.join(HOMEPATH,'support\\useUnicode.py'), 'openlp.pyw'], - pathex=[os.path.abspath('.')]) -pyz = PYZ(a.pure) -exe = EXE(pyz, - a.scripts, - exclude_binaries=1, - name=os.path.join('build\\pyi.win32\\OpenLP', 'OpenLP.exe'), - debug=False, - strip=False, - upx=True, - console=False , icon='resources\\images\\OpenLP.ico') -coll = COLLECT( exe, - a.binaries, - a.zipfiles, - a.datas, - strip=False, - upx=True, - name=os.path.join('dist', 'OpenLP')) diff --git a/documentation/source/conf.py b/documentation/source/conf.py index 86ad3b7de..248c83e56 100644 --- a/documentation/source/conf.py +++ b/documentation/source/conf.py @@ -17,7 +17,7 @@ import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.append(os.path.abspath(os.path.join('..', '..'))) +sys.path.insert(0, os.path.abspath(os.path.join('..', '..'))) # -- General configuration ----------------------------------------------------- diff --git a/documentation/source/core/lib.rst b/documentation/source/core/lib.rst index 43ca90b3b..5fc66200d 100644 --- a/documentation/source/core/lib.rst +++ b/documentation/source/core/lib.rst @@ -60,12 +60,6 @@ .. autoclass:: openlp.core.lib.settingstab.SettingsTab :members: -:mod:`ThemeXML` ---------------- - -.. autoclass:: openlp.core.lib.themexmlhandler.ThemeXML - :members: - :mod:`OpenLPToolbar` -------------------- diff --git a/documentation/source/manual/index.rst b/documentation/source/manual/index.rst new file mode 100644 index 000000000..2ed7824fe --- /dev/null +++ b/documentation/source/manual/index.rst @@ -0,0 +1,22 @@ +.. OpenLP documentation master file, created by + sphinx-quickstart on Thu Sep 30 21:24:54 2010. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to OpenLP's documentation +================================== + +Contents: + +.. toctree:: + :maxdepth: 2 + + introduction + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/documentation/source/manual/introduction.rst b/documentation/source/manual/introduction.rst new file mode 100644 index 000000000..02ecf7dbd --- /dev/null +++ b/documentation/source/manual/introduction.rst @@ -0,0 +1,46 @@ +============= +Introduction +============= + +About +----- + +OpenLP is an open source lyrics projection application developed specifically +for churches. It is licensed under the GNU Generic Public License, which means +that it is free to use and distribute, and it stays free. + +Lyrics Projection +----------------- + +OpenLP's purpose is to project the lyrics of songs and Bible verses using a +computer and a data projector. OpenLP also has the ability to project videos, +images, and also play audio. OpenLP also is highly customizable providing users +with the ability to set up a wide variety of themes, including themes with +video backgrounds. + +Open Source +----------- + +OpenLP is open source software. This means that the source code (the +programming instructions the developers write) is open to anyone who wants to +look at it. This gives you, the end user, a few freedoms. + +From a developer's perspective, it gives you the freedom to inspect the code +and make sure that it is not malicious. Also, it gives you the freedom to +change the code and the freedom to "fork" the project and make it your own. + +For end users open source software gives you the freedom to use software as +you wish. You are not required to pay for the software and you are free to +make copies and distribute it to anyone you want. + +GNU General Public License +-------------------------- + +The GNU General Public License was specifically chosen because it ensures the +above mentioned freedoms. It specifically states that you are not allowed +to charge for the software, and that you have to distribute the source code as +well. + +You can find a copy of the GNU General Public License from the Help menu +selecting about OpenLP or on-line +at: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt diff --git a/documentation/source/plugins/bibles.rst b/documentation/source/plugins/bibles.rst index c042feb56..5f2c688d5 100644 --- a/documentation/source/plugins/bibles.rst +++ b/documentation/source/plugins/bibles.rst @@ -1,7 +1,7 @@ .. _plugins-bibles: -:mod:`bibles` Plugin -==================== +Bibles Plugin +============= .. automodule:: openlp.plugins.bibles :members: @@ -60,8 +60,8 @@ .. autoclass:: openlp.plugins.bibles.lib.http.HTTPBible :members: -:mod:`bibleOSISimpl` -^^^^^^^^^^^^^^^^^^^^ +:mod:`osis` +^^^^^^^^^^^ .. automodule:: openlp.plugins.bibles.lib.osis :members: @@ -69,18 +69,21 @@ .. autoclass:: openlp.plugins.bibles.lib.osis.OSISBible :members: +:mod:`opensong` +^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.bibles.lib.opensong + :members: + +.. autoclass:: openlp.plugins.bibles.lib.opensong.OpenSongBible + :members: + :mod:`biblestab` ^^^^^^^^^^^^^^^^ .. automodule:: openlp.plugins.bibles.lib.biblestab :members: -:mod:`common` -^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.bibles.lib.common - :members: - :mod:`manager` ^^^^^^^^^^^^^^ diff --git a/documentation/source/plugins/images.rst b/documentation/source/plugins/images.rst new file mode 100644 index 000000000..d4d6fa265 --- /dev/null +++ b/documentation/source/plugins/images.rst @@ -0,0 +1,8 @@ +.. _plugins-images: + +Images Plugin +============= + +.. automodule:: openlp.plugins.images + :members: + diff --git a/documentation/source/plugins/index.rst b/documentation/source/plugins/index.rst index 713005c3d..6c5b139d5 100644 --- a/documentation/source/plugins/index.rst +++ b/documentation/source/plugins/index.rst @@ -11,24 +11,9 @@ songs bibles - -:mod:`presentations` Plugin ---------------------------- - -.. automodule:: openlp.plugins.presentations - :members: - -:mod:`media` Plugin -------------------- - -.. automodule:: openlp.plugins.media - :members: - -:mod:`images` Plugin --------------------- - -.. automodule:: openlp.plugins.images - :members: + presentations + media + images :mod:`custom` Plugin -------------------- diff --git a/documentation/source/plugins/media.rst b/documentation/source/plugins/media.rst new file mode 100644 index 000000000..637fec634 --- /dev/null +++ b/documentation/source/plugins/media.rst @@ -0,0 +1,8 @@ +.. _plugins-media: + +Media Plugin +============ + +.. automodule:: openlp.plugins.media + :members: + diff --git a/documentation/source/plugins/presentations.rst b/documentation/source/plugins/presentations.rst new file mode 100644 index 000000000..dd688ddf6 --- /dev/null +++ b/documentation/source/plugins/presentations.rst @@ -0,0 +1,40 @@ +.. _plugins-presentations: + +Presentations Plugin +==================== + +Plugin Class +------------ + +.. autoclass:: openlp.plugins.presentations.presentationplugin.PresentationPlugin + :members: + +Helper Classes & Functions +-------------------------- + +.. automodule:: openlp.plugins.presentations.lib + :members: + +.. automodule:: openlp.plugins.presentations.lib.mediaitem + :members: + +.. automodule:: openlp.plugins.presentations.lib.presentationtab + :members: + +.. automodule:: openlp.plugins.presentations.lib.messagelistener + :members: + +.. automodule:: openlp.plugins.presentations.lib.presentationcontroller + :members: + +Presentation Application Controllers +------------------------------------ + +.. automodule:: openlp.plugins.presentations.lib.impresscontroller + :members: + +.. automodule:: openlp.plugins.presentations.lib.pptviewcontroller + :members: + +.. automodule:: openlp.plugins.presentations.lib.powerpointcontroller + :members: diff --git a/documentation/source/plugins/songs.rst b/documentation/source/plugins/songs.rst index fab10f02d..5378ba7d7 100644 --- a/documentation/source/plugins/songs.rst +++ b/documentation/source/plugins/songs.rst @@ -1,13 +1,13 @@ .. _plugins-songs: -:mod:`songs` Plugin -=================== +Songs Plugin +============ .. automodule:: openlp.plugins.songs :members: -:mod:`SongsPlugin` Class ------------------------- +:class:`SongsPlugin` Class +-------------------------- .. autoclass:: openlp.plugins.songs.songsplugin.SongsPlugin :members: @@ -18,8 +18,8 @@ .. automodule:: openlp.plugins.songs.forms :members: -:mod:`AuthorsForm` -^^^^^^^^^^^^^^^^^^ +:class:`AuthorsForm` +^^^^^^^^^^^^^^^^^^^^ .. autoclass:: openlp.plugins.songs.forms.authorsdialog.Ui_AuthorsDialog :members: @@ -27,8 +27,8 @@ .. autoclass:: openlp.plugins.songs.forms.authorsform.AuthorsForm :members: -:mod:`EditSongForm` -^^^^^^^^^^^^^^^^^^^ +:class:`EditSongForm` +^^^^^^^^^^^^^^^^^^^^^ .. autoclass:: openlp.plugins.songs.forms.editsongdialog.Ui_EditSongDialog :members: @@ -36,11 +36,158 @@ .. autoclass:: openlp.plugins.songs.forms.editsongform.EditSongForm :members: -:mod:`EditVerseForm` -^^^^^^^^^^^^^^^^^^^^ +:class:`EditVerseForm` +^^^^^^^^^^^^^^^^^^^^^^ .. autoclass:: openlp.plugins.songs.forms.editversedialog.Ui_EditVerseDialog :members: .. autoclass:: openlp.plugins.songs.forms.editverseform.EditVerseForm :members: + +:class:`SongBookForm` +^^^^^^^^^^^^^^^^^^^^^ + +.. autoclass:: openlp.plugins.songs.forms.songbookdialog.Ui_SongBookDialog + :members: + +.. autoclass:: openlp.plugins.songs.forms.songbookform.SongBookForm + :members: + +:class:`SongImportForm` +^^^^^^^^^^^^^^^^^^^^^^^ + +.. autoclass:: openlp.plugins.songs.forms.songimportwizard.Ui_SongImportWizard + :members: + +.. autoclass:: openlp.plugins.songs.forms.songimportform.ImportWizardForm + :members: + +:class:`SongMaintenanceForm` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. autoclass:: openlp.plugins.songs.forms.songmaintenancedialog.Ui_SongMaintenanceDialog + :members: + +.. autoclass:: openlp.plugins.songs.forms.songmaintenanceform.SongMaintenanceForm + :members: + +:class:`TopicsForm` +^^^^^^^^^^^^^^^^^^^ + +.. autoclass:: openlp.plugins.songs.forms.topicsdialog.Ui_TopicsDialog + :members: + +.. autoclass:: openlp.plugins.songs.forms.topicsform.TopicsForm + :members: + +:mod:`lib` Submodule +-------------------- + +.. automodule:: openlp.plugins.songs.lib + :members: + +:mod:`cclifileimport` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.cclifileimport + :members: + +.. autoclass:: openlp.plugins.songs.lib.cclifileimport.CCLIFileImportError + :members: + +:mod:`db` Submodule +^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.db + :members: + +:mod:`ewimport` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.ewimport + :members: + +.. autoclass:: openlp.plugins.songs.lib.ewimport.FieldDescEntry + :members: + +:mod:`importer` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.importer + :members: + +:mod:`mediaitem` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.mediaitem + :members: + +.. autoclass:: openlp.plugins.songs.lib.mediaitem.SongListView + :members: + +:mod:`olp1import` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.olp1import + :members: + +:mod:`olpimport` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.olpimport + :members: + +:mod:`oooimport` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.oooimport + :members: + +:mod:`opensongimport` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.opensongimport + :members: + +:mod:`sofimport` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.sofimport + :members: + +:mod:`songbeamerimport` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.songbeamerimport + :members: + +:mod:`songimport` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.songimport + :members: + +:mod:`songstab` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.songstab + :members: + +:mod:`wowimport` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.wowimport + :members: + +:mod:`songxml` Submodule +^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.songxml + :members: + +:mod:`xml` Submodule +^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: openlp.plugins.songs.lib.xml + :members: diff --git a/openlp.pyw b/openlp.pyw index 80b49321e..17743903f 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -30,6 +30,7 @@ import sys import logging from optparse import OptionParser from traceback import format_exception +from subprocess import Popen, PIPE from PyQt4 import QtCore, QtGui @@ -71,6 +72,84 @@ class OpenLP(QtGui.QApplication): """ log.info(u'OpenLP Application Loaded') + def _get_version(self): + """ + Load and store current Application Version + """ + if u'--dev-version' in sys.argv: + # If we're running the dev version, let's use bzr to get the version + try: + # If bzrlib is availble, use it + from bzrlib.branch import Branch + b = Branch.open_containing('.')[0] + b.lock_read() + try: + # Get the branch's latest revision number. + revno = b.revno() + # Convert said revision number into a bzr revision id. + revision_id = b.dotted_revno_to_revision_id((revno,)) + # Get a dict of tags, with the revision id as the key. + tags = b.tags.get_reverse_tag_dict() + # Check if the latest + if revision_id in tags: + full_version = u'%s' % tags[revision_id][0] + else: + full_version = '%s-bzr%s' % \ + (sorted(b.tags.get_tag_dict().keys())[-1], revno) + finally: + b.unlock() + except: + # Otherwise run the command line bzr client + bzr = Popen((u'bzr', u'tags', u'--sort', u'time'), stdout=PIPE) + output, error = bzr.communicate() + code = bzr.wait() + if code != 0: + raise Exception(u'Error running bzr tags') + lines = output.splitlines() + if len(lines) == 0: + tag = u'0.0.0' + revision = u'0' + else: + tag, revision = lines[-1].split() + bzr = Popen((u'bzr', u'log', u'--line', u'-r', u'-1'), + stdout=PIPE) + output, error = bzr.communicate() + code = bzr.wait() + if code != 0: + raise Exception(u'Error running bzr log') + latest = output.split(u':')[0] + full_version = latest == revision and tag or \ + u'%s-bzr%s' % (tag, latest) + else: + # We're not running the development version, let's use the file + filepath = AppLocation.get_directory(AppLocation.VersionDir) + filepath = os.path.join(filepath, u'.version') + fversion = None + try: + fversion = open(filepath, u'r') + full_version = unicode(fversion.read()).rstrip() + except IOError: + log.exception('Error in version file.') + full_version = u'0.0.0-bzr000' + finally: + if fversion: + fversion.close() + bits = full_version.split(u'-') + app_version = { + u'full': full_version, + u'version': bits[0], + u'build': bits[1] if len(bits) > 1 else None + } + if app_version[u'build']: + log.info( + u'Openlp version %s build %s', + app_version[u'version'], + app_version[u'build'] + ) + else: + log.info(u'Openlp version %s' % app_version[u'version']) + return app_version + def notify(self, obj, evt): #TODO needed for presentation exceptions return QtGui.QApplication.notify(self, obj, evt) @@ -79,39 +158,7 @@ class OpenLP(QtGui.QApplication): """ Run the OpenLP application. """ - #Load and store current Application Version - filepath = AppLocation.get_directory(AppLocation.VersionDir) - filepath = os.path.join(filepath, u'.version') - fversion = None - try: - fversion = open(filepath, u'r') - for line in fversion: - full_version = unicode(line).rstrip() #\ - #.replace(u'\r', u'').replace(u'\n', u'') - bits = full_version.split(u'-') - app_version = { - u'full': full_version, - u'version': bits[0], - u'build': bits[1] if len(bits) > 1 else None - } - if app_version[u'build']: - log.info( - u'Openlp version %s build %s', - app_version[u'version'], - app_version[u'build'] - ) - else: - log.info(u'Openlp version %s' % app_version[u'version']) - except IOError: - log.exception('Error in version file.') - app_version = { - u'full': u'1.9.0-bzr000', - u'version': u'1.9.0', - u'build': u'bzr000' - } - finally: - if fversion: - fversion.close() + app_version = self._get_version() #provide a listener for widgets to reqest a screen update. QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'openlp_process_events'), self.processEvents) @@ -172,6 +219,9 @@ def main(): parser.add_option('-p', '--portable', dest='portable', action='store_true', help='Specify if this should be run as a ' 'portable app, off a USB flash drive (not implemented).') + parser.add_option('-d', '--dev-version', dest='dev_version', + action='store_true', help='Ignore the version file and pull the ' + 'version directly from Bazaar') parser.add_option('-s', '--style', dest='style', help='Set the Qt4 style (passed directly to Qt4).') # Set up logging diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 560450741..52ebe99c8 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -313,7 +313,7 @@ def expand_tags(text): from spelltextedit import SpellTextEdit from eventreceiver import Receiver from settingsmanager import SettingsManager -from plugin import PluginStatus, Plugin +from plugin import PluginStatus, StringContent, Plugin from pluginmanager import PluginManager from settingstab import SettingsTab from serviceitem import ServiceItem diff --git a/openlp/core/lib/eventreceiver.py b/openlp/core/lib/eventreceiver.py index a4f683e81..1080cd2f5 100644 --- a/openlp/core/lib/eventreceiver.py +++ b/openlp/core/lib/eventreceiver.py @@ -75,7 +75,7 @@ class EventReceiver(QtCore.QObject): Broadcasts that an item has been made live/previewed ``slidecontroller_{live|preview}_change`` - Informs the slidecontroller that a slide change has occurred and to + Informs the slidecontroller that a slide change has occurred and to update itself ``slidecontroller_{live|preview}_changed`` @@ -83,7 +83,7 @@ class EventReceiver(QtCore.QObject): ``slidecontroller_{live|preview}_text_request`` Request the text for the current item in the controller - Returns a slidecontroller_{live|preview}_text_response with an + Returns a slidecontroller_{live|preview}_text_response with an array of dictionaries with the tag and verse text ``slidecontroller_{live|preview}_blank`` @@ -106,23 +106,23 @@ class EventReceiver(QtCore.QObject): ``servicemanager_set_item`` Go live on a specific item, by index - + ``servicemanager_list_request`` Request the service list. Responds with servicemanager_list_response containing a array of dictionaries ``maindisplay_blank`` - Blank the maindisplay window + Blank the maindisplay window ``maindisplay_hide`` - Hide the maindisplay window + Hide the maindisplay window ``maindisplay_show`` - Return the maindisplay window + Return the maindisplay window ``maindisplay_active`` The maindisplay has been made active - + ``maindisplay_status_text`` Changes the bottom status bar text on the maindisplay window @@ -193,9 +193,17 @@ class EventReceiver(QtCore.QObject): ``{plugin}_add_service_item`` Ask the plugin to push the selected items to the service item + ``{plugin}_service_load`` + Ask the plugin to process an individual service item after it has been + loaded + + ``service_item_update`` + Passes back to the service manager the service item after it has been + processed by the plugin + ``alerts_text`` Displays an alert message - + ``bibles_nobook`` Attempt to find book resulted in no match diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index 765d0f9fa..511046fe3 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -55,14 +55,17 @@ body { background-color: black; display: none; } -#image { +#bgimage { z-index:1; } -#video1 { +#image { z-index:2; } +#video1 { + z-index:3; +} #video2 { - z-index:2; + z-index:3; } #alert { position: absolute; @@ -73,7 +76,7 @@ body { } #footer { position: absolute; - z-index:5; + z-index:6; %s } /* lyric css */ @@ -112,7 +115,7 @@ body { vid2.volume = volume; } switch(state){ - case 'init': + case 'init': vid.src = path; vid2.src = path; if(loop == null) loop = false; @@ -294,7 +297,8 @@ body { - + +