forked from openlp/openlp
Head
This commit is contained in:
commit
d8849659bf
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -21,4 +21,4 @@
|
|||||||
# You should have received a copy of the GNU General Public License along #
|
# You should have received a copy of the GNU General Public License along #
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -21,4 +21,4 @@
|
|||||||
# You should have received a copy of the GNU General Public License along #
|
# You should have received a copy of the GNU General Public License along #
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -144,8 +144,9 @@ def resize_image(image, width, height):
|
|||||||
The image to resize.
|
The image to resize.
|
||||||
"""
|
"""
|
||||||
preview = QtGui.QImage(image)
|
preview = QtGui.QImage(image)
|
||||||
preview = preview.scaled(width, height, QtCore.Qt.KeepAspectRatio,
|
if not preview.isNull():
|
||||||
QtCore.Qt.SmoothTransformation)
|
preview = preview.scaled(width, height, QtCore.Qt.KeepAspectRatio,
|
||||||
|
QtCore.Qt.SmoothTransformation)
|
||||||
realw = preview.width()
|
realw = preview.width()
|
||||||
realh = preview.height()
|
realh = preview.height()
|
||||||
# and move it to the centre of the preview space
|
# and move it to the centre of the preview space
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -190,4 +190,4 @@ class PluginConfig(object):
|
|||||||
name = u'last directory %d' % num
|
name = u'last directory %d' % num
|
||||||
else:
|
else:
|
||||||
name = u'last directory'
|
name = u'last directory'
|
||||||
self.set_config(name, directory)
|
self.set_config(name, directory)
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -90,4 +90,4 @@ class SettingsTab(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
Changes which need to be made after setup of application
|
Changes which need to be made after setup of application
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
# Software Foundation; version 2 of the License. #
|
||||||
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
# Software Foundation; version 2 of the License. #
|
||||||
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@ -46,4 +71,4 @@ if __name__ == "__main__":
|
|||||||
log.debug(u'List of plugins found:')
|
log.debug(u'List of plugins found:')
|
||||||
for plugin in t.p.plugins:
|
for plugin in t.p.plugins:
|
||||||
log.debug(u'Plugin %s, name=%s (version=%d)' %(unicode(plugin),
|
log.debug(u'Plugin %s, name=%s (version=%d)' %(unicode(plugin),
|
||||||
plugin.name, plugin.version))
|
plugin.name, plugin.version))
|
||||||
|
@ -1,20 +1,27 @@
|
|||||||
"""
|
# -*- coding: utf-8 -*-
|
||||||
OpenLP - Open Source Lyrics Projection
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
Copyright (c) 2008 Raoul Snyman
|
|
||||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
###############################################################################
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
Foundation; version 2 of the License.
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
You should have received a copy of the GNU General Public License along with
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
# Software Foundation; version 2 of the License. #
|
||||||
"""
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
@ -135,13 +142,13 @@ class TestRender(TestRender_base):
|
|||||||
|
|
||||||
def test_longer(self):
|
def test_longer(self):
|
||||||
answer = self.renderer._render_single_line(
|
answer = self.renderer._render_single_line(
|
||||||
u'Test line with more words than fit on one line',
|
u'Test line with more words than fit on one line',
|
||||||
tlcorner = (10,10))
|
tlcorner = (10,10))
|
||||||
assert(answer == (753,136))
|
assert(answer == (753,136))
|
||||||
|
|
||||||
def test_even_longer(self):
|
def test_even_longer(self):
|
||||||
answer = self.renderer._render_single_line(
|
answer = self.renderer._render_single_line(
|
||||||
u'Test line with more words than fit on either one or two lines',
|
u'Test line with more words than fit on either one or two lines',
|
||||||
tlcorner = (10,10))
|
tlcorner = (10,10))
|
||||||
assert(answer == (753,199))
|
assert(answer == (753,199))
|
||||||
def test_lines(self):
|
def test_lines(self):
|
||||||
|
@ -1,20 +1,27 @@
|
|||||||
"""
|
# -*- coding: utf-8 -*-
|
||||||
OpenLP - Open Source Lyrics Projection
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
Copyright (c) 2008 Raoul Snyman
|
|
||||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
###############################################################################
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
Foundation; version 2 of the License.
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
You should have received a copy of the GNU General Public License along with
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
# Software Foundation; version 2 of the License. #
|
||||||
"""
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
@ -163,7 +170,7 @@ And drives away his fear.
|
|||||||
t = Theme(u'blank_theme.xml')
|
t = Theme(u'blank_theme.xml')
|
||||||
t.BackgroundType = 2
|
t.BackgroundType = 2
|
||||||
t.BackgroundParameter1 = os.path.join(u'data_for_tests',
|
t.BackgroundParameter1 = os.path.join(u'data_for_tests',
|
||||||
'treessmall.jpg')
|
'treessmall.jpg')
|
||||||
t.BackgroundParameter2 = QtGui.QColor(0,0,64)
|
t.BackgroundParameter2 = QtGui.QColor(0,0,64)
|
||||||
t.BackgroundParameter3 = 0
|
t.BackgroundParameter3 = 0
|
||||||
t.VerticalAlign = 2
|
t.VerticalAlign = 2
|
||||||
|
@ -5,8 +5,9 @@
|
|||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Martin Thompson, Tim Bentley, Carsten #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -22,4 +23,4 @@
|
|||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from theme import Theme
|
from theme import Theme
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
# Software Foundation; version 2 of the License. #
|
||||||
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import sys
|
import sys
|
||||||
@ -49,7 +74,7 @@ def test_theme():
|
|||||||
assert(theme.Outline == 0)
|
assert(theme.Outline == 0)
|
||||||
assert(theme.Shadow == 0)
|
assert(theme.Shadow == 0)
|
||||||
assert(theme.VerticalAlign == 0)
|
assert(theme.VerticalAlign == 0)
|
||||||
|
|
||||||
print "Tests passed"
|
print "Tests passed"
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -149,4 +149,4 @@ class Theme(object):
|
|||||||
for key in dir(self):
|
for key in dir(self):
|
||||||
if key[0:1] != u'_':
|
if key[0:1] != u'_':
|
||||||
theme_strings.append(u'%30s : %s' % (key, getattr(self, key)))
|
theme_strings.append(u'%30s : %s' % (key, getattr(self, key)))
|
||||||
return u'\n'.join(theme_strings)
|
return u'\n'.join(theme_strings)
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -142,13 +142,17 @@ class Ui_AboutDialog(object):
|
|||||||
' Michael "cocooncrash" Gorven\n'
|
' Michael "cocooncrash" Gorven\n'
|
||||||
' Scott "sguerrieri" Guerrieri\n'
|
' Scott "sguerrieri" Guerrieri\n'
|
||||||
' Raoul "superfly" Snyman\n'
|
' Raoul "superfly" Snyman\n'
|
||||||
' Maikel Stuivenberg\n'
|
|
||||||
' Martin "mijiti" Thompson\n'
|
' Martin "mijiti" Thompson\n'
|
||||||
' Jon "Meths" Tibble\n'
|
' Jon "Meths" Tibble\n'
|
||||||
|
'\n'
|
||||||
|
'Contributors\n'
|
||||||
|
' Christian "crichter" Richter\n'
|
||||||
|
' Maikel Stuivenberg\n'
|
||||||
' Carsten "catini" Tingaard\n'
|
' Carsten "catini" Tingaard\n'
|
||||||
'\n'
|
'\n'
|
||||||
'Testers\n'
|
'Testers\n'
|
||||||
' Wesley "wrst" Stout'
|
' Wesley "wrst" Stout\n'
|
||||||
|
' Philip "Phill" Ridout'
|
||||||
))
|
))
|
||||||
self.AboutNotebook.setTabText(
|
self.AboutNotebook.setTabText(
|
||||||
self.AboutNotebook.indexOf(self.CreditsTab),
|
self.AboutNotebook.indexOf(self.CreditsTab),
|
||||||
@ -158,8 +162,8 @@ class Ui_AboutDialog(object):
|
|||||||
'Snyman\n'
|
'Snyman\n'
|
||||||
'Portions copyright ' + u'\u00a9'.encode('utf8') + ' 2004-2009 '
|
'Portions copyright ' + u'\u00a9'.encode('utf8') + ' 2004-2009 '
|
||||||
'Tim Bentley, Jonathan Corwin, Michael Gorven, Scott Guerrieri, '
|
'Tim Bentley, Jonathan Corwin, Michael Gorven, Scott Guerrieri, '
|
||||||
'Maikel Stuivenberg, Martin Thompson, Jon Tibble, Carsten '
|
'Christian Richter, Maikel Stuivenberg, Martin Thompson, Jon '
|
||||||
'Tinggaard\n'
|
'Tibble, Carsten Tinggaard\n'
|
||||||
'\n'
|
'\n'
|
||||||
'This program is free software; you can redistribute it and/or '
|
'This program is free software; you can redistribute it and/or '
|
||||||
'modify it under the terms of the GNU General Public License as '
|
'modify it under the terms of the GNU General Public License as '
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -53,4 +53,4 @@ class AboutForm(QtGui.QDialog, Ui_AboutDialog):
|
|||||||
"""
|
"""
|
||||||
import webbrowser
|
import webbrowser
|
||||||
url = u'http://www.openlp.org/en/documentation/introduction/contributing.html'
|
url = u'http://www.openlp.org/en/documentation/introduction/contributing.html'
|
||||||
webbrowser.open_new(url)
|
webbrowser.open_new(url)
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -685,4 +685,4 @@ class Ui_AmendThemeDialog(object):
|
|||||||
self.ThemeTabWidget.setTabText(
|
self.ThemeTabWidget.setTabText(
|
||||||
self.ThemeTabWidget.indexOf(self.OtherOptionsTab),
|
self.ThemeTabWidget.indexOf(self.OtherOptionsTab),
|
||||||
self.trUtf8('Other Options'))
|
self.trUtf8('Other Options'))
|
||||||
self.PreviewGroupBox.setTitle(self.trUtf8('Preview'))
|
self.PreviewGroupBox.setTitle(self.trUtf8('Preview'))
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,15 +6,15 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
# Software Foundation; version 2 of the License. #
|
# Software Foundation; version 2 of the License. #
|
||||||
# #
|
# #
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANdockILITY or #
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
# more details. #
|
# more details. #
|
||||||
# #
|
# #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -105,4 +105,4 @@ class Ui_PluginViewDialog(object):
|
|||||||
self.AboutLabel.setText(self.trUtf8('About:'))
|
self.AboutLabel.setText(self.trUtf8('About:'))
|
||||||
self.StatusLabel.setText(self.trUtf8('Status:'))
|
self.StatusLabel.setText(self.trUtf8('Status:'))
|
||||||
self.StatusComboBox.setItemText(0, self.trUtf8('Active'))
|
self.StatusComboBox.setItemText(0, self.trUtf8('Active'))
|
||||||
self.StatusComboBox.setItemText(1, self.trUtf8('Inactive'))
|
self.StatusComboBox.setItemText(1, self.trUtf8('Inactive'))
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -22,6 +22,7 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -59,4 +59,4 @@ class Ui_SettingsDialog(object):
|
|||||||
QtCore.QMetaObject.connectSlotsByName(SettingsDialog)
|
QtCore.QMetaObject.connectSlotsByName(SettingsDialog)
|
||||||
|
|
||||||
def retranslateUi(self, SettingsDialog):
|
def retranslateUi(self, SettingsDialog):
|
||||||
SettingsDialog.setWindowTitle(self.trUtf8('Settings'))
|
SettingsDialog.setWindowTitle(self.trUtf8('Settings'))
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -67,4 +67,4 @@ class SplashScreen(object):
|
|||||||
self.splash_screen.repaint()
|
self.splash_screen.repaint()
|
||||||
|
|
||||||
def finish(self, widget):
|
def finish(self, widget):
|
||||||
self.splash_screen.finish(widget)
|
self.splash_screen.finish(widget)
|
||||||
|
@ -1,20 +1,27 @@
|
|||||||
"""
|
# -*- coding: utf-8 -*-
|
||||||
OpenLP - Open Source Lyrics Projection
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
Copyright (c) 2008 Raoul Snyman
|
|
||||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
###############################################################################
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
Foundation; version 2 of the License.
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
You should have received a copy of the GNU General Public License along with
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
# Software Foundation; version 2 of the License. #
|
||||||
"""
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -159,9 +159,10 @@ class ThemesTab(SettingsTab):
|
|||||||
image = self.parent.ThemeManagerContents.getPreviewImage(
|
image = self.parent.ThemeManagerContents.getPreviewImage(
|
||||||
self.global_theme)
|
self.global_theme)
|
||||||
preview = QtGui.QPixmap(unicode(image))
|
preview = QtGui.QPixmap(unicode(image))
|
||||||
display = preview.scaled(300, 255, QtCore.Qt.KeepAspectRatio,
|
if not preview.isNull():
|
||||||
QtCore.Qt.SmoothTransformation)
|
preview = preview.scaled(300, 255, QtCore.Qt.KeepAspectRatio,
|
||||||
self.DefaultListView.setPixmap(display)
|
QtCore.Qt.SmoothTransformation)
|
||||||
|
self.DefaultListView.setPixmap(preview)
|
||||||
|
|
||||||
def updateThemeList(self, theme_list):
|
def updateThemeList(self, theme_list):
|
||||||
"""
|
"""
|
||||||
@ -184,6 +185,7 @@ class ThemesTab(SettingsTab):
|
|||||||
image = self.parent.ThemeManagerContents.getPreviewImage(
|
image = self.parent.ThemeManagerContents.getPreviewImage(
|
||||||
self.global_theme)
|
self.global_theme)
|
||||||
preview = QtGui.QPixmap(unicode(image))
|
preview = QtGui.QPixmap(unicode(image))
|
||||||
display = preview.scaled(300, 255, QtCore.Qt.KeepAspectRatio,
|
if not preview.isNull():
|
||||||
QtCore.Qt.SmoothTransformation)
|
preview = preview.scaled(300, 255, QtCore.Qt.KeepAspectRatio,
|
||||||
self.DefaultListView.setPixmap(display)
|
QtCore.Qt.SmoothTransformation)
|
||||||
|
self.DefaultListView.setPixmap(preview)
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -44,6 +44,12 @@ class AppLocation(object):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_directory(dir_type):
|
def get_directory(dir_type):
|
||||||
|
"""
|
||||||
|
Return the appropriate directory according to the directory type.
|
||||||
|
|
||||||
|
``dir_type``
|
||||||
|
The directory type you want, for instance the data directory.
|
||||||
|
"""
|
||||||
if dir_type == AppLocation.AppDir:
|
if dir_type == AppLocation.AppDir:
|
||||||
return os.path.abspath(os.path.split(sys.argv[0])[0])
|
return os.path.abspath(os.path.split(sys.argv[0])[0])
|
||||||
elif dir_type == AppLocation.ConfigDir:
|
elif dir_type == AppLocation.ConfigDir:
|
||||||
@ -95,6 +101,16 @@ class AppLocation(object):
|
|||||||
|
|
||||||
|
|
||||||
def check_latest_version(config, current_version):
|
def check_latest_version(config, current_version):
|
||||||
|
"""
|
||||||
|
Check the latest version of OpenLP against the version file on the OpenLP
|
||||||
|
site.
|
||||||
|
|
||||||
|
``config``
|
||||||
|
The OpenLP config object.
|
||||||
|
|
||||||
|
``current_version``
|
||||||
|
The current version of OpenLP.
|
||||||
|
"""
|
||||||
version_string = current_version
|
version_string = current_version
|
||||||
#set to prod in the distribution confif file.
|
#set to prod in the distribution confif file.
|
||||||
last_test = config.get_config(u'last version test', datetime.now().date())
|
last_test = config.get_config(u'last version test', datetime.now().date())
|
||||||
@ -113,6 +129,18 @@ def check_latest_version(config, current_version):
|
|||||||
log.exception(u'Reason for failure: %s', e.reason)
|
log.exception(u'Reason for failure: %s', e.reason)
|
||||||
return version_string
|
return version_string
|
||||||
|
|
||||||
|
def variant_to_unicode(variant):
|
||||||
|
"""
|
||||||
|
Converts a QVariant to a unicode string.
|
||||||
|
|
||||||
|
``variant``
|
||||||
|
The QVariant instance to convert to unicode.
|
||||||
|
"""
|
||||||
|
string = variant.toString()
|
||||||
|
if not isinstance(string, unicode):
|
||||||
|
string = unicode(string, u'utf8')
|
||||||
|
return string
|
||||||
|
|
||||||
from registry import Registry
|
from registry import Registry
|
||||||
from confighelper import ConfigHelper
|
from confighelper import ConfigHelper
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -127,4 +127,4 @@ class Registry(object):
|
|||||||
return False
|
return False
|
||||||
finally:
|
finally:
|
||||||
if file_handle:
|
if file_handle:
|
||||||
file_handle.close()
|
file_handle.close()
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -21,4 +21,4 @@
|
|||||||
# You should have received a copy of the GNU General Public License along #
|
# You should have received a copy of the GNU General Public License along #
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -23,10 +23,204 @@
|
|||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import sqlite3
|
||||||
|
|
||||||
|
from sqlalchemy import *
|
||||||
|
from sqlalchemy import create_engine
|
||||||
|
from sqlalchemy.orm import scoped_session, sessionmaker, mapper, relation
|
||||||
|
|
||||||
|
from openlp.core.lib import PluginConfig
|
||||||
|
from openlp.plugins.bibles.lib.models import *
|
||||||
|
|
||||||
|
class BaseModel(object):
|
||||||
|
"""
|
||||||
|
BaseModel provides a base object with a set of generic functions
|
||||||
|
"""
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def populate(cls, **kwargs):
|
||||||
|
"""
|
||||||
|
Creates an instance of a class and populates it, returning the instance
|
||||||
|
"""
|
||||||
|
me = cls()
|
||||||
|
keys = kwargs.keys()
|
||||||
|
for key in keys:
|
||||||
|
me.__setattr__(key, kwargs[key])
|
||||||
|
return me
|
||||||
|
|
||||||
|
class TBibleMeta(BaseModel):
|
||||||
|
"""
|
||||||
|
Bible Meta Data
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
class TTestament(BaseModel):
|
||||||
|
"""
|
||||||
|
Bible Testaments
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
class TBook(BaseModel):
|
||||||
|
"""
|
||||||
|
Song model
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
class TVerse(BaseModel):
|
||||||
|
"""
|
||||||
|
Topic model
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
temp_meta_table = Table(u'metadata_temp', metadata,
|
||||||
|
Column(u'key', types.Unicode(255), primary_key=True),
|
||||||
|
Column(u'value', types.Unicode(255)),
|
||||||
|
)
|
||||||
|
temp_testament_table = Table(u'testament_temp', metadata,
|
||||||
|
Column(u'id', types.Integer, primary_key=True),
|
||||||
|
Column(u'name', types.Unicode(30)),
|
||||||
|
)
|
||||||
|
temp_book_table = Table(u'book_temp', metadata,
|
||||||
|
Column(u'id', types.Integer, primary_key=True),
|
||||||
|
Column(u'testament_id', types.Integer),
|
||||||
|
Column(u'name', types.Unicode(30)),
|
||||||
|
Column(u'abbreviation', types.Unicode(5)),
|
||||||
|
)
|
||||||
|
temp_verse_table = Table(u'verse_temp', metadata,
|
||||||
|
Column(u'id', types.Integer, primary_key=True),
|
||||||
|
Column(u'book_id', types.Integer),
|
||||||
|
Column(u'chapter', types.Integer),
|
||||||
|
Column(u'verse', types.Integer),
|
||||||
|
Column(u'text', types.UnicodeText),
|
||||||
|
)
|
||||||
|
|
||||||
|
mapper(TBibleMeta, temp_meta_table)
|
||||||
|
mapper(TTestament, temp_testament_table)
|
||||||
|
mapper(TBook, temp_book_table)
|
||||||
|
mapper(TVerse, temp_verse_table)
|
||||||
|
|
||||||
|
def init_models(url):
|
||||||
|
engine = create_engine(url)
|
||||||
|
metadata.bind = engine
|
||||||
|
session = scoped_session(sessionmaker(autoflush=False,
|
||||||
|
autocommit=False, bind=engine))
|
||||||
|
return session
|
||||||
|
|
||||||
class MigrateBibles():
|
class MigrateBibles():
|
||||||
def __init__(self, display):
|
def __init__(self, display):
|
||||||
self.display = display
|
self.display = display
|
||||||
|
self.config = PluginConfig(u'Bibles')
|
||||||
|
self.data_path = self.config.get_data_path()
|
||||||
|
self.database_files = self.config.get_files(u'sqlite')
|
||||||
|
print self.database_files
|
||||||
|
|
||||||
|
def progress(self, text):
|
||||||
|
print text
|
||||||
|
self.display.output(text)
|
||||||
|
|
||||||
def process(self):
|
def process(self):
|
||||||
self.display.output(u'Bible process started')
|
self.progress(u'Bibles processing started')
|
||||||
self.display.output(u'Bible process finished')
|
for f in self.database_files:
|
||||||
|
self.v_1_9_0(f)
|
||||||
|
self.progress(u'Bibles processing finished')
|
||||||
|
|
||||||
|
def v_1_9_0(self, database):
|
||||||
|
self.progress(u'Migration 1.9.0 Started for ' + database)
|
||||||
|
self._v1_9_0_old(database)
|
||||||
|
self._v1_9_0_new(database)
|
||||||
|
self._v1_9_0_cleanup(database)
|
||||||
|
self.progress(u'Migration 1.9.0 Finished for ' + database)
|
||||||
|
|
||||||
|
def _v1_9_0_old(self, database):
|
||||||
|
self.progress(u'Rename Tables ' + database)
|
||||||
|
conn = sqlite3.connect(os.path.join(self.data_path, database))
|
||||||
|
conn.execute(u'alter table book rename to book_temp;')
|
||||||
|
conn.commit()
|
||||||
|
conn.execute(u'alter table testament rename to testament_temp;')
|
||||||
|
conn.commit()
|
||||||
|
conn.execute(u'alter table verse rename to verse_temp;')
|
||||||
|
conn.commit()
|
||||||
|
conn.execute(u'alter table metadata rename to metadata_temp;')
|
||||||
|
conn.commit()
|
||||||
|
|
||||||
|
def _v1_9_0_new(self, database):
|
||||||
|
self.progress(u'Create new Tables ' + database)
|
||||||
|
self.db_url = u'sqlite:///' + self.data_path + u'/' + database
|
||||||
|
print self.db_url
|
||||||
|
self.session = init_models(self.db_url)
|
||||||
|
metadata.create_all(checkfirst=True)
|
||||||
|
self.progress(u'Create testament table')
|
||||||
|
results = self.session.query(TTestament).order_by(TTestament.id).all()
|
||||||
|
for testament_temp in results:
|
||||||
|
testament = Testament()
|
||||||
|
testament.id = testament_temp.id
|
||||||
|
testament.name = testament_temp.name
|
||||||
|
try:
|
||||||
|
self.session.add(testament)
|
||||||
|
self.session.commit()
|
||||||
|
except:
|
||||||
|
self.session.rollback()
|
||||||
|
print u'Error thrown = ', sys.exc_info()[1]
|
||||||
|
self.progress(u'Create book table')
|
||||||
|
results = self.session.query(TBook).order_by(TBook.id).all()
|
||||||
|
for book_temp in results:
|
||||||
|
book = Book()
|
||||||
|
book.id = book_temp.id
|
||||||
|
book.testament_id = book_temp.testament_id
|
||||||
|
book.name = book_temp.name
|
||||||
|
book.abbreviation = book_temp.abbreviation
|
||||||
|
try:
|
||||||
|
self.session.add(book)
|
||||||
|
self.session.commit()
|
||||||
|
except:
|
||||||
|
self.session.rollback()
|
||||||
|
print u'Error thrown = ', sys.exc_info()[1]
|
||||||
|
self.progress(u'Create verse table')
|
||||||
|
results = self.session.query(TVerse).order_by(TVerse.id).all()
|
||||||
|
for verse_temp in results:
|
||||||
|
verse = Verse()
|
||||||
|
verse.id = verse_temp.id
|
||||||
|
verse.book_id = verse_temp.book_id
|
||||||
|
verse.chapter = verse_temp.chapter
|
||||||
|
verse.verse = verse_temp.verse
|
||||||
|
verse.text = verse_temp.text
|
||||||
|
try:
|
||||||
|
self.session.add(verse)
|
||||||
|
except:
|
||||||
|
self.session.rollback()
|
||||||
|
print u'Error thrown = ', sys.exc_info()[1]
|
||||||
|
try:
|
||||||
|
self.session.commit()
|
||||||
|
except:
|
||||||
|
self.session.rollback()
|
||||||
|
print u'Error thrown = ', sys.exc_info()[1]
|
||||||
|
self.progress(u'Create metadata table')
|
||||||
|
results = self.session.query(TBibleMeta).order_by(TBibleMeta.key).all()
|
||||||
|
for biblemeta_temp in results:
|
||||||
|
biblemeta = BibleMeta()
|
||||||
|
biblemeta.key = biblemeta_temp.key
|
||||||
|
biblemeta.value = biblemeta_temp.value
|
||||||
|
try:
|
||||||
|
self.session.add(biblemeta)
|
||||||
|
self.session.commit()
|
||||||
|
except:
|
||||||
|
self.session.rollback()
|
||||||
|
print u'Error thrown = ', sys.exc_info()[1]
|
||||||
|
|
||||||
|
def _v1_9_0_cleanup(self, database):
|
||||||
|
self.progress(u'Update Internal Data ' + database)
|
||||||
|
conn = sqlite3.connect(os.path.join(self.data_path, database))
|
||||||
|
conn.commit()
|
||||||
|
conn.execute(u'drop table book_temp;')
|
||||||
|
conn.commit()
|
||||||
|
conn.execute(u'drop table testament_temp;')
|
||||||
|
conn.commit()
|
||||||
|
conn.execute(u'drop table verse_temp;')
|
||||||
|
conn.commit()
|
||||||
|
conn.execute(u'drop table metadata_temp;')
|
||||||
|
conn.commit()
|
||||||
|
conn.execute(u'vacuum;')
|
||||||
|
conn.commit()
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -46,4 +46,4 @@ class MigrateFiles():
|
|||||||
self.display.sub_output(u'images created')
|
self.display.sub_output(u'images created')
|
||||||
ConfigHelper.get_config(u'presentations', u'data path')
|
ConfigHelper.get_config(u'presentations', u'data path')
|
||||||
self.display.sub_output(u'presentations created')
|
self.display.sub_output(u'presentations created')
|
||||||
self.display.output(u'Initial Setup finished')
|
self.display.output(u'Initial Setup finished')
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -198,4 +198,4 @@ class MigrateSongs():
|
|||||||
conn.execute(u'drop table songauthors_temp;')
|
conn.execute(u'drop table songauthors_temp;')
|
||||||
conn.commit()
|
conn.commit()
|
||||||
conn.execute(u'drop table settings;')
|
conn.execute(u'drop table settings;')
|
||||||
conn.commit()
|
conn.commit()
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -21,4 +21,4 @@
|
|||||||
# You should have received a copy of the GNU General Public License along #
|
# You should have received a copy of the GNU General Public License along #
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -21,4 +21,4 @@
|
|||||||
# You should have received a copy of the GNU General Public License along #
|
# You should have received a copy of the GNU General Public License along #
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -1,11 +1,27 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
# Form implementation generated from reading ui file 'alertform.ui'
|
###############################################################################
|
||||||
#
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# Created: Sat Feb 13 08:19:51 2010
|
# --------------------------------------------------------------------------- #
|
||||||
# by: PyQt4 UI code generator 4.6.2
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
#
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# WARNING! All changes made in this file will be lost!
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
# Software Foundation; version 2 of the License. #
|
||||||
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
|
@ -1,11 +1,27 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
# Form implementation generated from reading ui file 'alerteditdialog.ui'
|
###############################################################################
|
||||||
#
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# Created: Sun Feb 14 16:45:10 2010
|
# --------------------------------------------------------------------------- #
|
||||||
# by: PyQt4 UI code generator 4.6.2
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
#
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# WARNING! All changes made in this file will be lost!
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
# Software Foundation; version 2 of the License. #
|
||||||
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -22,5 +22,6 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from alertsmanager import AlertsManager
|
from alertsmanager import AlertsManager
|
||||||
from manager import DBManager
|
from manager import DBManager
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -35,4 +35,4 @@ session = None
|
|||||||
|
|
||||||
# Global metadata. If you have multiple databases with overlapping table
|
# Global metadata. If you have multiple databases with overlapping table
|
||||||
# names, you'll need a metadata for each database
|
# names, you'll need a metadata for each database
|
||||||
metadata = MetaData()
|
metadata = MetaData()
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -21,4 +21,4 @@
|
|||||||
# You should have received a copy of the GNU General Public License along #
|
# You should have received a copy of the GNU General Public License along #
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -25,4 +25,4 @@
|
|||||||
|
|
||||||
from importwizardform import ImportWizardForm
|
from importwizardform import ImportWizardForm
|
||||||
|
|
||||||
__all__ = ['ImportWizardForm']
|
__all__ = ['ImportWizardForm']
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -32,7 +32,7 @@ from PyQt4 import QtCore, QtGui
|
|||||||
|
|
||||||
from bibleimportwizard import Ui_BibleImportWizard
|
from bibleimportwizard import Ui_BibleImportWizard
|
||||||
from openlp.core.lib import Receiver
|
from openlp.core.lib import Receiver
|
||||||
from openlp.core.utils import AppLocation
|
from openlp.core.utils import AppLocation, variant_to_unicode
|
||||||
from openlp.plugins.bibles.lib.manager import BibleFormat
|
from openlp.plugins.bibles.lib.manager import BibleFormat
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -60,9 +60,21 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
log.info(u'BibleImportForm loaded')
|
log.info(u'BibleImportForm loaded')
|
||||||
|
|
||||||
def __init__(self, parent, config, manager, bibleplugin):
|
def __init__(self, parent, config, manager, bibleplugin):
|
||||||
'''
|
"""
|
||||||
Constructor
|
Instantiate the wizard, and run any extra setup we need to.
|
||||||
'''
|
|
||||||
|
``parent``
|
||||||
|
The QWidget-derived parent of the wizard.
|
||||||
|
|
||||||
|
``config``
|
||||||
|
The configuration object for storing and retrieving settings.
|
||||||
|
|
||||||
|
``manager``
|
||||||
|
The Bible manager.
|
||||||
|
|
||||||
|
``bibleplugin``
|
||||||
|
The Bible plugin.
|
||||||
|
"""
|
||||||
QtGui.QWizard.__init__(self, parent)
|
QtGui.QWizard.__init__(self, parent)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
self.registerFields()
|
self.registerFields()
|
||||||
@ -97,10 +109,16 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
self.onCurrentIdChanged)
|
self.onCurrentIdChanged)
|
||||||
|
|
||||||
def exec_(self):
|
def exec_(self):
|
||||||
|
"""
|
||||||
|
Run the wizard.
|
||||||
|
"""
|
||||||
self.setDefaults()
|
self.setDefaults()
|
||||||
return QtGui.QWizard.exec_(self)
|
return QtGui.QWizard.exec_(self)
|
||||||
|
|
||||||
def validateCurrentPage(self):
|
def validateCurrentPage(self):
|
||||||
|
"""
|
||||||
|
Validate the current page before moving on to the next page.
|
||||||
|
"""
|
||||||
if self.currentId() == 0:
|
if self.currentId() == 0:
|
||||||
# Welcome page
|
# Welcome page
|
||||||
return True
|
return True
|
||||||
@ -144,7 +162,9 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
return True
|
return True
|
||||||
elif self.currentId() == 2:
|
elif self.currentId() == 2:
|
||||||
# License details
|
# License details
|
||||||
if self.field(u'license_version').toString() == u'':
|
license_version = variant_to_unicode(self.field(u'license_version'))
|
||||||
|
license_copyright = variant_to_unicode(self.field(u'license_copyright'))
|
||||||
|
if license_version == u'':
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
self.trUtf8('Empty Version Name'),
|
self.trUtf8('Empty Version Name'),
|
||||||
self.trUtf8('You need to specify a version name for your '
|
self.trUtf8('You need to specify a version name for your '
|
||||||
@ -152,7 +172,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||||
self.VersionNameEdit.setFocus()
|
self.VersionNameEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.field(u'license_copyright').toString() == u'':
|
elif license_copyright == u'':
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
self.trUtf8('Empty Copyright'),
|
self.trUtf8('Empty Copyright'),
|
||||||
self.trUtf8('You need to set a copyright for your Bible! '
|
self.trUtf8('You need to set a copyright for your Bible! '
|
||||||
@ -161,8 +181,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||||
self.CopyrightEdit.setFocus()
|
self.CopyrightEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.manager.exists(
|
elif self.manager.exists(license_version):
|
||||||
self.field(u'license_version').toString()):
|
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
self.trUtf8('Bible Exists'),
|
self.trUtf8('Bible Exists'),
|
||||||
self.trUtf8('This Bible already exists! Please import '
|
self.trUtf8('This Bible already exists! Please import '
|
||||||
@ -176,27 +195,49 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def onLocationComboBoxChanged(self, index):
|
def onLocationComboBoxChanged(self, index):
|
||||||
|
"""
|
||||||
|
Setup the list of Bibles when you select a different source on the web
|
||||||
|
download page.
|
||||||
|
|
||||||
|
``index``
|
||||||
|
The index of the combo box.
|
||||||
|
"""
|
||||||
self.BibleComboBox.clear()
|
self.BibleComboBox.clear()
|
||||||
for bible, abbreviation in self.web_bible_list[index].iteritems():
|
for bible in self.web_bible_list[index].keys():
|
||||||
self.BibleComboBox.addItem(unicode(self.trUtf8(bible)))
|
self.BibleComboBox.addItem(unicode(self.trUtf8(bible)))
|
||||||
|
|
||||||
def onOsisFileButtonClicked(self):
|
def onOsisFileButtonClicked(self):
|
||||||
self.getFileName(self.trUtf8('Open OSIS file'),
|
"""
|
||||||
|
Show the file open dialog for the OSIS file.
|
||||||
|
"""
|
||||||
|
self.getFileName(self.trUtf8('Open OSIS File'),
|
||||||
self.OSISLocationEdit)
|
self.OSISLocationEdit)
|
||||||
|
|
||||||
def onBooksFileButtonClicked(self):
|
def onBooksFileButtonClicked(self):
|
||||||
self.getFileName(self.trUtf8('Open Books CSV file'),
|
"""
|
||||||
|
Show the file open dialog for the books CSV file.
|
||||||
|
"""
|
||||||
|
self.getFileName(self.trUtf8('Open Books CSV File'),
|
||||||
self.BooksLocationEdit)
|
self.BooksLocationEdit)
|
||||||
|
|
||||||
def onCsvVersesFileButtonClicked(self):
|
def onCsvVersesFileButtonClicked(self):
|
||||||
self.getFileName(self.trUtf8('Open Verses CSV file'),
|
"""
|
||||||
|
Show the file open dialog for the verses CSV file.
|
||||||
|
"""
|
||||||
|
self.getFileName(self.trUtf8('Open Verses CSV File'),
|
||||||
self.CsvVerseLocationEdit)
|
self.CsvVerseLocationEdit)
|
||||||
|
|
||||||
def onOpenSongBrowseButtonClicked(self):
|
def onOpenSongBrowseButtonClicked(self):
|
||||||
|
"""
|
||||||
|
Show the file open dialog for the OpenSong file.
|
||||||
|
"""
|
||||||
self.getFileName(self.trUtf8('Open OpenSong Bible'),
|
self.getFileName(self.trUtf8('Open OpenSong Bible'),
|
||||||
self.OpenSongFileEdit)
|
self.OpenSongFileEdit)
|
||||||
|
|
||||||
def onCancelButtonClicked(self, checked):
|
def onCancelButtonClicked(self, checked):
|
||||||
|
"""
|
||||||
|
Stop the import on pressing the cancel button.
|
||||||
|
"""
|
||||||
log.debug('Cancel button pressed!')
|
log.debug('Cancel button pressed!')
|
||||||
if self.currentId() == 3:
|
if self.currentId() == 3:
|
||||||
Receiver.send_message(u'openlpstopimport')
|
Receiver.send_message(u'openlpstopimport')
|
||||||
@ -270,7 +311,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
books_reader = csv.reader(books_file, dialect)
|
books_reader = csv.reader(books_file, dialect)
|
||||||
for line in books_reader:
|
for line in books_reader:
|
||||||
self.web_bible_list[DownloadLocation.Crosswalk][line[0]] = \
|
self.web_bible_list[DownloadLocation.Crosswalk][line[0]] = \
|
||||||
unicode(line[1], u'utf-8').strip()
|
unicode(line[1], u'utf8').strip()
|
||||||
except:
|
except:
|
||||||
log.exception(u'Crosswalk resources missing')
|
log.exception(u'Crosswalk resources missing')
|
||||||
finally:
|
finally:
|
||||||
@ -315,25 +356,28 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
|
|
||||||
def performImport(self):
|
def performImport(self):
|
||||||
bible_type = self.field(u'source_format').toInt()[0]
|
bible_type = self.field(u'source_format').toInt()[0]
|
||||||
|
license_version = variant_to_unicode(self.field(u'license_version'))
|
||||||
|
license_copyright = variant_to_unicode(self.field(u'license_copyright'))
|
||||||
|
license_permission = variant_to_unicode(self.field(u'license_permission'))
|
||||||
importer = None
|
importer = None
|
||||||
if bible_type == BibleFormat.OSIS:
|
if bible_type == BibleFormat.OSIS:
|
||||||
# Import an OSIS bible
|
# Import an OSIS bible
|
||||||
importer = self.manager.import_bible(BibleFormat.OSIS,
|
importer = self.manager.import_bible(BibleFormat.OSIS,
|
||||||
name=unicode(self.field(u'license_version').toString()),
|
name=license_version,
|
||||||
filename=unicode(self.field(u'osis_location').toString())
|
filename=variant_to_unicode(self.field(u'osis_location'))
|
||||||
)
|
)
|
||||||
elif bible_type == BibleFormat.CSV:
|
elif bible_type == BibleFormat.CSV:
|
||||||
# Import a CSV bible
|
# Import a CSV bible
|
||||||
importer = self.manager.import_bible(BibleFormat.CSV,
|
importer = self.manager.import_bible(BibleFormat.CSV,
|
||||||
name=unicode(self.field(u'license_version').toString()),
|
name=license_version,
|
||||||
booksfile=self.field(u'csv_booksfile').toString(),
|
booksfile=variant_to_unicode(self.field(u'csv_booksfile')),
|
||||||
versefile=self.field(u'csv_versefile').toString()
|
versefile=variant_to_unicode(self.field(u'csv_versefile'))
|
||||||
)
|
)
|
||||||
elif bible_type == BibleFormat.OpenSong:
|
elif bible_type == BibleFormat.OpenSong:
|
||||||
# Import an OpenSong bible
|
# Import an OpenSong bible
|
||||||
importer = self.manager.import_bible(BibleFormat.OpenSong,
|
importer = self.manager.import_bible(BibleFormat.OpenSong,
|
||||||
name=unicode(self.field(u'license_version').toString()),
|
name=license_version,
|
||||||
filename=self.field(u'opensong_file').toString()
|
filename=variant_to_unicode(self.field(u'opensong_file'))
|
||||||
)
|
)
|
||||||
elif bible_type == BibleFormat.WebDownload:
|
elif bible_type == BibleFormat.WebDownload:
|
||||||
# Import a bible from the web
|
# Import a bible from the web
|
||||||
@ -344,23 +388,20 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
unicode(self.BibleComboBox.currentText(), u'utf8')]
|
unicode(self.BibleComboBox.currentText(), u'utf8')]
|
||||||
elif download_location == DownloadLocation.BibleGateway:
|
elif download_location == DownloadLocation.BibleGateway:
|
||||||
bible = self.web_bible_list[DownloadLocation.BibleGateway][
|
bible = self.web_bible_list[DownloadLocation.BibleGateway][
|
||||||
self.BibleComboBox.currentText()]
|
unicode(self.BibleComboBox.currentText(), u'utf8')]
|
||||||
importer = self.manager.import_bible(BibleFormat.WebDownload,
|
importer = self.manager.import_bible(
|
||||||
name=unicode(self.field(u'license_version').toString(), u'utf8'),
|
BibleFormat.WebDownload,
|
||||||
|
name=license_version,
|
||||||
download_source=DownloadLocation.get_name(download_location),
|
download_source=DownloadLocation.get_name(download_location),
|
||||||
download_name=bible,
|
download_name=bible,
|
||||||
proxy_server=unicode(self.field(u'proxy_server').toString(), u'utf8'),
|
proxy_server=variant_to_unicode(self.field(u'proxy_server')),
|
||||||
proxy_username=unicode(self.field(u'proxy_username').toString(), u'utf8'),
|
proxy_username=variant_to_unicode(self.field(u'proxy_username')),
|
||||||
proxy_password=unicode(self.field(u'proxy_password').toString(), u'utf8')
|
proxy_password=variant_to_unicode(self.field(u'proxy_password'))
|
||||||
)
|
)
|
||||||
success = importer.do_import()
|
success = importer.do_import()
|
||||||
if success:
|
if success:
|
||||||
self.manager.save_meta_data(
|
self.manager.save_meta_data(license_version, license_version,
|
||||||
unicode(self.field(u'license_version').toString()),
|
license_copyright, license_permission)
|
||||||
unicode(self.field(u'license_version').toString()),
|
|
||||||
unicode(self.field(u'license_copyright').toString()),
|
|
||||||
unicode(self.field(u'license_permission').toString())
|
|
||||||
)
|
|
||||||
self.manager.reload_bibles()
|
self.manager.reload_bibles()
|
||||||
self.ImportProgressLabel.setText(self.trUtf8('Finished import.'))
|
self.ImportProgressLabel.setText(self.trUtf8('Finished import.'))
|
||||||
else:
|
else:
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -26,4 +26,4 @@
|
|||||||
from common import BibleCommon
|
from common import BibleCommon
|
||||||
from manager import BibleManager
|
from manager import BibleManager
|
||||||
from biblestab import BiblesTab
|
from biblestab import BiblesTab
|
||||||
from mediaitem import BibleMediaItem
|
from mediaitem import BibleMediaItem
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -39,10 +39,19 @@ from openlp.plugins.bibles.lib.models import Book
|
|||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
class HTTPBooks(object):
|
class HTTPBooks(object):
|
||||||
|
"""
|
||||||
|
A wrapper class around a small SQLite database which contains the books,
|
||||||
|
chapter counts and verse counts for the web download Bibles. This class
|
||||||
|
contains a singleton "cursor" so that only one connection to the SQLite
|
||||||
|
database is ever used.
|
||||||
|
"""
|
||||||
cursor = None
|
cursor = None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_cursor():
|
def get_cursor():
|
||||||
|
"""
|
||||||
|
Return the cursor object. Instantiate one if it doesn't exist yet.
|
||||||
|
"""
|
||||||
if HTTPBooks.cursor is None:
|
if HTTPBooks.cursor is None:
|
||||||
filepath = os.path.join(
|
filepath = os.path.join(
|
||||||
AppLocation.get_directory(AppLocation.PluginsDir), u'bibles',
|
AppLocation.get_directory(AppLocation.PluginsDir), u'bibles',
|
||||||
@ -53,12 +62,24 @@ class HTTPBooks(object):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def run_sql(query, parameters=()):
|
def run_sql(query, parameters=()):
|
||||||
|
"""
|
||||||
|
Run an SQL query on the database, returning the results.
|
||||||
|
|
||||||
|
``query``
|
||||||
|
The actual SQL query to run.
|
||||||
|
|
||||||
|
``parameters``
|
||||||
|
Any variable parameters to add to the query.
|
||||||
|
"""
|
||||||
cursor = HTTPBooks.get_cursor()
|
cursor = HTTPBooks.get_cursor()
|
||||||
cursor.execute(query, parameters)
|
cursor.execute(query, parameters)
|
||||||
return cursor.fetchall()
|
return cursor.fetchall()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_books():
|
def get_books():
|
||||||
|
"""
|
||||||
|
Return a list of all the books of the Bible.
|
||||||
|
"""
|
||||||
books = HTTPBooks.run_sql(u'SELECT id, testament_id, name, '
|
books = HTTPBooks.run_sql(u'SELECT id, testament_id, name, '
|
||||||
u'abbreviation, chapters FROM books ORDER BY id')
|
u'abbreviation, chapters FROM books ORDER BY id')
|
||||||
book_list = []
|
book_list = []
|
||||||
@ -74,6 +95,12 @@ class HTTPBooks(object):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_book(name):
|
def get_book(name):
|
||||||
|
"""
|
||||||
|
Return a book by name or abbreviation.
|
||||||
|
|
||||||
|
``name``
|
||||||
|
The name or abbreviation of the book.
|
||||||
|
"""
|
||||||
if not isinstance(name, unicode):
|
if not isinstance(name, unicode):
|
||||||
name = unicode(name)
|
name = unicode(name)
|
||||||
books = HTTPBooks.run_sql(u'SELECT id, testament_id, name, '
|
books = HTTPBooks.run_sql(u'SELECT id, testament_id, name, '
|
||||||
@ -92,6 +119,15 @@ class HTTPBooks(object):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_chapter(name, chapter):
|
def get_chapter(name, chapter):
|
||||||
|
"""
|
||||||
|
Return the chapter details for a specific chapter of a book.
|
||||||
|
|
||||||
|
``name``
|
||||||
|
The name or abbreviation of a book.
|
||||||
|
|
||||||
|
``chapter``
|
||||||
|
The chapter number.
|
||||||
|
"""
|
||||||
if not isinstance(name, int):
|
if not isinstance(name, int):
|
||||||
chapter = int(chapter)
|
chapter = int(chapter)
|
||||||
book = HTTPBooks.get_book(name)
|
book = HTTPBooks.get_book(name)
|
||||||
@ -109,6 +145,12 @@ class HTTPBooks(object):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_chapter_count(book):
|
def get_chapter_count(book):
|
||||||
|
"""
|
||||||
|
Return the number of chapters in a book.
|
||||||
|
|
||||||
|
``book``
|
||||||
|
The name or abbreviation of the book.
|
||||||
|
"""
|
||||||
details = HTTPBooks.get_book(book)
|
details = HTTPBooks.get_book(book)
|
||||||
if details:
|
if details:
|
||||||
return details[u'chapters']
|
return details[u'chapters']
|
||||||
@ -116,6 +158,15 @@ class HTTPBooks(object):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_verse_count(book, chapter):
|
def get_verse_count(book, chapter):
|
||||||
|
"""
|
||||||
|
Return the number of verses in a chapter.
|
||||||
|
|
||||||
|
``book``
|
||||||
|
The name or abbreviation of the book.
|
||||||
|
|
||||||
|
``chapter``
|
||||||
|
The number of the chapter.
|
||||||
|
"""
|
||||||
details = HTTPBooks.get_chapter(book, chapter)
|
details = HTTPBooks.get_chapter(book, chapter)
|
||||||
if details:
|
if details:
|
||||||
return details[u'verses']
|
return details[u'verses']
|
||||||
@ -123,7 +174,9 @@ class HTTPBooks(object):
|
|||||||
|
|
||||||
|
|
||||||
class BGExtract(BibleCommon):
|
class BGExtract(BibleCommon):
|
||||||
log.info(u'%s BGExtract loaded', __name__)
|
"""
|
||||||
|
Extract verses from BibleGateway
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, proxyurl=None):
|
def __init__(self, proxyurl=None):
|
||||||
log.debug(u'init %s', proxyurl)
|
log.debug(u'init %s', proxyurl)
|
||||||
@ -133,7 +186,7 @@ class BGExtract(BibleCommon):
|
|||||||
"""
|
"""
|
||||||
Access and decode bibles via the BibleGateway website
|
Access and decode bibles via the BibleGateway website
|
||||||
|
|
||||||
``Version``
|
``version``
|
||||||
The version of the bible like 31 for New International version
|
The version of the bible like 31 for New International version
|
||||||
|
|
||||||
``bookname``
|
``bookname``
|
||||||
@ -196,8 +249,10 @@ class BGExtract(BibleCommon):
|
|||||||
verse_list[verse_number] = u''
|
verse_list[verse_number] = u''
|
||||||
continue
|
continue
|
||||||
if isinstance(verse, NavigableString):
|
if isinstance(verse, NavigableString):
|
||||||
|
if not isinstance(verse, unicode):
|
||||||
|
verse = unicode(verse, u'utf8')
|
||||||
verse_list[verse_number] = verse_list[verse_number] + \
|
verse_list[verse_number] = verse_list[verse_number] + \
|
||||||
unescape(unicode(verse, u'utf-8').replace(u' ', u' '))
|
unescape(verse.replace(u' ', u' '))
|
||||||
# Delete the "0" element, since we don't need it, it's just there for
|
# Delete the "0" element, since we don't need it, it's just there for
|
||||||
# some stupid initial whitespace, courtesy of Bible Gateway.
|
# some stupid initial whitespace, courtesy of Bible Gateway.
|
||||||
del verse_list[0]
|
del verse_list[0]
|
||||||
@ -205,14 +260,15 @@ class BGExtract(BibleCommon):
|
|||||||
return SearchResults(bookname, chapter, verse_list)
|
return SearchResults(bookname, chapter, verse_list)
|
||||||
|
|
||||||
class CWExtract(BibleCommon):
|
class CWExtract(BibleCommon):
|
||||||
log.info(u'%s CWExtract loaded', __name__)
|
"""
|
||||||
|
Extract verses from CrossWalk/BibleStudyTools
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, proxyurl=None):
|
def __init__(self, proxyurl=None):
|
||||||
log.debug(u'init %s', proxyurl)
|
log.debug(u'init %s', proxyurl)
|
||||||
self.proxyurl = proxyurl
|
self.proxyurl = proxyurl
|
||||||
|
|
||||||
def get_bible_chapter(self, version, bookname, chapter):
|
def get_bible_chapter(self, version, bookname, chapter):
|
||||||
log.debug(u'%s %s, %s, %s', __name__, version, bookname, chapter)
|
|
||||||
"""
|
"""
|
||||||
Access and decode bibles via the Crosswalk website
|
Access and decode bibles via the Crosswalk website
|
||||||
|
|
||||||
@ -227,9 +283,9 @@ class CWExtract(BibleCommon):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'get_bible_chapter %s,%s,%s',
|
log.debug(u'get_bible_chapter %s,%s,%s',
|
||||||
version, bookname, chapter)
|
version, bookname, chapter)
|
||||||
bookname = bookname.replace(u' ', u'')
|
urlbookname = bookname.replace(u' ', u'-')
|
||||||
chapter_url = u'http://www.biblestudytools.com/%s/%s/%s.html' % \
|
chapter_url = u'http://www.biblestudytools.com/%s/%s/%s.html' % \
|
||||||
(version, bookname.lower(), chapter)
|
(version, urlbookname.lower(), chapter)
|
||||||
log.debug(u'URL: %s', chapter_url)
|
log.debug(u'URL: %s', chapter_url)
|
||||||
page = urllib2.urlopen(chapter_url)
|
page = urllib2.urlopen(chapter_url)
|
||||||
if not page:
|
if not page:
|
||||||
@ -287,6 +343,10 @@ class HTTPBible(BibleDB):
|
|||||||
self.proxy_password = None
|
self.proxy_password = None
|
||||||
|
|
||||||
def do_import(self):
|
def do_import(self):
|
||||||
|
"""
|
||||||
|
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.wizard.incrementProgressBar('Registering bible...')
|
||||||
self.create_meta(u'download source', self.download_source)
|
self.create_meta(u'download source', self.download_source)
|
||||||
@ -370,17 +430,43 @@ class HTTPBible(BibleDB):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def get_books(self):
|
def get_books(self):
|
||||||
|
"""
|
||||||
|
Return the list of books.
|
||||||
|
"""
|
||||||
return [Book.populate(name=book['name']) for book in HTTPBooks.get_books()]
|
return [Book.populate(name=book['name']) for book in HTTPBooks.get_books()]
|
||||||
|
|
||||||
def lookup_book(self, book):
|
def lookup_book(self, book):
|
||||||
|
"""
|
||||||
|
Look up the name of a book.
|
||||||
|
"""
|
||||||
return HTTPBooks.get_book(book)
|
return HTTPBooks.get_book(book)
|
||||||
|
|
||||||
def get_chapter_count(self, book):
|
def get_chapter_count(self, book):
|
||||||
|
"""
|
||||||
|
Return the number of chapters in a particular book.
|
||||||
|
"""
|
||||||
return HTTPBooks.get_chapter_count(book)
|
return HTTPBooks.get_chapter_count(book)
|
||||||
|
|
||||||
def get_verse_count(self, book, chapter):
|
def get_verse_count(self, book, chapter):
|
||||||
|
"""
|
||||||
|
Return the number of verses for the specified chapter and book.
|
||||||
|
|
||||||
|
``book``
|
||||||
|
The name of the book.
|
||||||
|
|
||||||
|
``chapter``
|
||||||
|
The chapter whose verses are being counted.
|
||||||
|
"""
|
||||||
return HTTPBooks.get_verse_count(book, chapter)
|
return HTTPBooks.get_verse_count(book, chapter)
|
||||||
|
|
||||||
def set_proxy_server(self, server):
|
def set_proxy_server(self, server):
|
||||||
|
"""
|
||||||
|
Sets the proxy server.
|
||||||
|
|
||||||
|
**Note: This is not actually used.**
|
||||||
|
|
||||||
|
``server``
|
||||||
|
The hostname or IP address of the proxy server.
|
||||||
|
"""
|
||||||
self.proxy_server = server
|
self.proxy_server = server
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -60,6 +60,9 @@ class BibleFormat(object):
|
|||||||
def get_class(id):
|
def get_class(id):
|
||||||
"""
|
"""
|
||||||
Return the appropriate imeplementation class.
|
Return the appropriate imeplementation class.
|
||||||
|
|
||||||
|
``id``
|
||||||
|
The Bible format.
|
||||||
"""
|
"""
|
||||||
if id == BibleFormat.OSIS:
|
if id == BibleFormat.OSIS:
|
||||||
return OSISBible
|
return OSISBible
|
||||||
@ -74,6 +77,9 @@ class BibleFormat(object):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def list():
|
def list():
|
||||||
|
"""
|
||||||
|
Return a list of the supported Bible formats.
|
||||||
|
"""
|
||||||
return [
|
return [
|
||||||
BibleFormat.OSIS,
|
BibleFormat.OSIS,
|
||||||
BibleFormat.CSV,
|
BibleFormat.CSV,
|
||||||
@ -247,7 +253,7 @@ class BibleManager(object):
|
|||||||
"""
|
"""
|
||||||
if not isinstance(name, unicode):
|
if not isinstance(name, unicode):
|
||||||
name = unicode(name)
|
name = unicode(name)
|
||||||
for bible, db_object in self.db_cache.iteritems():
|
for bible in self.db_cache.keys():
|
||||||
log.debug(u'Bible from cache in is_new_bible %s', bible)
|
log.debug(u'Bible from cache in is_new_bible %s', bible)
|
||||||
if not isinstance(bible, unicode):
|
if not isinstance(bible, unicode):
|
||||||
bible = unicode(bible)
|
bible = unicode(bible)
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -63,7 +63,8 @@ class OpenSongBible(BibleDB):
|
|||||||
Loads a Bible from file.
|
Loads a Bible from file.
|
||||||
"""
|
"""
|
||||||
log.debug(u'Starting OpenSong import from "%s"' % self.filename)
|
log.debug(u'Starting OpenSong import from "%s"' % self.filename)
|
||||||
self.filename = unicode(self.filename, u'utf-8')
|
if not isinstance(self.filename, unicode):
|
||||||
|
self.filename = unicode(self.filename, u'utf8')
|
||||||
self.wizard.incrementProgressBar(u'Preparing for import...')
|
self.wizard.incrementProgressBar(u'Preparing for import...')
|
||||||
file = None
|
file = None
|
||||||
success = True
|
success = True
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -65,6 +65,7 @@ class OSISBible(BibleDB):
|
|||||||
self.l_regex = re.compile(r'<l (.*?)>')
|
self.l_regex = re.compile(r'<l (.*?)>')
|
||||||
self.w_regex = re.compile(r'<w (.*?)>')
|
self.w_regex = re.compile(r'<w (.*?)>')
|
||||||
self.q_regex = re.compile(r'<q (.*?)>')
|
self.q_regex = re.compile(r'<q (.*?)>')
|
||||||
|
self.trans_regex = re.compile(r'<transChange(.*?)>(.*?)</transChange>')
|
||||||
self.spaces_regex = re.compile(r'([ ]{2,})')
|
self.spaces_regex = re.compile(r'([ ]{2,})')
|
||||||
self.books = {}
|
self.books = {}
|
||||||
filepath = os.path.join(
|
filepath = os.path.join(
|
||||||
@ -159,10 +160,11 @@ class OSISBible(BibleDB):
|
|||||||
verse_text = self.l_regex.sub(u'', verse_text)
|
verse_text = self.l_regex.sub(u'', verse_text)
|
||||||
verse_text = self.w_regex.sub(u'', verse_text)
|
verse_text = self.w_regex.sub(u'', verse_text)
|
||||||
verse_text = self.q_regex.sub(u'', verse_text)
|
verse_text = self.q_regex.sub(u'', verse_text)
|
||||||
|
verse_text = self.trans_regex.sub(u'', verse_text)
|
||||||
verse_text = verse_text.replace(u'</lb>', u'')\
|
verse_text = verse_text.replace(u'</lb>', u'')\
|
||||||
.replace(u'</l>', u'').replace(u'<lg>', u'')\
|
.replace(u'</l>', u'').replace(u'<lg>', u'')\
|
||||||
.replace(u'</lg>', u'').replace(u'</q>', u'')\
|
.replace(u'</lg>', u'').replace(u'</q>', u'')\
|
||||||
.replace(u'</div>', u'')
|
.replace(u'</div>', u'').replace(u'</w>', u'')
|
||||||
verse_text = self.spaces_regex.sub(u' ', verse_text)
|
verse_text = self.spaces_regex.sub(u' ', verse_text)
|
||||||
self.create_verse(db_book.id, chapter, verse, verse_text)
|
self.create_verse(db_book.id, chapter, verse, verse_text)
|
||||||
Receiver.send_message(u'process_events')
|
Receiver.send_message(u'process_events')
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
# Software Foundation; version 2 of the License. #
|
||||||
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
@ -1,20 +1,27 @@
|
|||||||
"""
|
# -*- coding: utf-8 -*-
|
||||||
OpenLP - Open Source Lyrics Projection
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
Copyright (c) 2008 Raoul Snyman
|
|
||||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
###############################################################################
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
Foundation; version 2 of the License.
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
You should have received a copy of the GNU General Public License along with
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
# Software Foundation; version 2 of the License. #
|
||||||
"""
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@ -52,25 +59,25 @@ class TestBibleManager:
|
|||||||
# Register a bible from files
|
# Register a bible from files
|
||||||
log.debug(u'\n.......testRegisterBibleFiles')
|
log.debug(u'\n.......testRegisterBibleFiles')
|
||||||
self.bm.registerFileBible(u'TheMessage','biblebooks_msg_short.csv','bibleverses_msg_short.csv')
|
self.bm.registerFileBible(u'TheMessage','biblebooks_msg_short.csv','bibleverses_msg_short.csv')
|
||||||
self.bm.registerFileBible(u'NIV','biblebooks_niv_short.csv','bibleverses_niv_short.csv')
|
self.bm.registerFileBible(u'NIV','biblebooks_niv_short.csv','bibleverses_niv_short.csv')
|
||||||
b = self.bm.get_bibles()
|
b = self.bm.get_bibles()
|
||||||
for b1 in b:
|
for b1 in b:
|
||||||
log.debug( b1)
|
log.debug( b1)
|
||||||
assert(b1 in b)
|
assert(b1 in b)
|
||||||
|
|
||||||
def testRegisterHTTPBible(self):
|
def testRegisterHTTPBible(self):
|
||||||
# Register a bible from files
|
# Register a bible from files
|
||||||
log.debug( '\n.......testRegisterBibleHTTP')
|
log.debug( '\n.......testRegisterBibleHTTP')
|
||||||
self.bm.registerHTTPBible(u'asv', u'Crosswalk', u'', u'', u'')
|
self.bm.registerHTTPBible(u'asv', u'Crosswalk', u'', u'', u'')
|
||||||
self.bm.registerHTTPBible(u'nasb', u'Biblegateway', u'', u'', u'')
|
self.bm.registerHTTPBible(u'nasb', u'Biblegateway', u'', u'', u'')
|
||||||
self.bm.registerHTTPBible(u'nkj', u'Biblegateway',
|
self.bm.registerHTTPBible(u'nkj', u'Biblegateway',
|
||||||
u'http://tigger2:3128/', u'', u'')
|
u'http://tigger2:3128/', u'', u'')
|
||||||
b = self.bm.get_bibles()
|
b = self.bm.get_bibles()
|
||||||
for b1 in b:
|
for b1 in b:
|
||||||
log.debug( b1)
|
log.debug( b1)
|
||||||
assert(b1 in b)
|
assert(b1 in b)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def testGetBibles(self):
|
def testGetBibles(self):
|
||||||
log.debug(u'\n.......testGetBibles')
|
log.debug(u'\n.......testGetBibles')
|
||||||
# make sure the shuffled sequence does not lose any elements
|
# make sure the shuffled sequence does not lose any elements
|
||||||
@ -85,33 +92,33 @@ class TestBibleManager:
|
|||||||
for c1 in c:
|
for c1 in c:
|
||||||
log.debug( c1)
|
log.debug( c1)
|
||||||
assert(c1 in c)
|
assert(c1 in c)
|
||||||
|
|
||||||
def testGetBookChapterCount(self):
|
def testGetBookChapterCount(self):
|
||||||
log.debug(u'\n.......testGetBookChapterCount')
|
log.debug(u'\n.......testGetBookChapterCount')
|
||||||
assert(self.bm.get_book_chapter_count(u'Matthew') == '28')
|
assert(self.bm.get_book_chapter_count(u'Matthew') == '28')
|
||||||
|
|
||||||
def testGetBookVerseCount(self):
|
def testGetBookVerseCount(self):
|
||||||
log.debug(u'\n.......testGetBookVerseCount')
|
log.debug(u'\n.......testGetBookVerseCount')
|
||||||
assert(self.bm.get_book_verse_count(u'Genesis', 1) == '31')
|
assert(self.bm.get_book_verse_count(u'Genesis', 1) == '31')
|
||||||
assert(self.bm.get_book_verse_count(u'Genesis', 2) == '25')
|
assert(self.bm.get_book_verse_count(u'Genesis', 2) == '25')
|
||||||
assert(self.bm.get_book_verse_count(u'Matthew', 1) == '25')
|
assert(self.bm.get_book_verse_count(u'Matthew', 1) == '25')
|
||||||
assert(self.bm.get_book_verse_count(u'Revelation', 1) == '20')
|
assert(self.bm.get_book_verse_count(u'Revelation', 1) == '20')
|
||||||
|
|
||||||
def testGetVerseText(self):
|
def testGetVerseText(self):
|
||||||
log.debug(u'\n.......testGetVerseText')
|
log.debug(u'\n.......testGetVerseText')
|
||||||
#c = self.bm.get_verse_text(u'TheMessage",'Genesis',1,2,1)
|
#c = self.bm.get_verse_text(u'TheMessage",'Genesis',1,2,1)
|
||||||
#log.debug( c )
|
#log.debug( c )
|
||||||
#c = self.bm.get_verse_text(u'NIV','Genesis',1,1,2)
|
#c = self.bm.get_verse_text(u'NIV','Genesis',1,1,2)
|
||||||
#log.debug( c )
|
#log.debug( c )
|
||||||
c = self.bm.get_verse_text(u'asv','Genesis',10,1,20)
|
c = self.bm.get_verse_text(u'asv','Genesis',10,1,20)
|
||||||
log.debug( c )
|
log.debug( c )
|
||||||
c = self.bm.get_verse_text(u'nasb','Genesis',10,1,20)
|
c = self.bm.get_verse_text(u'nasb','Genesis',10,1,20)
|
||||||
log.debug( c )
|
log.debug( c )
|
||||||
c = self.bm.get_verse_text(u'nkj','Revelation',10,1,20)
|
c = self.bm.get_verse_text(u'nkj','Revelation',10,1,20)
|
||||||
log.debug( c )
|
log.debug( c )
|
||||||
|
|
||||||
def testLoadBible(self):
|
def testLoadBible(self):
|
||||||
log.debug(u'\n.......testLoadBible')
|
log.debug(u'\n.......testLoadBible')
|
||||||
#self.bm.loadBible(u'asv')
|
#self.bm.loadBible(u'asv')
|
||||||
#self.bm.loadBible(u'nasb')
|
#self.bm.loadBible(u'nasb')
|
||||||
#self.bm.loadBible(u'nkj')
|
#self.bm.loadBible(u'nkj')
|
||||||
|
@ -1,20 +1,27 @@
|
|||||||
"""
|
# -*- coding: utf-8 -*-
|
||||||
OpenLP - Open Source Lyrics Projection
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
Copyright (c) 2008 Raoul Snyman
|
|
||||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
###############################################################################
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
Foundation; version 2 of the License.
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
You should have received a copy of the GNU General Public License along with
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
# Software Foundation; version 2 of the License. #
|
||||||
"""
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@ -47,7 +54,7 @@ class TestBibleManager:
|
|||||||
def setup_class(self):
|
def setup_class(self):
|
||||||
log.debug(u'\n.......Register BM')
|
log.debug(u'\n.......Register BM')
|
||||||
self.bm = BibleManager()
|
self.bm = BibleManager()
|
||||||
|
|
||||||
def testGetBibles(self):
|
def testGetBibles(self):
|
||||||
log.debug(u'\n.......testGetBibles')
|
log.debug(u'\n.......testGetBibles')
|
||||||
# make sure the shuffled sequence does not lose any elements
|
# make sure the shuffled sequence does not lose any elements
|
||||||
@ -62,32 +69,32 @@ class TestBibleManager:
|
|||||||
for c1 in c:
|
for c1 in c:
|
||||||
log.debug( c1)
|
log.debug( c1)
|
||||||
assert(c1 in c)
|
assert(c1 in c)
|
||||||
|
|
||||||
def testGetBookChapterCount(self):
|
def testGetBookChapterCount(self):
|
||||||
log.debug(u'\n.......testGetBookChapterCount')
|
log.debug(u'\n.......testGetBookChapterCount')
|
||||||
assert(self.bm.getBookChapterCount(u'asv', u'Matthew')[0] == 28)
|
assert(self.bm.getBookChapterCount(u'asv', u'Matthew')[0] == 28)
|
||||||
|
|
||||||
def testGetBookVerseCount(self):
|
def testGetBookVerseCount(self):
|
||||||
log.debug(u'\n.......testGetBookVerseCount')
|
log.debug(u'\n.......testGetBookVerseCount')
|
||||||
assert(self.bm.getBookVerseCount(u'asv', u'Genesis', 1)[0] == 31)
|
assert(self.bm.getBookVerseCount(u'asv', u'Genesis', 1)[0] == 31)
|
||||||
assert(self.bm.getBookVerseCount(u'TheMessage', u'Genesis', 2)[0] == 25)
|
assert(self.bm.getBookVerseCount(u'TheMessage', u'Genesis', 2)[0] == 25)
|
||||||
assert(self.bm.getBookVerseCount(u'asv', u'Matthew', 1)[0] == 25)
|
assert(self.bm.getBookVerseCount(u'asv', u'Matthew', 1)[0] == 25)
|
||||||
assert(self.bm.getBookVerseCount(u'TheMessage', u'Revelation',
|
assert(self.bm.getBookVerseCount(u'TheMessage', u'Revelation',
|
||||||
1)[0] == 20)
|
1)[0] == 20)
|
||||||
|
|
||||||
def testGetVerseText(self):
|
def testGetVerseText(self):
|
||||||
log.debug(u'\n.......testGetVerseText')
|
log.debug(u'\n.......testGetVerseText')
|
||||||
#c = self.bm.getVerseText(u'TheMessage",'Genesis',1,2,1)
|
#c = self.bm.getVerseText(u'TheMessage",'Genesis',1,2,1)
|
||||||
#log.debug( c )
|
#log.debug( c )
|
||||||
#c = self.bm.getVerseText(u'NIV','Genesis',1,1,2)
|
#c = self.bm.getVerseText(u'NIV','Genesis',1,1,2)
|
||||||
#log.debug( c )
|
#log.debug( c )
|
||||||
c = self.bm.getVerseText(u'asv', u'Genesis', 10, 1, 20)
|
c = self.bm.getVerseText(u'asv', u'Genesis', 10, 1, 20)
|
||||||
log.debug( c )
|
log.debug( c )
|
||||||
c = self.bm.getVerseText(u'TheMessage', u'Genesis', 10, 1, 20)
|
c = self.bm.getVerseText(u'TheMessage', u'Genesis', 10, 1, 20)
|
||||||
log.debug( c )
|
log.debug( c )
|
||||||
c = self.bm.getVerseText(u'asv', u'Revelation', 10, 1, 20)
|
c = self.bm.getVerseText(u'asv', u'Revelation', 10, 1, 20)
|
||||||
log.debug( c )
|
log.debug( c )
|
||||||
c = self.bm.getVersesFromText(u'asv', u'Jesus wept')
|
c = self.bm.getVersesFromText(u'asv', u'Jesus wept')
|
||||||
log.debug( c )
|
log.debug( c )
|
||||||
c = self.bm.getVersesFromText(u'TheMessage', u'Jesus wept')
|
c = self.bm.getVersesFromText(u'TheMessage', u'Jesus wept')
|
||||||
log.debug( c )
|
log.debug( c )
|
||||||
|
@ -1,20 +1,27 @@
|
|||||||
"""
|
# -*- coding: utf-8 -*-
|
||||||
OpenLP - Open Source Lyrics Projection
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
Copyright (c) 2008 Raoul Snyman
|
|
||||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
###############################################################################
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
Foundation; version 2 of the License.
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
You should have received a copy of the GNU General Public License along with
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
# Software Foundation; version 2 of the License. #
|
||||||
"""
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@ -52,10 +59,10 @@ class TestBibleManager:
|
|||||||
# Register a bible from files
|
# Register a bible from files
|
||||||
log.debug(u'\n.......testRegisterBibleFiles')
|
log.debug(u'\n.......testRegisterBibleFiles')
|
||||||
self.bm.registerCSVFileBible(u'TheMessage',
|
self.bm.registerCSVFileBible(u'TheMessage',
|
||||||
u'biblebooks_msg_short.csv', u'bibleverses_msg_short.csv')
|
u'biblebooks_msg_short.csv', u'bibleverses_msg_short.csv')
|
||||||
self.bm.registerCSVFileBible(u'NIV', u'biblebooks_niv_short.csv',
|
self.bm.registerCSVFileBible(u'NIV', u'biblebooks_niv_short.csv',
|
||||||
u'bibleverses_niv_short.csv')
|
u'bibleverses_niv_short.csv')
|
||||||
b = self.bm.get_bibles()
|
b = self.bm.get_bibles()
|
||||||
for b1 in b:
|
for b1 in b:
|
||||||
log.debug( b1)
|
log.debug( b1)
|
||||||
assert(b1 in b)
|
assert(b1 in b)
|
||||||
|
@ -1,20 +1,27 @@
|
|||||||
"""
|
# -*- coding: utf-8 -*-
|
||||||
OpenLP - Open Source Lyrics Projection
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
Copyright (c) 2008 Raoul Snyman
|
|
||||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
###############################################################################
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
Foundation; version 2 of the License.
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
|
# --------------------------------------------------------------------------- #
|
||||||
You should have received a copy of the GNU General Public License along with
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
# Software Foundation; version 2 of the License. #
|
||||||
"""
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@ -55,4 +62,4 @@ class TestBibleManager:
|
|||||||
b = self.bm.get_bibles()
|
b = self.bm.get_bibles()
|
||||||
for b1 in b:
|
for b1 in b:
|
||||||
log.debug( b1)
|
log.debug( b1)
|
||||||
assert(b1 in b)
|
assert(b1 in b)
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -21,4 +21,4 @@
|
|||||||
# You should have received a copy of the GNU General Public License along #
|
# You should have received a copy of the GNU General Public License along #
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -23,4 +23,4 @@
|
|||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from editcustomform import EditCustomForm
|
from editcustomform import EditCustomForm
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -164,4 +164,4 @@ class Ui_customEditDialog(object):
|
|||||||
self.ClearButton.setToolTip(self.trUtf8('Clear edit area'))
|
self.ClearButton.setToolTip(self.trUtf8('Clear edit area'))
|
||||||
self.ThemeLabel.setText(self.trUtf8('Theme:'))
|
self.ThemeLabel.setText(self.trUtf8('Theme:'))
|
||||||
self.ThemeComboBox.setToolTip(self.trUtf8('Set Theme for Slides'))
|
self.ThemeComboBox.setToolTip(self.trUtf8('Set Theme for Slides'))
|
||||||
self.CreditLabel.setText(self.trUtf8('Credits:'))
|
self.CreditLabel.setText(self.trUtf8('Credits:'))
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
||||||
# Carsten Tinggaard #
|
# Thompson, Jon Tibble, Carsten Tinggaard #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
@ -22,6 +22,7 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user