openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #04861
[Merge] lp:~m2j/openlp/bibleserver.com into lp:openlp
m2j has proposed merging lp:~m2j/openlp/bibleserver.com into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Rewritten openlp.plugins.bibles.lib.parse_reference() function.
Localization of bible reference separators.
Non-breaking space between verse numbers and verse text.
Web-Import from bibleserver.com
Replaced commas in title strings of biblegateway.csv
Two known issues:
The localized separators are still hard coded and need GUI configuration.
Not all of the new bibles are full usable, because OpenLP has still unlocalized code for the book names (applies also to other bible imports like OSIS).
--
https://code.launchpad.net/~m2j/openlp/bibleserver.com/+merge/44050
Your team OpenLP Core is requested to review the proposed merge of lp:~m2j/openlp/bibleserver.com into lp:openlp.
=== modified file 'openlp/plugins/bibles/forms/bibleimportform.py'
--- openlp/plugins/bibles/forms/bibleimportform.py 2010-12-11 12:07:38 +0000
+++ openlp/plugins/bibles/forms/bibleimportform.py 2010-12-17 13:55:15 +0000
@@ -43,10 +43,12 @@
Unknown = -1
Crosswalk = 0
BibleGateway = 1
+ Bibleserver = 2
Names = {
0: u'Crosswalk',
- 1: u'BibleGateway'
+ 1: u'BibleGateway',
+ 2: u'Bibleserver'
}
@classmethod
@@ -232,8 +234,7 @@
The index of the combo box.
"""
self.bibleComboBox.clear()
- bibles = [unicode(translate('BiblesPlugin.ImportWizardForm', bible)) for
- bible in self.web_bible_list[index].keys()]
+ bibles = self.web_bible_list[index].keys()
bibles.sort()
for bible in bibles:
self.bibleComboBox.addItem(bible)
@@ -385,6 +386,27 @@
if books_file:
books_file.close()
+ # Load and store Bibleserver Bibles.
+ filepath = AppLocation.get_directory(AppLocation.PluginsDir)
+ filepath = os.path.join(filepath, u'bibles', u'resources')
+ books_file = None
+ try:
+ self.web_bible_list[WebDownload.Bibleserver] = {}
+ books_file = open(
+ os.path.join(filepath, u'bibleserver.csv'), 'rb')
+ dialect = csv.Sniffer().sniff(books_file.read(1024))
+ books_file.seek(0)
+ books_reader = csv.reader(books_file, dialect)
+ for line in books_reader:
+ ver = unicode(line[0], u'utf-8')
+ name = unicode(line[1], u'utf-8')
+ self.web_bible_list[WebDownload.Bibleserver][ver] = name.strip()
+ except IOError, UnicodeError:
+ log.exception(u'Bibelserver resources could not be imported')
+ finally:
+ if books_file:
+ books_file.close()
+
def getFileName(self, title, editbox):
filename = QtGui.QFileDialog.getOpenFileName(self, title,
SettingsManager.get_last_dir(self.bibleplugin.settingsSection, 1))
@@ -457,6 +479,9 @@
elif download_location == WebDownload.BibleGateway:
bible = \
self.web_bible_list[WebDownload.BibleGateway][bible_version]
+ elif download_location == WebDownload.Bibleserver:
+ bible = \
+ self.web_bible_list[WebDownload.Bibleserver][bible_version]
importer = self.manager.import_bible(
BibleFormat.WebDownload,
name=license_version,
=== modified file 'openlp/plugins/bibles/forms/bibleimportwizard.py'
--- openlp/plugins/bibles/forms/bibleimportwizard.py 2010-12-11 12:07:38 +0000
+++ openlp/plugins/bibles/forms/bibleimportwizard.py 2010-12-17 13:55:15 +0000
@@ -208,6 +208,7 @@
self.locationComboBox.setObjectName(u'LocationComboBox')
self.locationComboBox.addItem(u'')
self.locationComboBox.addItem(u'')
+ self.locationComboBox.addItem(u'')
self.downloadOptionsLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
self.locationComboBox)
self.bibleLabel = QtGui.QLabel(self.downloadOptionsTab)
@@ -388,6 +389,8 @@
translate('BiblesPlugin.ImportWizardForm', 'Crosswalk'))
self.locationComboBox.setItemText(1,
translate('BiblesPlugin.ImportWizardForm', 'BibleGateway'))
+ self.locationComboBox.setItemText(2,
+ translate('BiblesPlugin.ImportWizardForm', 'Bibleserver'))
self.bibleLabel.setText(
translate('BiblesPlugin.ImportWizardForm', 'Bible:'))
self.webDownloadTabWidget.setTabText(
=== modified file 'openlp/plugins/bibles/lib/__init__.py'
--- openlp/plugins/bibles/lib/__init__.py 2010-10-11 20:47:00 +0000
+++ openlp/plugins/bibles/lib/__init__.py 2010-12-17 13:55:15 +0000
@@ -32,134 +32,164 @@
log = logging.getLogger(__name__)
-BIBLE_REFERENCE = re.compile(
- r'^([\w ]+?) *([0-9]+)' # Initial book and chapter
- r'(?: *[:|v|V] *([0-9]+))?' # Verse for first chapter
- r'(?: *- *([0-9]+|end$))?' # Range for verses or chapters
- r'(?:(?:,([0-9]+))?' # Second chapter
- r' *[,|:|v|V] *([0-9]+|end$)' # More range for verses or chapters
- r'(?: *- *([0-9]+|end$))?)?$', # End of second verse range
- re.UNICODE)
-
-def check_end(match_group):
- """
- Check if a regular expression match group contains the text u'end' or
- should be converted to an int.
-
- ``match_group``
- The match group to check.
- """
- if match_group == u'end':
- return -1
+def get_reference_match(match_type):
+ local_separator = unicode(u':;;\s*[:vV]\s*;;-;;\s*-\s*;;,;;\s*,\s*;;end'
+ ).split(u';;') # English
+ # local_separator = unicode(u',;;\s*,\s*;;-;;\s*-\s*;;.;;\.;;[Ee]nde'
+ # ).split(u';;') # German
+ separators = {
+ u'sep_v_display': local_separator[0], u'sep_v': local_separator[1],
+ u'sep_r_display': local_separator[2], u'sep_r': local_separator[3],
+ u'sep_l_display': local_separator[4], u'sep_l': local_separator[5],
+ u'sep_e': local_separator[6]}
+
+ # verse range match: (<chapter>:)?<verse>(-(<chapter>:)?<verse>?)?
+ range_string = str(r'(?:(?P<from_chapter>[0-9]+)%(sep_v)s)?(?P<from_verse>'
+ r'[0-9]+)(?P<range_to>%(sep_r)s(?:(?:(?P<to_chapter>[0-9]+)%(sep_v)s)?'
+ r'(?P<to_verse>[0-9]+)|%(sep_e)s)?)?' % separators)
+ if match_type == u'range':
+ return re.compile(r'^\s*' + range_string + r'\s*$', re.UNICODE)
+ elif match_type == u'range_separator':
+ return re.compile(separators[u'sep_l'])
+ elif match_type == u'full':
+ # full reference match: <book>(<range>(,|(?=$)))+
+ return re.compile(str(r'^\s*(?!\s)(?P<book>[\d]*[^\d]+)(?<!\s)\s*'
+ r'(?P<ranges>(?:' + range_string + r'(?:%(sep_l)s|(?=\s*$)))+)\s*$')
+ % separators, re.UNICODE)
else:
- return int(match_group)
+ return separators[match_type]
def parse_reference(reference):
"""
- This is the über-awesome function that takes a person's typed in string
- and converts it to a reference list, a list of references to be queried
- from the Bible database files.
-
- The ``BIBLE_REFERENCE`` constant regular expression produces the following
- match groups:
-
- 0. (match string)
- This is a special group consisting of the whole string that matched.
- 1. ``[\w ]+``
- The book the reference is from.
- 2. ``[0-9]+``
- The first (or only) chapter in the reference.
- 3. ``None`` or ``[0-9]+``
- ``None``, or the only verse, or the first verse in a verse range or,
- the start verse in a chapter range.
- 4. ``None`` or ``[0-9]+`` or ``end``
- ``None``, or the end verse of the first verse range, or the end chapter
- of a chapter range.
- 5. ``None`` or ``[0-9]+``
- ``None``, or the second chapter in multiple (non-ranged) chapters.
- 6. ``None`` or ``[0-9]+`` or ``end``
- ``None``, the start of the second verse range. or the end of a chapter
- range.
- 7. ``None`` or ``[0-9]+`` or ``end``
- ``None``, or the end of the second verse range.
+ This is the next generation über-awesome function that takes a person's
+ typed in string and converts it to a reference list, a list of references to
+ be queried from the Bible database files.
+
+ This is a user manual like description, how the references are working.
+
+ - Each reference starts with the book name. A chapter name is manditory.
+ ``John 3`` refers to Gospel of John chapter 3
+ - A reference range can be given after a range seperator.
+ ``John 3-5`` refers to John chapters 3 to 5
+ - Single verses can be addressed after a verse seperator
+ ``John 3:16`` refers to John chapter 3 verse 16
+ ``John 3:16-4:3`` refers to John chapter 3 verse 16 to chapter 4 verse 3
+ - After a verse reference all further single values are treat as verse in
+ the last selected chapter.
+ ``John 3:16-18`` refers to John chapter 3 verses 16 to 18
+ - After a list separator it is possible to refer to additional verses. They
+ are build analog to the first ones. This way it is possible to define each
+ number of verse references. It is not possible to refer to verses in
+ additional books.
+ ``John 3:16,18`` refers to John chapter 3 verses 16 and 18
+ ``John 3:16-18,20`` refers to John chapter 3 verses 16 to 18 to 20
+ ``John 3:16-18,4:1`` refers to John chapter 3 verses 16 to 18 and
+ chapter 3 verse 1
+ - If there is a range separator without further verse declaration the last
+ refered chapter is addressed until the end.
+
+ ``range_string`` is a regular expression which matches for verse range
+ declarations:
+
+ 1. ``(?:(?P<from_chapter>[0-9]+)%(sep_v)s)?'
+ It starts with a optional chapter reference ``from_chapter`` followed by
+ a verse separator.
+ 2. ``(?P<from_verse>[0-9]+)``
+ The verse reference ``from_verse`` is manditory
+ 3. ``(?P<range_to>%(sep_r)s(?:`` ... ``|%(sep_e)s)?)?``
+ A ``range_to`` declaration is optional. It starts with a range seperator
+ and contains optional a chapter and verse declaration or a end
+ separator.
+ 4. ``(?:(?P<to_chapter>[0-9]+)%(sep_v)s)?``
+ The ``to_chapter`` reference with seperator is equivalent to group 1.
+ 5. ``(?P<to_verse>[0-9]+)``
+ The ``to_verse`` reference is equivalent to group 2.
+
+ The full reference is matched against get_reference_match(u'full'). This
+ regular expression looks like this:
+
+ 1. ``^\s*(?!\s)(?P<book>[\d]*[^\d]+)(?<!\s)\s*``
+ The ``book`` group starts with the first non-whitespace character. There
+ are optional leading digits followed by non-digits. The group ends
+ before the whitspace in front of the next digit.
+ 2. ``(?P<ranges>(?:`` + range_string + ``(?:%(sep_l)s|(?=\s*$)))+)\s*$``
+ The second group contains all ``ranges``. This can be multiple
+ declarations of a range_string separated by a list separator.
The reference list is a list of tuples, with each tuple structured like
this::
- (book, chapter, start_verse, end_verse)
+ (book, chapter, from_verse, to_verse)
``reference``
The bible reference to parse.
Returns None or a reference list.
"""
- reference = reference.strip()
+
log.debug('parse_reference("%s")', reference)
- unified_ref_list = []
- match = BIBLE_REFERENCE.match(reference)
+ match = get_reference_match(u'full').match(reference)
if match:
log.debug(u'Matched reference %s' % reference)
- book = match.group(1)
- chapter = int(match.group(2))
- if match.group(7):
- # Two verse ranges
- vr1_start = int(match.group(3))
- vr1_end = int(match.group(4))
- unified_ref_list.append((book, chapter, vr1_start, vr1_end))
- vr2_start = int(match.group(6))
- vr2_end = check_end(match.group(7))
- if match.group(5):
- # One verse range per chapter
- chapter2 = int(match.group(5))
- unified_ref_list.append((book, chapter2, vr2_start, vr2_end))
- else:
- unified_ref_list.append((book, chapter, vr2_start, vr2_end))
- elif match.group(6):
- # Chapter range with verses
- if match.group(3):
- vr1_start = int(match.group(3))
- else:
- vr1_start = 1
- if match.group(2) == match.group(4):
- vr1_end = int(match.group(6))
- unified_ref_list.append((book, chapter, vr1_start, vr1_end))
- else:
- vr1_end = -1
- unified_ref_list.append((book, chapter, vr1_start, vr1_end))
- vr2_end = check_end(match.group(6))
- if int(match.group(4)) > chapter:
- for i in range(chapter + 1, int(match.group(4)) + 1):
- if i == int(match.group(4)):
- unified_ref_list.append((book, i, 1, vr2_end))
- else:
- unified_ref_list.append((book, i, 1, -1))
- elif match.group(4):
- # Chapter range or chapter and verse range
- if match.group(3):
- vr1_start = int(match.group(3))
- vr1_end = check_end(match.group(4))
- if vr1_end == -1 or vr1_end > vr1_start:
- unified_ref_list.append((book, chapter, vr1_start, vr1_end))
- else:
- log.debug(u'Ambiguous reference: %s' % reference)
- return None
- elif match.group(4) != u'end':
- for i in range(chapter, int(match.group(4)) + 1):
- unified_ref_list.append((book, i, 1, -1))
- else:
- log.debug(u'Unsupported reference: %s' % reference)
- return None
- elif match.group(3):
- # Single chapter and verse
- verse = int(match.group(3))
- unified_ref_list.append((book, chapter, verse, verse))
- else:
- # Single chapter
- unified_ref_list.append((book, chapter, -1, -1))
+ book = match.group(u'book')
+ ranges = match.group(u'ranges')
+ range_list = get_reference_match(u'range_separator').split(ranges)
+ ref_list = []
+ chapter = 0
+ for this_range in range_list:
+ range_match = get_reference_match(u'range').match(this_range)
+ from_chapter = range_match.group(u'from_chapter')
+ from_verse = range_match.group(u'from_verse')
+ has_range = range_match.group(u'range_to')
+ to_chapter = range_match.group(u'to_chapter')
+ to_verse = range_match.group(u'to_verse')
+ if from_chapter:
+ from_chapter = int(from_chapter)
+ if from_verse:
+ from_verse = int(from_verse)
+ if to_chapter:
+ to_chapter = int(to_chapter)
+ if to_verse:
+ to_verse = int(to_verse)
+ # Fill chapter fields with reasonable values.
+ if from_chapter:
+ chapter = from_chapter
+ elif chapter:
+ from_chapter = chapter
+ else:
+ from_chapter = from_verse
+ from_verse = None
+ if to_chapter:
+ if to_chapter < from_chapter:
+ continue
+ else:
+ chapter = to_chapter
+ elif to_verse:
+ if chapter:
+ to_chapter = chapter
+ else:
+ to_chapter = to_verse
+ # Append references to the list
+ if has_range:
+ if not from_verse:
+ from_verse = 1
+ if not to_verse:
+ to_verse = -1
+ if to_chapter > from_chapter:
+ ref_list.append((book, from_chapter, from_verse, -1))
+ for i in range(from_chapter + 1, to_chapter - 1):
+ ref_list.append((book, i, 1, -1))
+ ref_list.append((book, to_chapter, 1, to_verse))
+ elif to_verse >= from_verse or to_verse == -1:
+ ref_list.append((book, from_chapter, from_verse, to_verse))
+ elif from_verse:
+ ref_list.append((book, from_chapter, from_verse, from_verse))
+ else:
+ ref_list.append((book, from_chapter, 1, -1))
+ return ref_list
else:
log.debug(u'Invalid reference: %s' % reference)
return None
- return unified_ref_list
class SearchResults(object):
=== modified file 'openlp/plugins/bibles/lib/http.py'
--- openlp/plugins/bibles/lib/http.py 2010-12-06 19:30:04 +0000
+++ openlp/plugins/bibles/lib/http.py 2010-12-17 13:55:15 +0000
@@ -240,6 +240,66 @@
return SearchResults(bookname, chapter, verse_list)
+class BSExtract(object):
+ """
+ Extract verses from Bibleserver.com
+ """
+ def __init__(self,proxyurl=None):
+ log.debug(u'init %s', proxyurl)
+ self.proxyurl = proxyurl
+
+ def get_bible_chapter(self, version, bookname, chapter):
+ """
+ Access and decode bibles via http://m.Bibleserver.com
+
+ ``version``
+ The version of the bible like NIV for New International Version
+
+ ``bookname``
+ Text name of in english e.g. 'gen' for Genesis
+
+ ``chapter``
+ Chapter number
+ """
+ log.debug(u'get_bible_chapter %s,%s,%s', version, bookname, chapter)
+ chapter_url = u'http://m.bibleserver.com/text/%s/%s%s' % \
+ (version, bookname, chapter)
+
+ log.debug(u'URL: %s', chapter_url)
+ page = None
+ try:
+ page = urllib2.urlopen(chapter_url)
+ Receiver.send_message(u'openlp_process_events')
+ except urllib2.URLError:
+ log.exception(u'The web bible page could not be downloaded.')
+ finally:
+ if not page:
+ return None
+ soup = None
+ try:
+ soup = BeautifulSoup(page)
+ except HTMLParseError:
+ log.exception(u'BeautifulSoup could not parse the bible page.')
+ finally:
+ if not soup:
+ return None
+ Receiver.send_message(u'openlp_process_events')
+ try:
+ content = soup.find(u'div', u'content').find(u'div').findAll(u'div')
+ except:
+ log.exception(u'No verses found.')
+ finally:
+ if not content:
+ return None
+ verse_number = re.compile(r'v\d{5}(\d{3}) verse')
+ verses = {}
+ for verse in content:
+ Receiver.send_message(u'openlp_process_events')
+ versenumber = int(verse_number.sub(r'\1', verse[u'class']))
+ verses[versenumber] = verse.contents[1].rstrip(u'\n')
+ return SearchResults(bookname, chapter, verses)
+
+
class CWExtract(object):
"""
Extract verses from CrossWalk/BibleStudyTools
@@ -350,7 +410,7 @@
Run the import. This method overrides the parent class method. Returns
``True`` on success, ``False`` on failure.
"""
- self.wizard.ImportProgressBar.setMaximum(2)
+ self.wizard.importProgressBar.setMaximum(2)
self.wizard.incrementProgressBar('Registering bible...')
self.create_meta(u'download source', self.download_source)
self.create_meta(u'download name', self.download_name)
@@ -426,8 +486,10 @@
log.debug(u'source = %s', self.download_source)
if self.download_source.lower() == u'crosswalk':
ev = CWExtract(self.proxy_server)
- else:
+ elif self.download_source.lower() == u'biblegateway':
ev = BGExtract(self.proxy_server)
+ elif self.download_source.lower() == u'bibleserver':
+ ev = BSExtract(self.proxy_server)
return ev.get_bible_chapter(self.download_name, book, chapter)
def get_books(self):
=== modified file 'openlp/plugins/bibles/lib/manager.py'
--- openlp/plugins/bibles/lib/manager.py 2010-12-11 12:07:38 +0000
+++ openlp/plugins/bibles/lib/manager.py 2010-12-17 13:55:15 +0000
@@ -112,6 +112,7 @@
def get_availability(format):
return BibleFormat._format_availability.get(format, True)
+
class BibleManager(object):
"""
The Bible manager which holds and manages all the Bibles.
@@ -356,3 +357,4 @@
BibleFormat.set_availability(BibleFormat.OpenLP1, has_openlp1)
__all__ = [u'BibleFormat']
+
=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py 2010-12-13 14:24:16 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py 2010-12-17 13:55:15 +0000
@@ -32,6 +32,7 @@
from openlp.core.lib import MediaManagerItem, Receiver, BaseListWithDnD, \
ItemCapabilities, translate
from openlp.plugins.bibles.forms import BibleImportForm
+from openlp.plugins.bibles.lib import get_reference_match
log = logging.getLogger(__name__)
@@ -553,12 +554,15 @@
bible = unicode(self.AdvancedVersionComboBox.currentText())
second_bible = unicode(self.AdvancedSecondBibleComboBox.currentText())
book = unicode(self.AdvancedBookComboBox.currentText())
- chapter_from = int(self.AdvancedFromChapter.currentText())
- chapter_to = int(self.AdvancedToChapter.currentText())
- verse_from = int(self.AdvancedFromVerse.currentText())
- verse_to = int(self.AdvancedToVerse.currentText())
- versetext = u'%s %s:%s-%s:%s' % (book, chapter_from, verse_from,
- chapter_to, verse_to)
+ chapter_from = self.AdvancedFromChapter.currentText()
+ chapter_to = self.AdvancedToChapter.currentText()
+ verse_from = self.AdvancedFromVerse.currentText()
+ verse_to = self.AdvancedToVerse.currentText()
+ verse_separator = get_reference_match(u'sep_v_display')
+ range_separator = get_reference_match(u'sep_r_display')
+ verse_range = chapter_from + verse_separator + verse_from + \
+ range_separator + chapter_to + verse_separator + verse_to
+ versetext = u'%s %s' % (book, verse_range)
self.search_results = self.parent.manager.get_verses(bible, versetext)
if second_bible:
self.second_search_results = self.parent.manager.get_verses(
@@ -709,7 +713,7 @@
obj = reference[QtCore.QString(key)]
if isinstance(obj, QtCore.QVariant):
obj = obj.toPyObject()
- return unicode(obj)
+ return unicode(obj).strip()
def generateSlideData(self, service_item, item=None, xmlVersion=False):
"""
@@ -750,21 +754,21 @@
second_copyright, second_permissions)
if footer not in raw_footer:
raw_footer.append(footer)
- bible_text = u'%s %s\n\n%s %s' % (verse_text, text, verse_text,
+ bible_text = u'%s\u00a0%s\n\n%s\u00a0%s' % (verse_text, text, verse_text,
second_text)
raw_slides.append(bible_text)
bible_text = u''
# If we are 'Verse Per Slide' then create a new slide.
elif self.parent.settings_tab.layout_style == 0:
- bible_text = u'%s %s' % (verse_text, text)
+ bible_text = u'%s\u00a0%s' % (verse_text, text)
raw_slides.append(bible_text)
bible_text = u''
# If we are 'Verse Per Line' then force a new line.
elif self.parent.settings_tab.layout_style == 1:
- bible_text = u'%s %s %s\n' % (bible_text, verse_text, text)
+ bible_text = u'%s %s\u00a0%s\n' % (bible_text, verse_text, text)
# We have to be 'Continuous'.
else:
- bible_text = u'%s %s %s\n' % (bible_text, verse_text, text)
+ bible_text = u'%s %s\u00a0%s\n' % (bible_text, verse_text, text)
if first_item:
start_item = item
first_item = False
@@ -816,36 +820,31 @@
``old_item``
The last item of a range.
"""
+ verse_separator = get_reference_match(u'sep_v_display')
+ range_separator = get_reference_match(u'sep_r_display')
old_bitem = self.listView.item(old_item.row())
- old_chapter = int(self._decodeQtObject(old_bitem, 'chapter'))
- old_verse = int(self._decodeQtObject(old_bitem, 'verse'))
+ old_chapter = self._decodeQtObject(old_bitem, 'chapter')
+ old_verse = self._decodeQtObject(old_bitem, 'verse')
start_bitem = self.listView.item(start_item.row())
start_book = self._decodeQtObject(start_bitem, 'book')
- start_chapter = int(self._decodeQtObject(start_bitem, 'chapter'))
- start_verse = int(self._decodeQtObject(start_bitem, 'verse'))
+ start_chapter = self._decodeQtObject(start_bitem, 'chapter')
+ start_verse = self._decodeQtObject(start_bitem, 'verse')
start_bible = self._decodeQtObject(start_bitem, 'bible')
start_second_bible = self._decodeQtObject(start_bitem, 'second_bible')
if start_second_bible:
- if start_verse == old_verse and start_chapter == old_chapter:
- title = u'%s %s:%s (%s, %s)' % (start_book, start_chapter,
- start_verse, start_bible, start_second_bible)
- elif start_chapter == old_chapter:
- title = u'%s %s:%s-%s (%s, %s)' % (start_book, start_chapter,
- start_verse, old_verse, start_bible, start_second_bible)
- else:
- title = u'%s %s:%s-%s:%s (%s, %s)' % (start_book, start_chapter,
- start_verse, old_chapter, old_verse, start_bible,
- start_second_bible)
- else:
- if start_verse == old_verse and start_chapter == old_chapter:
- title = u'%s %s:%s (%s)' % (start_book, start_chapter,
- start_verse, start_bible)
- elif start_chapter == old_chapter:
- title = u'%s %s:%s-%s (%s)' % (start_book, start_chapter,
- start_verse, old_verse, start_bible)
- else:
- title = u'%s %s:%s-%s:%s (%s)' % (start_book, start_chapter,
- start_verse, old_chapter, old_verse, start_bible)
+ bibles = u'%s, %s' % (start_bible, start_second_bible)
+ else:
+ bibles = start_bible
+ if start_chapter == old_chapter:
+ if start_verse == old_verse:
+ verse_range = start_chapter + verse_separator + start_verse
+ else:
+ verse_range = start_chapter + verse_separator + start_verse + \
+ range_separator + old_verse
+ else:
+ verse_range = start_chapter + verse_separator + start_verse + \
+ range_separator + old_chapter + verse_separator + old_verse
+ title = u'%s %s (%s)' % (start_book, verse_range, bibles)
return title
def checkTitle(self, item, old_item):
@@ -907,9 +906,11 @@
``verse``
The verse number (int).
"""
+
+ verse_separator = get_reference_match(u'sep_v_display')
if not self.parent.settings_tab.show_new_chapters or \
old_chapter != chapter:
- verse_text = u'%s:%s' % (chapter, verse)
+ verse_text = unicode(chapter) + verse_separator + unicode(verse)
else:
verse_text = u'%s' % verse
if self.parent.settings_tab.display_style == 1:
=== modified file 'openlp/plugins/bibles/lib/openlp1.py' (properties changed: +x to -x)
=== modified file 'openlp/plugins/bibles/lib/osis.py'
--- openlp/plugins/bibles/lib/osis.py 2010-12-06 19:30:04 +0000
+++ openlp/plugins/bibles/lib/osis.py 2010-12-17 13:55:15 +0000
@@ -134,9 +134,9 @@
testament)
if last_chapter == 0:
if book == u'Gen':
- self.wizard.ImportProgressBar.setMaximum(1188)
+ self.wizard.importProgressBar.setMaximum(1188)
else:
- self.wizard.ImportProgressBar.setMaximum(260)
+ self.wizard.importProgressBar.setMaximum(260)
if last_chapter != chapter:
if last_chapter != 0:
self.session.commit()
=== modified file 'openlp/plugins/bibles/resources/biblegateway.csv'
--- openlp/plugins/bibles/resources/biblegateway.csv 2010-09-14 18:18:47 +0000
+++ openlp/plugins/bibles/resources/biblegateway.csv 2010-12-17 13:55:15 +0000
@@ -48,12 +48,12 @@
Icelandic Bible,ICELAND
La Nuova Diodati,LND
La Parola è Vita,LM
-Jacalteco, Oriental,JAC
+Jacalteco - Oriental,JAC
Kekchi,KEK
Korean Bible,KOREAN
Maori Bible,MAORI
Macedonian New Testament,MNT
-Mam, Central,MVC
+Mam - Central,MVC
Mam de Todos Santos Chuchumatán,MVJ
Reimer 2001,REIMER
Náhuatl de Guerrero,NGU
@@ -62,7 +62,7 @@
Levande Bibeln,LB
O Livro,OL
João Ferreira de Almeida Atualizada,AA
-Quiché, Centro Occidental,QUT
+Quiché - Centro Occidental,QUT
Romanian,RMNN
Romanian,TLCR
Russian Synodal Version,RUSV
@@ -77,4 +77,4 @@
Uspanteco,USP
1934 Vietnamese Bible,VIET
Chinese Union Version (Simplified),CUVS
-Chinese Union Version (Traditional),CUV
\ No newline at end of file
+Chinese Union Version (Traditional),CUV
=== added file 'openlp/plugins/bibles/resources/bibleserver.csv'
--- openlp/plugins/bibles/resources/bibleserver.csv 1970-01-01 00:00:00 +0000
+++ openlp/plugins/bibles/resources/bibleserver.csv 2010-12-17 13:55:15 +0000
@@ -0,0 +1,39 @@
+عربÙ, ARA
+Bible â pÅeklad 21. stoletÃ, B21
+Bible du Semeur, BDS
+ÐÑлгаÑÑкаÑа ÐиблиÑ, BLG
+Äeský ekumenický pÅeklad, CEP
+Hrvatski, CRO
+СвÑÑенное ÐиÑание, CRS
+Version La Biblia al Dia, CST
+ä¸æååæ¬ï¼ç®ä½ï¼, CUVS
+Bibelen på hverdagsdansk, DK
+Revidierte Elberfelder, ELB
+Einheitsübersetzung, EU
+Gute Nachricht Bibel, GNB
+Hoffnung für alle, HFA
+Hungarian, HUN
+Het Boek, HTB
+La Parola è Vita, ITA
+IBS-fordÃtás (Ãj Károli), KAR
+King James Version, KJV
+Luther 1984, LUT
+Septuaginta, LXX
+Neue Genfer Ãbersetzung, NGÃ
+New International Readers Version, NIRV
+New International Version, NIV
+Neues Leben, NL
+En Levende Bok (NOR), NOR
+Nádej pre kazdého, NPK
+Noua traducere în limba românã, NTR
+Nueva Versión Internacional, NVI
+Hebrew OT, OT
+SÅowo Å»ycia, POL
+O Livro, PRT
+ÐовÑй пеÑевод на ÑÑÑÑкий ÑзÑк, RUS
+Slovo na cestu, SNC
+Schlachter 2000, SLT
+En Levande Bok (SWE), SVL
+Today's New International Version, TNIV
+Türkçe, TR
+Vulgata, VUL
Follow ups