diff --git a/openlp/plugins/bibles/forms/bibleimportform.py b/openlp/plugins/bibles/forms/bibleimportform.py index a454404d9..53e659064 100644 --- a/openlp/plugins/bibles/forms/bibleimportform.py +++ b/openlp/plugins/bibles/forms/bibleimportform.py @@ -397,7 +397,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard): name = unicode(line[1], u'utf-8') self.web_bible_list[WebDownload.Bibleserver][ver] = name.strip() except IOError, UnicodeError: - log.exception(u'Bibelserver resources missing') + log.exception(u'Bibleserver resources missing') finally: if books_file: books_file.close() diff --git a/openlp/plugins/bibles/lib/__init__.py b/openlp/plugins/bibles/lib/__init__.py index 6cb33bcce..7975bfed7 100644 --- a/openlp/plugins/bibles/lib/__init__.py +++ b/openlp/plugins/bibles/lib/__init__.py @@ -43,7 +43,7 @@ def get_reference_match(match_type): u'sep_l_display': local_separator[4], u'sep_l': local_separator[5], u'sep_e': local_separator[6]} - # verse range match: (:)?(-(:)??)? + # verse range match: (:)?(-((:)?|end)?)? range_string = str(r'(?:(?P[0-9]+)%(sep_v)s)?(?P' r'[0-9]+)(?P%(sep_r)s(?:(?:(?P[0-9]+)%(sep_v)s)?' r'(?P[0-9]+)|%(sep_e)s)?)?') % separators @@ -54,8 +54,8 @@ def get_reference_match(match_type): elif match_type == u'full': # full reference match: ((,|(?=$)))+ return re.compile(str(r'^\s*(?!\s)(?P[\d]*[^\d]+)(?(?:' + range_string + r'(?:%(sep_l)s|(?=\s*$)))+)\s*$') - % separators, re.UNICODE) + r'(?P(?:' + range_string + r'(?:%(sep_l)s|(?=\s*$)))+)\s*$') + % separators, re.UNICODE) else: return separators[match_type] diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index c206bd309..8fafd0f97 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -743,7 +743,8 @@ class BibleMediaItem(MediaManagerItem): second_bible = self._decodeQtObject(bitem, 'second_bible') second_version = self._decodeQtObject(bitem, 'second_version') second_copyright = self._decodeQtObject(bitem, 'second_copyright') - second_permissions = self._decodeQtObject(bitem, 'second_permissions') + second_permissions = \ + self._decodeQtObject(bitem, 'second_permissions') second_text = self._decodeQtObject(bitem, 'second_text') verse_text = self.formatVerse(old_chapter, chapter, verse) footer = u'%s (%s %s %s)' % (book, version, copyright, permissions) @@ -754,8 +755,8 @@ class BibleMediaItem(MediaManagerItem): second_copyright, second_permissions) if footer not in raw_footer: raw_footer.append(footer) - bible_text = u'%s\u00a0%s\n\n%s\u00a0%s' % (verse_text, text, verse_text, - second_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.