From 919b07bd61f07d5569f05154f58234c2cb0c2e4f Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Fri, 1 Oct 2010 16:18:15 +0200 Subject: [PATCH] clean ups --- openlp/plugins/bibles/lib/db.py | 6 +++--- openlp/plugins/bibles/lib/http.py | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index 6f947cb87..60b9a8836 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -4,7 +4,7 @@ ############################################################################### # OpenLP - Open Source Lyrics Projection # # --------------------------------------------------------------------------- # -# Copyright (c) 2008-2010 Raoul Snyman # +# Copyright (c) 2008-2010 Raoul Snyman + # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # # Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian # # Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # @@ -64,10 +64,10 @@ class Verse(BaseModel): def init_schema(url): """ - Setup a bible database connection and initialise the database schema + Setup a bible database connection and initialise the database schema. ``url`` - The database to setup + The database to setup. """ session, metadata = init_db(url) diff --git a/openlp/plugins/bibles/lib/http.py b/openlp/plugins/bibles/lib/http.py index 415a0cde5..8abb3e62f 100644 --- a/openlp/plugins/bibles/lib/http.py +++ b/openlp/plugins/bibles/lib/http.py @@ -187,16 +187,16 @@ class BGExtract(object): def get_bible_chapter(self, version, bookname, chapter): """ - Access and decode bibles via the BibleGateway website + Access and decode bibles via the BibleGateway website. ``version`` - The version of the bible like 31 for New International version + The version of the bible like 31 for New International version. ``bookname`` - Name of the Book + Name of the Book. ``chapter`` - Chapter number + Chapter number. """ log.debug(u'get_bible_chapter %s, %s, %s', version, bookname, chapter) url_params = urllib.urlencode( @@ -298,13 +298,13 @@ class CWExtract(object): versetext = versetext + part elif part and part.attrMap and \ (part.attrMap[u'class'] == u'WordsOfChrist' or \ - part.attrMap[u'class'] == u'strongs'): + part.attrMap[u'class'] == u'strongs'): for subpart in part.contents: Receiver.send_message(u'openlp_process_events') if isinstance(subpart, NavigableString): versetext = versetext + subpart elif subpart and subpart.attrMap and \ - subpart.attrMap[u'class'] == u'strongs': + subpart.attrMap[u'class'] == u'strongs': for subsub in subpart.contents: Receiver.send_message(u'openlp_process_events') if isinstance(subsub, NavigableString): @@ -382,14 +382,14 @@ class HTTPBible(BibleDB): ``reference_list`` This is the list of references the media manager item wants. It is - a list of tuples, with the following format:: + a list of tuples, with the following format: (book, chapter, start_verse, end_verse) Therefore, when you are looking for multiple items, simply break them up into references like this, bundle them into a list. This function then runs through the list, and returns an amalgamated - list of ``Verse`` objects. For example:: + list of ``Verse`` objects. For example: [(u'Genesis', 1, 1, 1), (u'Genesis', 2, 2, 3)] """ @@ -428,7 +428,7 @@ class HTTPBible(BibleDB): def get_chapter(self, book, chapter): """ - Receive the request and call the relevant handler methods + Receive the request and call the relevant handler methods. """ log.debug(u'get_chapter %s, %s', book, chapter) log.debug(u'source = %s', self.download_source)