Some updates to the documentation:

- Added some more classes to the rST files.
- Fixed up some docstrings to proper rST.
This commit is contained in:
Raoul Snyman 2010-10-10 23:13:10 +02:00
parent bf7df829d0
commit 3a8b33a5ff
6 changed files with 217 additions and 92 deletions

View File

@ -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 -----------------------------------------------------

View File

@ -60,12 +60,6 @@
.. autoclass:: openlp.core.lib.settingstab.SettingsTab
:members:
:mod:`ThemeXML`
---------------
.. autoclass:: openlp.core.lib.themexmlhandler.ThemeXML
:members:
:mod:`OpenLPToolbar`
--------------------

View File

@ -6,8 +6,8 @@
.. 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:

View File

@ -38,9 +38,9 @@ class CCLIFileImportError(Exception):
class CCLIFileImport(SongImport):
"""
The :class:`CCLIFileImport` class provides OpenLP with the
ability to import CCLI SongSelect song files in both .txt and
.usr formats. See http://www.ccli.com
The :class:`CCLIFileImport` class provides OpenLP with the ability to
import CCLI SongSelect song files in both .txt and .usr formats.
See http://www.ccli.com/ for more details.
"""
def __init__(self, manager, **kwargs):
@ -49,6 +49,7 @@ class CCLIFileImport(SongImport):
``manager``
The song manager for the running OpenLP installation.
``filenames``
The files to be imported.
"""
@ -97,7 +98,7 @@ class CCLIFileImport(SongImport):
def do_import_usr_file(self, textList):
"""
The :method:`do_import_usr_file` method provides OpenLP
The :func:`do_import_usr_file` method provides OpenLP
with the ability to import CCLI SongSelect songs in
*USR* file format
@ -105,6 +106,7 @@ class CCLIFileImport(SongImport):
An array of strings containing the usr file content.
**SongSelect .usr file format**
``[File]``
USR file format first line
``Type=``
@ -140,6 +142,7 @@ class CCLIFileImport(SongImport):
Contains the songs various lyrics in order as shown by the
*Fields* description
e.g. *Words=Above all powers....* [/n = CR, /n/t = CRLF]
"""
log.debug(u'USR file text: %s', textList)
lyrics = []
@ -191,48 +194,32 @@ class CCLIFileImport(SongImport):
def do_import_txt_file(self, textList):
"""
The :method:`do_import_txt_file` method provides OpenLP
The :func:`do_import_txt_file` method provides OpenLP
with the ability to import CCLI SongSelect songs in
*TXT* file format
``textList``
An array of strings containing the txt file content.
**SongSelect .txt file format**
SongSelect .txt file format::
``Song Title``
Contains the song title
<Empty line>
``Title of following verse/chorus and number``
e.g. Verse 1, Chorus 1
``Verse/Chorus lyrics``
<Empty line>
<Empty line>
``Title of next verse/chorus (repeats)``
``Verse/Chorus lyrics``
<Empty line>
<Empty line>
``Song CCLI Number``
e.g. CCLI Number (e.g.CCLI-Liednummer: 2672885)
``Song Copyright``
e.g. © 1999 Integrity's Hosanna! Music | LenSongs Publishing
``Song Authors``
e.g. Lenny LeBlanc | Paul Baloche
``Licencing info``
e.g. For use solely with the SongSelect Terms of Use.
Song Title # Contains the song title
<Empty line>
Verse type and number # e.g. Verse 1, Chorus 1
Verse lyrics
<Empty line>
<Empty line>
Verse type and number (repeats)
Verse lyrics
<Empty line>
<Empty line>
Song CCLI number # e.g. CCLI Number (e.g.CCLI-Liednummer: 2672885)
Song copyright # e.g. © 1999 Integrity's Hosanna! Music | LenSongs Publishing
Song authors # e.g. Lenny LeBlanc | Paul Baloche
Licencing info # e.g. For use solely with the SongSelect Terms of Use.
All rights Reserved. www.ccli.com
``CCLI Licence number of user``
e.g. CCL-Liedlizenznummer: 14 / CCLI License No. 14
CCLI Licence number of user # e.g. CCL-Liedlizenznummer: 14 / CCLI License No. 14
"""
log.debug(u'TXT file text: %s', textList)
self.set_defaults()

View File

@ -282,11 +282,9 @@ class Song(object):
def get_author_list(self, asOneString = True):
"""Return the list of authors as a string
asOneString
True -- string:
'John Newton, A Parker'
False -- list of strings
['John Newton', u'A Parker']
``asOneString``
If ``True``, returns 'John Newton, A Parker'. If ``False``, returns
[u'John Newton', u'A Parker']
"""
if asOneString:
res = self._assure_string(self.author_list)
@ -297,7 +295,8 @@ class Song(object):
def set_author_list(self, author_list):
"""Set the author_list
author_list -- a string or list of strings
``author_list``
a string or list of strings
"""
if author_list is None:
self.author_list = None
@ -307,11 +306,9 @@ class Song(object):
def get_category_array(self, asOneString = True):
"""Return the list of categories as a string
asOneString
True -- string:
'Hymn, Gospel'
False -- list of strings
['Hymn', u'Gospel']
``asOneString``
If ``True``, returns 'Hymn, Gospel'. If ``False``, returns
[u'Hymn', u'Gospel']
"""
if asOneString:
res = self._assure_string(self.category_array)
@ -381,6 +378,7 @@ class Song(object):
properties
slideNumber -- 1 .. numberOfSlides
Returns a list as:
[theme_name (string),
title (string),

View File

@ -41,14 +41,13 @@ class WowImport(SongImport):
The :class:`WowImport` class provides the ability to import song files from
Words of Worship.
Words Of Worship Song File Format
`````````````````````````````````
**Words Of Worship Song File Format:**
The Words Of Worship song file format is as follows:
* The song title is the file name minus the extension.
* The song has a header, a number of blocks, followed by footer containing
the author and the copyright.
the author and the copyright.
* A block can be a verse, chorus or bridge.
File Header:
@ -65,12 +64,12 @@ class WowImport(SongImport):
Each block ends with 4 bytes, the first of which defines what type of
block it is, and the rest which are null bytes:
* ``NUL`` (\x00) - Verse
* ``SOH`` (\x01) - Chorus
* ``STX`` (\x02) - Bridge
* ``NUL`` (0x00) - Verse
* ``SOH`` (0x01) - Chorus
* ``STX`` (0x02) - Bridge
Blocks are seperated by two bytes. The first byte is ``SOH`` (\x01),
and the second byte is ```` (\x80).
Blocks are seperated by two bytes. The first byte is 0x01, and the
second byte is 0x80.
Lines:
Each line starts with a byte which specifies how long that line is,