clean ups

This commit is contained in:
Andreas Preikschat 2010-10-01 16:18:15 +02:00
parent e17f6c7c9e
commit 919b07bd61
2 changed files with 12 additions and 12 deletions

View File

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

View File

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