[tryton-debian-vcs] openoffice-python branch debian created. 483e8ef901d4d088ba30b301ec2226e64609aa4a
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Nov 27 16:46:17 UTC 2013
The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/openoffice-python.git;a=commitdiff;h=483e8ef901d4d088ba30b301ec2226e64609aa4a
commit 483e8ef901d4d088ba30b301ec2226e64609aa4a
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Aug 6 16:20:34 2013 +0200
Releasing debian version 0.1+20110209-8.
diff --git a/debian/changelog b/debian/changelog
index 4536164..a7ef50a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+openoffice-python (1:0.1+20110209-8) unstable; urgency=low
+
+ * Adapting the rules file to work also with git-buildpackage.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Tue, 06 Aug 2013 13:31:54 +0200
+
openoffice-python (1:0.1+20110209-7) unstable; urgency=low
* Rebuilding against correct source tarball
commit d4252ab670f660ca57efc441f43ce67a4460a686
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Aug 5 18:12:00 2013 +0200
Adapting the rules file to work also with git-buildpackage.
diff --git a/debian/rules b/debian/rules
index b918925..14bccec 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,11 +1,23 @@
#!/usr/bin/make -f
+PACKAGE_NAME := 'openoffice_python'
+
%:
dh ${@} --with python2
override_dh_auto_clean:
dh_auto_clean
+
+override_dh_auto_build:
+ mv $(PACKAGE_NAME).egg-info $(PACKAGE_NAME).hen-info
+ mv PKG-INFO PKG-INFO.hen
+ dh_auto_build
+
+override_dh_auto_install:
+ dh_auto_install
rm -rf *.egg-info
+ mv $(PACKAGE_NAME).hen-info $(PACKAGE_NAME).egg-info
+ mv PKG-INFO.hen PKG-INFO
override_dh_builddeb:
dh_builddeb -- -Zxz -z9
commit a53f42eebb89cdd33c13f016571d1e2f5f09acf1
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Jun 2 21:34:10 2013 +0200
Releasing debian version 0.1+20110209-7.
diff --git a/debian/changelog b/debian/changelog
index fb3cf17..4536164 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+openoffice-python (1:0.1+20110209-7) unstable; urgency=low
+
+ * Rebuilding against correct source tarball
+ openoffice-python_0.1+20110209.orig.tar.xz. Thanks to
+ Colin Watson for the hint.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Sun, 02 Jun 2013 21:23:58 +0200
+
openoffice-python (1:0.1+20110209-6) unstable; urgency=low
* Removing Daniel from Uploaders. Thanks for your work! (Closes: #704354).
commit 6db87528f0409b426028c15a50e0ffcfbc2a618f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Fri May 31 20:26:47 2013 +0200
Releasing debian version 0.1+20110209-6.
diff --git a/debian/changelog b/debian/changelog
index 9a2d924..fb3cf17 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+openoffice-python (1:0.1+20110209-6) unstable; urgency=low
+
+ * Removing Daniel from Uploaders. Thanks for your work! (Closes: #704354).
+ * Removing needless empty line in rules.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Fri, 31 May 2013 15:11:53 +0200
+
openoffice-python (1:0.1+20110209-5) experimental; urgency=low
* Updating Homepage to new address.
commit 666ecde292c88924410ecfa753368c6347c5245c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed May 29 17:19:29 2013 +0200
Removing needless empty line in rules.
diff --git a/debian/rules b/debian/rules
index 1ae0776..b918925 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,6 @@
override_dh_auto_clean:
dh_auto_clean
-
rm -rf *.egg-info
override_dh_builddeb:
commit ba2d81d51fd60be3f9de2301f4740810c82c173b
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Apr 21 23:19:57 2013 +0200
Removing Daniel from Uploaders. Thanks for your work! (Closes: #704354).
diff --git a/debian/control b/debian/control
index 2a49129..cf69c9f 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: openoffice-python
Section: python
Priority: optional
Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
-Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at m9s.biz>
+Uploaders: Mathias Behrle <mathiasb at m9s.biz>
Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
Standards-Version: 3.9.4
Homepage: https://gitorious.org/openoffice-python
commit 3012d2d07249dcfcfdbf8e4be1485cf67574c2f8
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Feb 24 19:09:02 2013 +0100
Releasing debian version 0.1+20110209-5.
diff --git a/debian/changelog b/debian/changelog
index 090178b..9a2d924 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+openoffice-python (1:0.1+20110209-5) experimental; urgency=low
+
+ * Updating Homepage to new address.
+ * Adding watch file.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Sun, 24 Feb 2013 18:52:13 +0100
+
openoffice-python (1:0.1+20110209-4) experimental; urgency=low
* Removing obsolete Dm-Upload-Allowed
commit 1aa8e069d2d5a277f929bc497843d206b87d33d9
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Feb 24 18:51:49 2013 +0100
Adding watch file.
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..9879fe8
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+https://pypi.python.org/packages/source/o/openoffice-python/openoffice-python-(\d+.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz))
commit 536411d6a72244f1d5e265775ebc4ee09b3f89e2
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Feb 24 18:47:35 2013 +0100
Updating Homepage to new address.
diff --git a/debian/control b/debian/control
index cd4171b..2a49129 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at m9s.biz>
Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
Standards-Version: 3.9.4
-Homepage: http://openoffice-python.origo.ethz.ch/
+Homepage: https://gitorious.org/openoffice-python
Vcs-Browser: http://debian.tryton.org/gitweb/?p=packages/openoffice-python.git
Vcs-Git: git://debian.tryton.org/packages/openoffice-python.git
X-Python-Version: >= 2.4
commit 8e458709b8f3a0977db2f1717a6aab9de837112e
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Feb 24 15:06:41 2013 +0100
Releasing debian version 0.1+20110209-4.
diff --git a/debian/changelog b/debian/changelog
index 13c1ac3..090178b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+openoffice-python (1:0.1+20110209-4) experimental; urgency=low
+
+ * Removing obsolete Dm-Upload-Allowed
+ * Removing commas from file list for DEP5.
+ * Updating to Standards-Version: 3.9.4, no changes needed.
+ * Updating Vcs-Git to correct address.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Sun, 24 Feb 2013 14:24:12 +0100
+
openoffice-python (1:0.1+20110209-3) unstable; urgency=low
* Correcting email address in previous upload.
commit 21702c103aa051f59f0422b3270c9f416aa4eb01
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sat Feb 23 20:08:07 2013 +0100
Updating Vcs-Git to correct address.
diff --git a/debian/control b/debian/control
index cba186a..cd4171b 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
Standards-Version: 3.9.4
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://debian.tryton.org/gitweb/?p=packages/openoffice-python.git
-Vcs-Git: git://debian.tryton.org/git/packages/openoffice-python.git
+Vcs-Git: git://debian.tryton.org/packages/openoffice-python.git
X-Python-Version: >= 2.4
Package: python-openoffice
commit 0ee1fdfd4066df676ef3b547d40842c902ba6a9b
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Fri Feb 15 19:28:24 2013 +0100
Updating to Standards-Version: 3.9.4, no changes needed.
diff --git a/debian/control b/debian/control
index df2db26..cba186a 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at m9s.biz>
Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
-Standards-Version: 3.9.3
+Standards-Version: 3.9.4
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://debian.tryton.org/gitweb/?p=packages/openoffice-python.git
Vcs-Git: git://debian.tryton.org/git/packages/openoffice-python.git
commit e193eeffa56ee4c7bfadd65149a0d470ef53c1f2
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Feb 13 21:40:47 2013 +0100
Removing commas from file list for DEP5.
diff --git a/debian/copyright b/debian/copyright
index 4a82095..6ae490f 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -5,8 +5,8 @@ Copyright: 2008-2009 Hartmut Goebel <h.goebel at goebel-consult.de>
License: GPL-3+
Files:
- openoffice/dialogs.py, openoffice/ListenerProcAdapters.py,
- openoffice/config.py, sample-scripts/PrintToWriter.py
+ openoffice/dialogs.py openoffice/ListenerProcAdapters.py
+ openoffice/config.py sample-scripts/PrintToWriter.py
Copyright: 2003-2004 Danny Brewer <d29583 at groovegarden.com>
2008-2009 Hartmut Goebel <h.goebel at goebel-consult.de>
License: LGPL-2.1+
commit bdfad8ec140ea09f5ae3040b00561e369d6e9f71
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Feb 13 21:37:13 2013 +0100
Removing obsolete Dm-Upload-Allowed
diff --git a/debian/control b/debian/control
index 5da41b9..df2db26 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,6 @@ Section: python
Priority: optional
Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at m9s.biz>
-Dm-Upload-Allowed: yes
Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
Standards-Version: 3.9.3
Homepage: http://openoffice-python.origo.ethz.ch/
commit 916e1838e0e1d8f8f0eabfe70049e84ca861f4f7
Author: Daniel Baumann <daniel at debian.org>
Date: Tue Jul 10 23:23:51 2012 +0200
Releasing debian version 0.1+20110209-3.
diff --git a/debian/changelog b/debian/changelog
index 2796d52..13c1ac3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+openoffice-python (1:0.1+20110209-3) unstable; urgency=low
+
+ * Correcting email address in previous upload.
+
+ -- Daniel Baumann <daniel at debian.org> Tue, 10 Jul 2012 23:23:45 +0200
+
openoffice-python (1:0.1+20110209-2) unstable; urgency=low
[ Mathias Behrle ]
commit 23a608e8abe0323ecc7169d4093368894c308421
Author: Daniel Baumann <daniel at debian.org>
Date: Tue Jul 10 23:23:39 2012 +0200
Correcting email address in previous upload.
diff --git a/debian/changelog b/debian/changelog
index d59b75a..2796d52 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,7 +14,7 @@ openoffice-python (1:0.1+20110209-2) unstable; urgency=low
* Switching to xz compression.
* Correcting copyright file to match format version 1.0.
- -- Daniel Baumann <daniel at 127011.net> Sat, 30 Jun 2012 17:14:13 +0200
+ -- Daniel Baumann <daniel at debian.org> Sat, 30 Jun 2012 17:14:13 +0200
openoffice-python (1:0.1+20110209-1) unstable; urgency=low
commit 61123429d9236f76cbe4e455247e932d110a3f46
Author: Daniel Baumann <daniel at 127011.net>
Date: Sat Jun 30 17:14:19 2012 +0200
Releasing debian version 0.1+20110209-2.
diff --git a/debian/changelog b/debian/changelog
index 7596d01..d59b75a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,21 @@
+openoffice-python (1:0.1+20110209-2) unstable; urgency=low
+
+ [ Mathias Behrle ]
+ * Removing deprecated XB-Python-Version for dh_python2.
+ * Updating to Standards-Version: 3.9.3, no changes needed.
+ * Updating year in copyright.
+ * Adding myself to copyright.
+ * Adding Format header for DEP5.
+
+ [ Daniel Baumann ]
+ * Updating maintainers field.
+ * Updating vcs fields.
+ * Updating to debhelper version 9.
+ * Switching to xz compression.
+ * Correcting copyright file to match format version 1.0.
+
+ -- Daniel Baumann <daniel at 127011.net> Sat, 30 Jun 2012 17:14:13 +0200
+
openoffice-python (1:0.1+20110209-1) unstable; urgency=low
[ Mathias Behrle ]
commit 51aa89c1a96d5089c34a8a03a7ae54d62650a89d
Author: Daniel Baumann <daniel at 127011.net>
Date: Sat Jun 30 16:58:44 2012 +0200
Correcting copyright file to match format version 1.0.
diff --git a/debian/copyright b/debian/copyright
index a3acabc..4a82095 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,21 +1,19 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: *
-Copyright: (C) 2008-2009 Hartmut Goebel <h.goebel at goebel-consult.de>
+Copyright: 2008-2009 Hartmut Goebel <h.goebel at goebel-consult.de>
License: GPL-3+
Files:
openoffice/dialogs.py, openoffice/ListenerProcAdapters.py,
openoffice/config.py, sample-scripts/PrintToWriter.py
-Copyright:
- (C) 2003-2004 Danny Brewer <d29583 at groovegarden.com>
- (C) 2008-2009 Hartmut Goebel <h.goebel at goebel-consult.de>
+Copyright: 2003-2004 Danny Brewer <d29583 at groovegarden.com>
+ 2008-2009 Hartmut Goebel <h.goebel at goebel-consult.de>
License: LGPL-2.1+
Files: debian/*
-Copyright:
- (C) 2009-2012 Daniel Baumann <daniel at debian.org>
- (C) 2012 Mathias Behrle <mathiasb at m9s.biz>
+Copyright: 2009-2012 Daniel Baumann <daniel at debian.org>
+ 2012 Mathias Behrle <mathiasb at m9s.biz>
License: GPL-3+
License: GPL-3+
commit 08378d1cc72611ca7c65aed3b2b0d7318d9b654f
Author: Daniel Baumann <daniel at 127011.net>
Date: Sat Jun 30 16:58:41 2012 +0200
Switching to xz compression.
diff --git a/debian/rules b/debian/rules
index e32b791..1ae0776 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,3 +7,6 @@ override_dh_auto_clean:
dh_auto_clean
rm -rf *.egg-info
+
+override_dh_builddeb:
+ dh_builddeb -- -Zxz -z9
diff --git a/debian/source/options b/debian/source/options
index d053b65..22a4de9 100644
--- a/debian/source/options
+++ b/debian/source/options
@@ -1,2 +1,2 @@
-compression = gzip
+compression = xz
compression-level = 9
commit 886dcadca62a9bfc846920488857331fe7433acd
Author: Daniel Baumann <daniel at 127011.net>
Date: Sat Jun 30 16:58:28 2012 +0200
Updating to debhelper version 9.
diff --git a/debian/compat b/debian/compat
index 45a4fb7..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-8
+9
diff --git a/debian/control b/debian/control
index 642d747..5da41b9 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at m9s.biz>
Dm-Upload-Allowed: yes
-Build-Depends: debhelper (>= 8), python (>= 2.6.6-3~), python-setuptools
+Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
Standards-Version: 3.9.3
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://debian.tryton.org/gitweb/?p=packages/openoffice-python.git
commit 7d42855fc228aa3c0ac933777457efadcbd74c6f
Author: Daniel Baumann <daniel at 127011.net>
Date: Sat Jun 30 16:55:07 2012 +0200
Updating vcs fields.
diff --git a/debian/control b/debian/control
index b284f57..642d747 100644
--- a/debian/control
+++ b/debian/control
@@ -7,8 +7,8 @@ Dm-Upload-Allowed: yes
Build-Depends: debhelper (>= 8), python (>= 2.6.6-3~), python-setuptools
Standards-Version: 3.9.3
Homepage: http://openoffice-python.origo.ethz.ch/
-Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
-Vcs-Git: git://git.debian-maintainers.org/git/tryton/openoffice-python.git
+Vcs-Browser: http://debian.tryton.org/gitweb/?p=packages/openoffice-python.git
+Vcs-Git: git://debian.tryton.org/git/packages/openoffice-python.git
X-Python-Version: >= 2.4
Package: python-openoffice
commit 1dd3d0bdda2c4cb5e1e6107b88aa27b69f6c8218
Author: Daniel Baumann <daniel at 127011.net>
Date: Sat Jun 30 16:47:48 2012 +0200
Updating maintainers field.
diff --git a/debian/control b/debian/control
index 019537a..b284f57 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,7 @@
Source: openoffice-python
Section: python
Priority: optional
-Maintainer: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
+Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at m9s.biz>
Dm-Upload-Allowed: yes
Build-Depends: debhelper (>= 8), python (>= 2.6.6-3~), python-setuptools
commit e94e26c372d5d318b1d855ca0e01eb94a508597d
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Mar 25 15:28:17 2012 +0200
Adding Format header for DEP5.
diff --git a/debian/copyright b/debian/copyright
index 6caf5bb..a3acabc 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,3 +1,5 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+
Files: *
Copyright: (C) 2008-2009 Hartmut Goebel <h.goebel at goebel-consult.de>
License: GPL-3+
commit 50630ea28f464706a5dc71a0ef28425be76005b4
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Fri Feb 24 14:09:11 2012 +0100
Adding myself to copyright.
diff --git a/debian/copyright b/debian/copyright
index dd4a3f2..6caf5bb 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -11,7 +11,9 @@ Copyright:
License: LGPL-2.1+
Files: debian/*
-Copyright: (C) 2009-2012 Daniel Baumann <daniel at debian.org>
+Copyright:
+ (C) 2009-2012 Daniel Baumann <daniel at debian.org>
+ (C) 2012 Mathias Behrle <mathiasb at m9s.biz>
License: GPL-3+
License: GPL-3+
commit 498d49675c06f25ca67e5e902d2b6952072efa88
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Fri Feb 24 14:01:03 2012 +0100
Updating year in copyright.
diff --git a/debian/copyright b/debian/copyright
index 423367d..dd4a3f2 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -11,7 +11,7 @@ Copyright:
License: LGPL-2.1+
Files: debian/*
-Copyright: (C) 2009-2011 Daniel Baumann <daniel at debian.org>
+Copyright: (C) 2009-2012 Daniel Baumann <daniel at debian.org>
License: GPL-3+
License: GPL-3+
commit 20517d9f2694527813f6907fdc918d4eb21bbfe8
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Fri Feb 24 13:47:00 2012 +0100
Updating to Standards-Version: 3.9.3, no changes needed.
diff --git a/debian/control b/debian/control
index 30cc842..019537a 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at m9s.biz>
Dm-Upload-Allowed: yes
Build-Depends: debhelper (>= 8), python (>= 2.6.6-3~), python-setuptools
-Standards-Version: 3.9.2
+Standards-Version: 3.9.3
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
Vcs-Git: git://git.debian-maintainers.org/git/tryton/openoffice-python.git
commit 317a6eadf88d6e4958a83112c57660a1fc36fccb
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Fri Jul 22 12:26:53 2011 +0200
Removing deprecated XB-Python-Version for dh_python2.
diff --git a/debian/control b/debian/control
index d5b0ef3..30cc842 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,6 @@ Package: python-openoffice
Architecture: all
Depends: ${misc:Depends}, ${python:Depends}, python-pkg-resources
Recommends: python-uno
-XB-Python-Version: ${python:Versions}
Description: Python libraries for interacting with OpenOffice.org/LibreOffice
This is a Python module to interact with OpenOffice.org/LibreOffice.
It aims to support:
commit be99ddccd1417d01d5399d8c8962e6be5c6544e8
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Jul 17 19:50:15 2011 +0200
Releasing debian version 0.1+20110209-1.
diff --git a/debian/changelog b/debian/changelog
index a1b23f8..7596d01 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,21 @@
+openoffice-python (1:0.1+20110209-1) unstable; urgency=low
+
+ [ Mathias Behrle ]
+ * Updating to standards version 3.9.2.
+
+ [ Daniel Baumann ]
+ * Not wrapping uploaders field, it does not exceed 80 chars.
+ * Compacting copyright file.
+ * Moving to source format 3.0 (quilt).
+ * Rediffing and renaming libreoffice path patch.
+ * Merging upstream version 0.1+20110209.
+ * Removing add-libreoffice-path.patch, included upstream.
+
+ [ Mathias Behrle ]
+ * Moving from deprecated python-support to dh_python2.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Sun, 17 Jul 2011 19:49:12 +0200
+
openoffice-python (1:0.1+20110129-1) unstable; urgency=low
* Changing my email address.
commit 9c8c358d50d8e10c22c8809dc29e39e22627865e
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Jul 17 18:24:56 2011 +0200
Moving from deprecated python-support to dh_python2.
diff --git a/debian/control b/debian/control
index 87e77d7..d5b0ef3 100644
--- a/debian/control
+++ b/debian/control
@@ -4,11 +4,12 @@ Priority: optional
Maintainer: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at m9s.biz>
Dm-Upload-Allowed: yes
-Build-Depends: debhelper (>= 8), python, python-setuptools, python-support
+Build-Depends: debhelper (>= 8), python (>= 2.6.6-3~), python-setuptools
Standards-Version: 3.9.2
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
Vcs-Git: git://git.debian-maintainers.org/git/tryton/openoffice-python.git
+X-Python-Version: >= 2.4
Package: python-openoffice
Architecture: all
diff --git a/debian/pycompat b/debian/pycompat
deleted file mode 100644
index 0cfbf08..0000000
--- a/debian/pycompat
+++ /dev/null
@@ -1 +0,0 @@
-2
diff --git a/debian/pyversions b/debian/pyversions
deleted file mode 100644
index 8b253bc..0000000
--- a/debian/pyversions
+++ /dev/null
@@ -1 +0,0 @@
-2.4-
diff --git a/debian/rules b/debian/rules
index 000210b..e32b791 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,4 +1,9 @@
#!/usr/bin/make -f
%:
- dh ${@}
+ dh ${@} --with python2
+
+override_dh_auto_clean:
+ dh_auto_clean
+
+ rm -rf *.egg-info
commit b865c1b55aaa4bb8d28688b78bd085babd999cea
Author: Daniel Baumann <daniel at debian.org>
Date: Sun Jul 10 15:35:21 2011 +0200
Removing add-libreoffice-path.patch, included upstream.
diff --git a/debian/patches/01-add-libreoffice-path.patch b/debian/patches/01-add-libreoffice-path.patch
deleted file mode 100644
index ec98cfd..0000000
--- a/debian/patches/01-add-libreoffice-path.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Author: Mathias Behrle <mathiasb at m9s.biz>
-Description: Adding the path of libreoffice as in current experimental packages.
-
-diff -Naurp openoffice-python.orig/openoffice/officehelper.py openoffice-python/openoffice/officehelper.py
---- openoffice-python.orig/openoffice/officehelper.py 2011-07-10 14:37:25.869136719 +0200
-+++ openoffice-python/openoffice/officehelper.py 2011-07-10 14:49:51.781136593 +0200
-@@ -67,6 +67,7 @@ def _build_cmd_args(connectString, unacc
- return __soffice_executable
- for p in [os.path.dirname(uno.__file__),
- '/opt/libreoffice/program',
-+ '/usr/lib/libreoffice/program',
- '/usr/lib/openoffice/program',
- '/usr/lib/ooo/program',
- '/usr/bin',
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index d5601fe..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-01-add-libreoffice-path.patch
commit de86013329364550312f7d99d8266bec94cbadde
Author: Daniel Baumann <daniel at debian.org>
Date: Sun Jul 10 15:34:57 2011 +0200
Merging upstream version 0.1+20110209.
diff --git a/PKG-INFO b/PKG-INFO
index 73447b0..41ad18d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: openoffice-python
-Version: 0.1-20110129
+Version: 0.1-20110209
Summary: Enhanced Python interfaces to OpenOffice.org
Home-page: http://openoffice-python.origo.ethz.ch/
Author: Hartmut Goebel
diff --git a/openoffice/officehelper.py b/openoffice/officehelper.py
index 26b4f72..a4bd254 100644
--- a/openoffice/officehelper.py
+++ b/openoffice/officehelper.py
@@ -67,6 +67,7 @@ def _build_cmd_args(connectString, unaccept=False):
return __soffice_executable
for p in [os.path.dirname(uno.__file__),
'/opt/libreoffice/program',
+ '/usr/lib/libreoffice/program',
'/usr/lib/openoffice/program',
'/usr/lib/ooo/program',
'/usr/bin',
diff --git a/openoffice_python.egg-info/PKG-INFO b/openoffice_python.egg-info/PKG-INFO
index 73447b0..41ad18d 100644
--- a/openoffice_python.egg-info/PKG-INFO
+++ b/openoffice_python.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: openoffice-python
-Version: 0.1-20110129
+Version: 0.1-20110209
Summary: Enhanced Python interfaces to OpenOffice.org
Home-page: http://openoffice-python.origo.ethz.ch/
Author: Hartmut Goebel
diff --git a/setup.cfg b/setup.cfg
index 8ef0fea..a9ba4bd 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -6,7 +6,7 @@ doc_files = README
formats = bztar
[egg_info]
-tag_build = -20110129
+tag_build = -20110209
tag_date = 0
tag_svn_revision = 0
commit ebeab75c76691463cb59372b6186f78f18711aa6
Author: Daniel Baumann <daniel at debian.org>
Date: Sun Jul 10 14:52:34 2011 +0200
Rediffing and renaming libreoffice path patch.
diff --git a/debian/patches/01-add-libreoffice-path.patch b/debian/patches/01-add-libreoffice-path.patch
new file mode 100644
index 0000000..ec98cfd
--- /dev/null
+++ b/debian/patches/01-add-libreoffice-path.patch
@@ -0,0 +1,14 @@
+Author: Mathias Behrle <mathiasb at m9s.biz>
+Description: Adding the path of libreoffice as in current experimental packages.
+
+diff -Naurp openoffice-python.orig/openoffice/officehelper.py openoffice-python/openoffice/officehelper.py
+--- openoffice-python.orig/openoffice/officehelper.py 2011-07-10 14:37:25.869136719 +0200
++++ openoffice-python/openoffice/officehelper.py 2011-07-10 14:49:51.781136593 +0200
+@@ -67,6 +67,7 @@ def _build_cmd_args(connectString, unacc
+ return __soffice_executable
+ for p in [os.path.dirname(uno.__file__),
+ '/opt/libreoffice/program',
++ '/usr/lib/libreoffice/program',
+ '/usr/lib/openoffice/program',
+ '/usr/lib/ooo/program',
+ '/usr/bin',
diff --git a/debian/patches/add_debian_libreoffice_path.patch b/debian/patches/add_debian_libreoffice_path.patch
deleted file mode 100644
index 1d37af1..0000000
--- a/debian/patches/add_debian_libreoffice_path.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-Adding the path of libreoffice as in current experimental packages.--- a/openoffice/officehelper.py
-+++ b/openoffice/officehelper.py
-@@ -67,6 +67,7 @@
- return __soffice_executable
- for p in [os.path.dirname(uno.__file__),
- '/opt/libreoffice/program',
-+ '/usr/lib/libreoffice/program',
- '/usr/lib/openoffice/program',
- '/usr/lib/ooo/program',
- '/usr/bin',
diff --git a/debian/patches/series b/debian/patches/series
index be6299c..d5601fe 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-add_debian_libreoffice_path.patch
+01-add-libreoffice-path.patch
commit 0b4e2d0c8536f15bbcb8e35aa99f6e7b1d9147ca
Author: Daniel Baumann <daniel at debian.org>
Date: Sun Jul 10 14:49:33 2011 +0200
Moving to source format 3.0 (quilt).
diff --git a/debian/README.source b/debian/README.source
deleted file mode 100644
index 18b6b24..0000000
--- a/debian/README.source
+++ /dev/null
@@ -1,37 +0,0 @@
-Package Repositories
---------------------
-
-Backports for the current stable debian distribution as well as snapshots of
-unreleased versions may be available in repositories listed on the maintainers
-homepage. The current URL of the maintainer homepage can be seen in
-debian/copyright.
-
-
-Source Access
--------------
-
-You can obtain the sources of this package with:
-
- $ apt-get source ${PACKAGE}
-
-whereas '${PACKAGE}' has to be replaced with the actual name of the package.
-
-This package is maintained with the Git version control system. The current git
-source tree can be obtained with:
-
- $ git clone ${GIT_URI}
-
-whereas '${GIT_URI}' has to be replaced with the actual URI for the Git
-repository. The current Git URI can be seen in debian/control in the extracted
-package sources.
-
-More information about Git can be found in the git-core package.
-
-This package may use the Quilt patch system to manage all modifications to the
-upstream source. Changes, if any, are stored in the source package as diffs in
-debian/diff and are applied during the build. Current modifications can be
-applied to the source tree with:
-
- $ QUILT_PATCHES=debian/patches quilt push -a
-
-More information about Quilt can be found in the quilt package.
diff --git a/debian/source/options b/debian/source/options
new file mode 100644
index 0000000..d053b65
--- /dev/null
+++ b/debian/source/options
@@ -0,0 +1,2 @@
+compression = gzip
+compression-level = 9
commit 9367bdc570d808bcd68c3e7f39d797328091724a
Author: Daniel Baumann <daniel at debian.org>
Date: Sun Jul 10 14:49:03 2011 +0200
Compacting copyright file.
diff --git a/debian/copyright b/debian/copyright
index 0ab3d8a..423367d 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,11 +1,20 @@
-Upstream-Contact: Hartmut Goebel <h.goebel at goebel-consult.de>
-Upstream-Homepage: http://openoffice-python.origo.ethz.ch/download
-Maintainer-Contact: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
-Maintainer-Homepage: http://tryton.debian-maintainers.org/
-
Files: *
Copyright: (C) 2008-2009 Hartmut Goebel <h.goebel at goebel-consult.de>
License: GPL-3+
+
+Files:
+ openoffice/dialogs.py, openoffice/ListenerProcAdapters.py,
+ openoffice/config.py, sample-scripts/PrintToWriter.py
+Copyright:
+ (C) 2003-2004 Danny Brewer <d29583 at groovegarden.com>
+ (C) 2008-2009 Hartmut Goebel <h.goebel at goebel-consult.de>
+License: LGPL-2.1+
+
+Files: debian/*
+Copyright: (C) 2009-2011 Daniel Baumann <daniel at debian.org>
+License: GPL-3+
+
+License: GPL-3+
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, either version 3 of the License, or
@@ -19,15 +28,9 @@ License: GPL-3+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
- On Debian systems, the complete text of the GNU General Public License
+ The complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-3 file.
-Files:
- openoffice/dialogs.py, openoffice/ListenerProcAdapters.py,
- openoffice/config.py, sample-scripts/PrintToWriter.py
-Copyright:
- (C) 2003-2004 Danny Brewer <d29583 at groovegarden.com>
- (C) 2008-2009 Hartmut Goebel <h.goebel at goebel-consult.de>
License: LGPL-2.1+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -43,24 +46,5 @@ License: LGPL-2.1+
License along with this library; if not, write to the Free
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.
- On Debian systems, the complete text of the GNU Library General Public License
+ The complete text of the GNU Library General Public License
can be found in /usr/share/common-licenses/LGPL-2.1 file.
-
-Files: debian/*
-Copyright: (C) 2009-2011 Daniel Baumann <daniel at debian.org>
-License: GPL-3+
- 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, either version 3 of the License, or
- (at your option) any later version.
- .
- 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, see <http://www.gnu.org/licenses/>.
- .
- On Debian systems, the complete text of the GNU General Public License
- can be found in /usr/share/common-licenses/GPL-3 file.
commit add8d9010d67760b904b95053a144fa81ad8853e
Author: Daniel Baumann <daniel at debian.org>
Date: Sun Jul 10 14:47:11 2011 +0200
Not wrapping uploaders field, it does not exceed 80 chars.
diff --git a/debian/control b/debian/control
index 5204044..87e77d7 100644
--- a/debian/control
+++ b/debian/control
@@ -2,9 +2,7 @@ Source: openoffice-python
Section: python
Priority: optional
Maintainer: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
-Uploaders:
- Daniel Baumann <daniel at debian.org>,
- Mathias Behrle <mathiasb at m9s.biz>
+Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at m9s.biz>
Dm-Upload-Allowed: yes
Build-Depends: debhelper (>= 8), python, python-setuptools, python-support
Standards-Version: 3.9.2
commit c8b08ce305fde49c9e2902f3da62660cf742e7f3
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Apr 26 21:08:51 2011 +0200
Updating to standards version 3.9.2.
diff --git a/debian/control b/debian/control
index 0a70beb..5204044 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Uploaders:
Mathias Behrle <mathiasb at m9s.biz>
Dm-Upload-Allowed: yes
Build-Depends: debhelper (>= 8), python, python-setuptools, python-support
-Standards-Version: 3.9.1
+Standards-Version: 3.9.2
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
Vcs-Git: git://git.debian-maintainers.org/git/tryton/openoffice-python.git
commit 3c8a27b09bcc614340779656e2fe1ef3b382d689
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Feb 6 19:51:00 2011 +0100
Releasing debian version 0.1+20110129-1.
diff --git a/debian/changelog b/debian/changelog
index d789018..a1b23f8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+openoffice-python (1:0.1+20110129-1) unstable; urgency=low
+
+ * Changing my email address.
+ * Merging upstream version 0.1+20110129.
+ * Updating Copyright.
+ * Updating package description.
+ * Adding patch to include debian path to libreoffice binaries.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Sun, 06 Feb 2011 19:49:26 +0100
+
openoffice-python (0.1+r34-7) experimental; urgency=low
* Updating standards version to 3.9.0.
commit 3f99d90621f402708641120195a21cb92a060d81
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Feb 6 19:47:19 2011 +0100
Adding patch to include debian path to libreoffice binaries.
diff --git a/debian/patches/add_debian_libreoffice_path.patch b/debian/patches/add_debian_libreoffice_path.patch
new file mode 100644
index 0000000..1d37af1
--- /dev/null
+++ b/debian/patches/add_debian_libreoffice_path.patch
@@ -0,0 +1,10 @@
+Adding the path of libreoffice as in current experimental packages.--- a/openoffice/officehelper.py
++++ b/openoffice/officehelper.py
+@@ -67,6 +67,7 @@
+ return __soffice_executable
+ for p in [os.path.dirname(uno.__file__),
+ '/opt/libreoffice/program',
++ '/usr/lib/libreoffice/program',
+ '/usr/lib/openoffice/program',
+ '/usr/lib/ooo/program',
+ '/usr/bin',
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..be6299c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+add_debian_libreoffice_path.patch
commit 3e89579804565a91afe674654f4b3ff54844caa9
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Feb 6 14:43:26 2011 +0100
Updating package description.
diff --git a/debian/control b/debian/control
index 717bd46..0a70beb 100644
--- a/debian/control
+++ b/debian/control
@@ -17,8 +17,9 @@ Architecture: all
Depends: ${misc:Depends}, ${python:Depends}, python-pkg-resources
Recommends: python-uno
XB-Python-Version: ${python:Versions}
-Description: Python libraries for interacting with OpenOffice.org
- This is a Python module to interact with OpenOffice.org. It aims to support:
+Description: Python libraries for interacting with OpenOffice.org/LibreOffice
+ This is a Python module to interact with OpenOffice.org/LibreOffice.
+ It aims to support:
.
* users writing complex macros for OpenOffice in Python
* developers interacting with OpenOffice from outside (eg. use OpenOffice to
commit bdc97a42f004a37049b4de992069d6c95c7137f1
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Feb 6 14:40:22 2011 +0100
Updating Copyright.
diff --git a/debian/copyright b/debian/copyright
index 7f9089d..0ab3d8a 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -47,7 +47,7 @@ License: LGPL-2.1+
can be found in /usr/share/common-licenses/LGPL-2.1 file.
Files: debian/*
-Copyright: (C) 2009-2010 Daniel Baumann <daniel at debian.org>
+Copyright: (C) 2009-2011 Daniel Baumann <daniel at debian.org>
License: GPL-3+
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
commit 3a914dad17cc89aa5542bba7f2a1a024f7c48715
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Feb 6 14:27:41 2011 +0100
Merging upstream version 0.1+20110129.
diff --git a/PKG-INFO b/PKG-INFO
index 3af3e35..73447b0 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,15 +1,42 @@
Metadata-Version: 1.1
Name: openoffice-python
-Version: 0.1-r34-20090228
+Version: 0.1-20110129
Summary: Enhanced Python interfaces to OpenOffice.org
Home-page: http://openoffice-python.origo.ethz.ch/
Author: Hartmut Goebel
Author-email: h.goebel at goebel-consult.de
License: GPLv3
Download-URL: http://openoffice-python.origo.ethz.ch/download
-Description: UNKNOWN
+Description: =========================
+ openoffice-python
+ =========================
+ ------------------------------------------------------------
+ Python libraries for interacting with OpenOffice.org
+ ------------------------------------------------------------
+
+ Homepage: http://openoffice-python.origo.ethz.ch/
+
+ Aim of this project is to support
+
+ * users writing complex macros for OpenOffice in Python
+
+ * developers interacting with OpenOffice from outside (eg. use
+ OpenOffice to print a file)
+
+ The library is designed to supports both writing macros (called by
+ OOo) and interacting with OOo from an external Python programm (using
+ the UNO bridge).
+
+ The "UNO bridge" side is meant to implement a more Pythonic and
+ high-level interface than Danny Bewers OOoLib. While the "Macro" side
+ is meant to support writing macros. Well, there will be a big
+ intersection between these parts :-)
+
+ For more information, eg. related projects, please visit
+ <http://openoffice-python.origo.ethz.ch/>.
+
Platform: POSIX
-Classifier: Development Status :: 3 - Beta
+Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Operating System :: POSIX
diff --git a/openoffice/officehelper.py b/openoffice/officehelper.py
index 2725224..26b4f72 100644
--- a/openoffice/officehelper.py
+++ b/openoffice/officehelper.py
@@ -66,7 +66,9 @@ def _build_cmd_args(connectString, unaccept=False):
if __soffice_executable:
return __soffice_executable
for p in [os.path.dirname(uno.__file__),
+ '/opt/libreoffice/program',
'/usr/lib/openoffice/program',
+ '/usr/lib/ooo/program',
'/usr/bin',
'/usr/local/bin',
]:
@@ -74,6 +76,7 @@ def _build_cmd_args(connectString, unaccept=False):
if os.path.exists(office):
break
else:
+ import glob
pathes = glob.glob('/usr/lib/ooo-[234].*/program/soffice')
if not pathes:
raise BootstrapExceptions('soffice executable not found')
diff --git a/openoffice_python.egg-info/PKG-INFO b/openoffice_python.egg-info/PKG-INFO
index 3af3e35..73447b0 100644
--- a/openoffice_python.egg-info/PKG-INFO
+++ b/openoffice_python.egg-info/PKG-INFO
@@ -1,15 +1,42 @@
Metadata-Version: 1.1
Name: openoffice-python
-Version: 0.1-r34-20090228
+Version: 0.1-20110129
Summary: Enhanced Python interfaces to OpenOffice.org
Home-page: http://openoffice-python.origo.ethz.ch/
Author: Hartmut Goebel
Author-email: h.goebel at goebel-consult.de
License: GPLv3
Download-URL: http://openoffice-python.origo.ethz.ch/download
-Description: UNKNOWN
+Description: =========================
+ openoffice-python
+ =========================
+ ------------------------------------------------------------
+ Python libraries for interacting with OpenOffice.org
+ ------------------------------------------------------------
+
+ Homepage: http://openoffice-python.origo.ethz.ch/
+
+ Aim of this project is to support
+
+ * users writing complex macros for OpenOffice in Python
+
+ * developers interacting with OpenOffice from outside (eg. use
+ OpenOffice to print a file)
+
+ The library is designed to supports both writing macros (called by
+ OOo) and interacting with OOo from an external Python programm (using
+ the UNO bridge).
+
+ The "UNO bridge" side is meant to implement a more Pythonic and
+ high-level interface than Danny Bewers OOoLib. While the "Macro" side
+ is meant to support writing macros. Well, there will be a big
+ intersection between these parts :-)
+
+ For more information, eg. related projects, please visit
+ <http://openoffice-python.origo.ethz.ch/>.
+
Platform: POSIX
-Classifier: Development Status :: 3 - Beta
+Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Operating System :: POSIX
diff --git a/setup.cfg b/setup.cfg
index f79f6f6..8ef0fea 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -6,12 +6,12 @@ doc_files = README
formats = bztar
[egg_info]
-tag_build = -r34-20090228
+tag_build = -20110129
tag_date = 0
tag_svn_revision = 0
[aliases]
release = egg_info sdist bdist_egg bdist_msi register
-daily = egg_info --tag-date --tag-svn-revision sdist bdist_egg
+snapshot = egg_info --tag-date sdist bdist_egg register
devel = develop --install-dir ~/lib/python/ --script-dir ~/bin
diff --git a/setup.py b/setup.py
index de741d7..5a5c7c7 100644
--- a/setup.py
+++ b/setup.py
@@ -16,6 +16,7 @@ if version < '2.2.3':
setup(
name='openoffice-python',
description='Enhanced Python interfaces to OpenOffice.org',
+ long_description= open("README").read(),
packages=['openoffice'],
version='0.1',
author='Hartmut Goebel',
@@ -25,7 +26,7 @@ setup(
platforms=['POSIX'],
license='GPLv3',
classifiers=[
- 'Development Status :: 3 - Beta',
+ 'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: POSIX',
commit 94da65aff1db9051411e3989baf13acf8af5883f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sat Nov 20 11:48:50 2010 +0100
Changing my email address.
diff --git a/debian/control b/debian/control
index 21a4b7e..717bd46 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
Uploaders:
Daniel Baumann <daniel at debian.org>,
- Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
+ Mathias Behrle <mathiasb at m9s.biz>
Dm-Upload-Allowed: yes
Build-Depends: debhelper (>= 8), python, python-setuptools, python-support
Standards-Version: 3.9.1
commit 53146a716588eeb19e85f399da0d01d217167271
Author: Daniel Baumann <daniel at debian.org>
Date: Fri Nov 12 14:15:32 2010 +0100
Releasing debian version 0.1+r34-7.
diff --git a/debian/changelog b/debian/changelog
index 205b513..d789018 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+openoffice-python (0.1+r34-7) experimental; urgency=low
+
+ * Updating standards version to 3.9.0.
+ * Updating to debhelper version 8.
+ * Updating to standards version 3.9.1.
+ * Switching to source format 3.0 (quilt).
+
+ -- Daniel Baumann <daniel at debian.org> Fri, 12 Nov 2010 14:15:24 +0100
+
openoffice-python (0.1+r34-6) unstable; urgency=low
* Adding Dm-Upload-Allowed in control in preparation for Mathias.
commit b1172c797c3614f7e1befe35385eab3bb3ac2887
Author: Daniel Baumann <daniel at debian.org>
Date: Tue Nov 2 14:23:21 2010 +0100
Switching to source format 3.0 (quilt).
diff --git a/debian/source/format b/debian/source/format
index d3827e7..163aaf8 100644
--- a/debian/source/format
+++ b/debian/source/format
@@ -1 +1 @@
-1.0
+3.0 (quilt)
commit 6219dc33531d168d1556f61cb046ba24e11ce73c
Author: Daniel Baumann <daniel at debian.org>
Date: Thu Sep 30 01:04:54 2010 +0200
Updating to standards version 3.9.1.
diff --git a/debian/control b/debian/control
index 5c225b9..21a4b7e 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Uploaders:
Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
Dm-Upload-Allowed: yes
Build-Depends: debhelper (>= 8), python, python-setuptools, python-support
-Standards-Version: 3.9.0
+Standards-Version: 3.9.1
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
Vcs-Git: git://git.debian-maintainers.org/git/tryton/openoffice-python.git
commit 48fea8434b8b61de834a50eaff38b29d3de63ae2
Author: Daniel Baumann <daniel at debian.org>
Date: Thu Sep 30 01:04:04 2010 +0200
Updating to debhelper version 8.
diff --git a/debian/compat b/debian/compat
index 7f8f011..45a4fb7 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+8
diff --git a/debian/control b/debian/control
index b81a803..5c225b9 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Uploaders:
Daniel Baumann <daniel at debian.org>,
Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
Dm-Upload-Allowed: yes
-Build-Depends: debhelper (>= 7), python, python-setuptools, python-support
+Build-Depends: debhelper (>= 8), python, python-setuptools, python-support
Standards-Version: 3.9.0
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
commit 3105f27cba34dbbb73eab34915d2e5cdf18d3c61
Author: Daniel Baumann <daniel at debian.org>
Date: Mon Jun 28 20:35:28 2010 +0200
Updating standards version to 3.9.0.
diff --git a/debian/control b/debian/control
index 6f42663..b81a803 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Uploaders:
Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
Dm-Upload-Allowed: yes
Build-Depends: debhelper (>= 7), python, python-setuptools, python-support
-Standards-Version: 3.8.4
+Standards-Version: 3.9.0
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
Vcs-Git: git://git.debian-maintainers.org/git/tryton/openoffice-python.git
commit 68ad11d8dbdb164d732cd661b7abde883b34daba
Author: Daniel Baumann <daniel at debian.org>
Date: Thu May 13 22:17:05 2010 +0200
Releasing debian version 0.1+r34-6.
diff --git a/debian/changelog b/debian/changelog
index 032bbe7..205b513 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+openoffice-python (0.1+r34-6) unstable; urgency=low
+
+ * Adding Dm-Upload-Allowed in control in preparation for Mathias.
+
+ -- Daniel Baumann <daniel at debian.org> Thu, 13 May 2010 22:17:03 +0200
+
openoffice-python (0.1+r34-5) unstable; urgency=low
* Adding explicit debian source version 1.0 until switch to 3.0.
commit cf65316d6852a520dcf674e0b6cf35a6c95f8944
Author: Daniel Baumann <daniel at debian.org>
Date: Fri Apr 9 14:31:32 2010 +0200
Adding Dm-Upload-Allowed in control in preparation for Mathias.
diff --git a/debian/control b/debian/control
index c541c10..6f42663 100644
--- a/debian/control
+++ b/debian/control
@@ -5,6 +5,7 @@ Maintainer: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
Uploaders:
Daniel Baumann <daniel at debian.org>,
Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
+Dm-Upload-Allowed: yes
Build-Depends: debhelper (>= 7), python, python-setuptools, python-support
Standards-Version: 3.8.4
Homepage: http://openoffice-python.origo.ethz.ch/
commit 9eeeed7a9107ba232a7da595d6f5c843463c9f6b
Author: Daniel Baumann <daniel at debian.org>
Date: Sat Feb 20 09:33:26 2010 +0100
Releasing debian version 0.1+r34-5.
diff --git a/debian/changelog b/debian/changelog
index 66d16b9..032bbe7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+openoffice-python (0.1+r34-5) unstable; urgency=low
+
+ * Adding explicit debian source version 1.0 until switch to 3.0.
+ * Updating year in copyright file.
+ * Removing unneeded python-all-dev from build-depends.
+ * Updating to standards 3.8.4.
+ * Updating README.source.
+
+ -- Daniel Baumann <daniel at debian.org> Sat, 20 Feb 2010 09:33:17 +0100
+
openoffice-python (0.1+r34-4) unstable; urgency=low
[ Mathias Behrle ]
commit 5689923b866eb9944fb3d3209eeab58092b7e73e
Author: Daniel Baumann <daniel at debian.org>
Date: Sat Feb 20 09:32:39 2010 +0100
Updating README.source.
diff --git a/debian/README.source b/debian/README.source
index dcc7ba3..18b6b24 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -32,6 +32,6 @@ upstream source. Changes, if any, are stored in the source package as diffs in
debian/diff and are applied during the build. Current modifications can be
applied to the source tree with:
- $ quilt push -a
+ $ QUILT_PATCHES=debian/patches quilt push -a
More information about Quilt can be found in the quilt package.
commit c18d23eef52e92a3ffb642b6dedb5c4715383d77
Author: Daniel Baumann <daniel at debian.org>
Date: Thu Jan 28 07:53:20 2010 +0100
Updating to standards 3.8.4.
diff --git a/debian/control b/debian/control
index 8c05746..c541c10 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Uploaders:
Daniel Baumann <daniel at debian.org>,
Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
Build-Depends: debhelper (>= 7), python, python-setuptools, python-support
-Standards-Version: 3.8.3
+Standards-Version: 3.8.4
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
Vcs-Git: git://git.debian-maintainers.org/git/tryton/openoffice-python.git
commit 3d116dd356fdd2da8b808dcd2c1df73af29a9b3f
Author: Daniel Baumann <daniel at debian.org>
Date: Mon Jan 25 10:12:02 2010 +0100
Removing unneeded python-all-dev from build-depends.
diff --git a/debian/control b/debian/control
index ac7bfe2..8c05746 100644
--- a/debian/control
+++ b/debian/control
@@ -5,8 +5,7 @@ Maintainer: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
Uploaders:
Daniel Baumann <daniel at debian.org>,
Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
-Build-Depends:
- debhelper (>= 7), python, python-all-dev, python-setuptools, python-support
+Build-Depends: debhelper (>= 7), python, python-setuptools, python-support
Standards-Version: 3.8.3
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
commit 6dcfca12b490065cae0c7411697bb8e963ace08e
Author: Daniel Baumann <daniel at debian.org>
Date: Sat Jan 2 11:34:47 2010 +0100
Updating year in copyright file.
diff --git a/debian/copyright b/debian/copyright
index ef84f18..7f9089d 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -47,7 +47,7 @@ License: LGPL-2.1+
can be found in /usr/share/common-licenses/LGPL-2.1 file.
Files: debian/*
-Copyright: (C) 2009 Daniel Baumann <daniel at debian.org>
+Copyright: (C) 2009-2010 Daniel Baumann <daniel at debian.org>
License: GPL-3+
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
commit 8860c97fb5ef4012e01c56baa941ac6db4b71a33
Author: Daniel Baumann <daniel at debian.org>
Date: Sat Dec 12 10:06:04 2009 +0100
Adding explicit debian source version 1.0 until switch to 3.0.
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..d3827e7
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+1.0
commit cc14008052a2f3e9e757c32948346d254932720b
Author: Daniel Baumann <daniel at debian.org>
Date: Sat Sep 5 09:34:58 2009 +0200
Releasing debian version 0.1+r34-4.
diff --git a/debian/changelog b/debian/changelog
index 98e79e7..66d16b9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+openoffice-python (0.1+r34-4) unstable; urgency=low
+
+ [ Mathias Behrle ]
+ * Correcting spelling errors in package long-description.
+
+ [ Daniel Baumann ]
+ * Updating to standards version 3.8.3.
+ * Adding maintainer homepage field to control.
+ * Adding README.source.
+ * Moving maintainer homepage field to copyright.
+ * Updating README.source.
+
+ -- Daniel Baumann <daniel at debian.org> Sat, 05 Sep 2009 09:34:47 +0200
+
openoffice-python (0.1+r34-3) unstable; urgency=low
* Updating maintainer field.
commit bc5bed7089c14b34d630f4d7e96cfc01945b51b1
Author: Daniel Baumann <daniel at debian.org>
Date: Sat Sep 5 09:31:18 2009 +0200
Updating README.source.
diff --git a/debian/README.source b/debian/README.source
index 259f923..dcc7ba3 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -4,7 +4,7 @@ Package Repositories
Backports for the current stable debian distribution as well as snapshots of
unreleased versions may be available in repositories listed on the maintainers
homepage. The current URL of the maintainer homepage can be seen in
-debian/control.
+debian/copyright.
Source Access
commit 457bcc1770251f8371b494219f270601d43ace4b
Author: Daniel Baumann <daniel at debian.org>
Date: Sat Sep 5 08:46:37 2009 +0200
Moving maintainer homepage field to copyright.
diff --git a/debian/control b/debian/control
index 4385c6f..ac7bfe2 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,6 @@ Standards-Version: 3.8.3
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
Vcs-Git: git://git.debian-maintainers.org/git/tryton/openoffice-python.git
-XSBC-Maintainer-Homepage: http://tryton.debian-maintainers.org/
Package: python-openoffice
Architecture: all
diff --git a/debian/copyright b/debian/copyright
index 72a2e92..ef84f18 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,5 +1,7 @@
-Author: Hartmut Goebel <h.goebel at goebel-consult.de>
-Download: http://openoffice-python.origo.ethz.ch/download
+Upstream-Contact: Hartmut Goebel <h.goebel at goebel-consult.de>
+Upstream-Homepage: http://openoffice-python.origo.ethz.ch/download
+Maintainer-Contact: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
+Maintainer-Homepage: http://tryton.debian-maintainers.org/
Files: *
Copyright: (C) 2008-2009 Hartmut Goebel <h.goebel at goebel-consult.de>
commit aa2ef0652d5e95243ca1cea1e8bd0e5088703943
Author: Daniel Baumann <daniel at debian.org>
Date: Tue Aug 25 08:18:10 2009 +0200
Adding README.source.
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..259f923
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,37 @@
+Package Repositories
+--------------------
+
+Backports for the current stable debian distribution as well as snapshots of
+unreleased versions may be available in repositories listed on the maintainers
+homepage. The current URL of the maintainer homepage can be seen in
+debian/control.
+
+
+Source Access
+-------------
+
+You can obtain the sources of this package with:
+
+ $ apt-get source ${PACKAGE}
+
+whereas '${PACKAGE}' has to be replaced with the actual name of the package.
+
+This package is maintained with the Git version control system. The current git
+source tree can be obtained with:
+
+ $ git clone ${GIT_URI}
+
+whereas '${GIT_URI}' has to be replaced with the actual URI for the Git
+repository. The current Git URI can be seen in debian/control in the extracted
+package sources.
+
+More information about Git can be found in the git-core package.
+
+This package may use the Quilt patch system to manage all modifications to the
+upstream source. Changes, if any, are stored in the source package as diffs in
+debian/diff and are applied during the build. Current modifications can be
+applied to the source tree with:
+
+ $ quilt push -a
+
+More information about Quilt can be found in the quilt package.
commit f7f96f085271065daaf821a1d6c76e5d5c71d814
Author: Daniel Baumann <daniel at debian.org>
Date: Mon Aug 24 17:49:43 2009 +0200
Adding maintainer homepage field to control.
diff --git a/debian/control b/debian/control
index ac7bfe2..4385c6f 100644
--- a/debian/control
+++ b/debian/control
@@ -11,6 +11,7 @@ Standards-Version: 3.8.3
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
Vcs-Git: git://git.debian-maintainers.org/git/tryton/openoffice-python.git
+XSBC-Maintainer-Homepage: http://tryton.debian-maintainers.org/
Package: python-openoffice
Architecture: all
commit cc365cab04a8dcb7a30e19d63f90058344910798
Author: Daniel Baumann <daniel at debian.org>
Date: Sun Aug 16 10:12:33 2009 +0200
Updating to standards version 3.8.3.
diff --git a/debian/control b/debian/control
index 66f4de6..ac7bfe2 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Uploaders:
Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
Build-Depends:
debhelper (>= 7), python, python-all-dev, python-setuptools, python-support
-Standards-Version: 3.8.2
+Standards-Version: 3.8.3
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
Vcs-Git: git://git.debian-maintainers.org/git/tryton/openoffice-python.git
commit 0b0b4e5cd70f17d79d6505050f7498f95dc7e278
Author: Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
Date: Tue Aug 11 22:13:45 2009 +0200
Correcting spelling errors in package long-description.
diff --git a/debian/control b/debian/control
index fc54b63..66f4de6 100644
--- a/debian/control
+++ b/debian/control
@@ -18,11 +18,11 @@ Depends: ${misc:Depends}, ${python:Depends}, python-pkg-resources
Recommends: python-uno
XB-Python-Version: ${python:Versions}
Description: Python libraries for interacting with OpenOffice.org
- This is a Python module to interacte with OpenOffice.org. It aims to support:
+ This is a Python module to interact with OpenOffice.org. It aims to support:
.
* users writing complex macros for OpenOffice in Python
* developers interacting with OpenOffice from outside (eg. use OpenOffice to
print a file)
.
- The library is designed to supports both writing macros (called by OOo) and
+ The library is designed to support both writing macros (called by OOo) and
interacting with OOo from an external Python program (using the UNO bridge).
commit faa2d76c99fbbc6fd92c941eabb4e09d0d40fa0e
Author: Daniel Baumann <daniel at debian.org>
Date: Mon Aug 10 18:47:00 2009 +0200
Releasing debian version 0.1+r34-3.
diff --git a/debian/changelog b/debian/changelog
index 24bc008..98e79e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+openoffice-python (0.1+r34-3) unstable; urgency=low
+
+ * Updating maintainer field.
+ * Adding Mathias as co-maintainer.
+ * Updating vcs fields.
+ * Wrapping lines in control.
+
+ -- Daniel Baumann <daniel at debian.org> Mon, 10 Aug 2009 18:46:43 +0200
+
openoffice-python (0.1+r34-2) unstable; urgency=low
* Using correct rfc-2822 date formats in changelog.
commit 2d7028b7568d8f9233bc4d3ecdeb55dbdb9ef510
Author: Daniel Baumann <daniel at debian.org>
Date: Mon Aug 10 18:44:09 2009 +0200
Wrapping lines in control.
diff --git a/debian/control b/debian/control
index c2a78f7..fc54b63 100644
--- a/debian/control
+++ b/debian/control
@@ -2,8 +2,11 @@ Source: openoffice-python
Section: python
Priority: optional
Maintainer: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
-Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
-Build-Depends: debhelper (>= 7), python, python-all-dev, python-setuptools, python-support
+Uploaders:
+ Daniel Baumann <daniel at debian.org>,
+ Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
+Build-Depends:
+ debhelper (>= 7), python, python-all-dev, python-setuptools, python-support
Standards-Version: 3.8.2
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
commit 464dd75f775eea24111351d8bd89164b5c1d8388
Author: Daniel Baumann <daniel at debian.org>
Date: Mon Aug 10 12:36:44 2009 +0200
Updating vcs fields.
diff --git a/debian/control b/debian/control
index 4d2f765..c2a78f7 100644
--- a/debian/control
+++ b/debian/control
@@ -6,8 +6,8 @@ Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at mbsoluti
Build-Depends: debhelper (>= 7), python, python-all-dev, python-setuptools, python-support
Standards-Version: 3.8.2
Homepage: http://openoffice-python.origo.ethz.ch/
-Vcs-Browser: http://git.debian.net/?p=debian/python-openoffice.git
-Vcs-Git: git://git.debian.net/git/debian/python-openoffice.git
+Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/openoffice-python.git
+Vcs-Git: git://git.debian-maintainers.org/git/tryton/openoffice-python.git
Package: python-openoffice
Architecture: all
commit 4ad2b3299f3be7835ee348a684414f5f96379f5e
Author: Daniel Baumann <daniel at debian.org>
Date: Mon Aug 10 12:35:39 2009 +0200
Adding Mathias as co-maintainer.
diff --git a/debian/control b/debian/control
index 08d5edd..4d2f765 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: openoffice-python
Section: python
Priority: optional
Maintainer: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
-Uploaders: Daniel Baumann <daniel at debian.org>
+Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
Build-Depends: debhelper (>= 7), python, python-all-dev, python-setuptools, python-support
Standards-Version: 3.8.2
Homepage: http://openoffice-python.origo.ethz.ch/
commit 35dcd15c92335fd91bec1f4a3e89ff5bbe3bec75
Author: Daniel Baumann <daniel at debian.org>
Date: Mon Aug 10 12:34:31 2009 +0200
Updating maintainer field.
diff --git a/debian/control b/debian/control
index aa025a6..08d5edd 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,8 @@
Source: openoffice-python
Section: python
Priority: optional
-Maintainer: Daniel Baumann <daniel at debian.org>
+Maintainer: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
+Uploaders: Daniel Baumann <daniel at debian.org>
Build-Depends: debhelper (>= 7), python, python-all-dev, python-setuptools, python-support
Standards-Version: 3.8.2
Homepage: http://openoffice-python.origo.ethz.ch/
commit b23fac95255afc2a6a0d9ebc6a309661087cfa96
Author: Daniel Baumann <daniel at debian.org>
Date: Wed Jul 29 23:15:53 2009 +0200
Releasing debian version 0.1+r34-2.
diff --git a/debian/changelog b/debian/changelog
index 411cdd8..24bc008 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+openoffice-python (0.1+r34-2) unstable; urgency=low
+
+ * Using correct rfc-2822 date formats in changelog.
+ * Updating package to standards version 3.8.2.
+ * Minimizing rules file.
+
+ -- Daniel Baumann <daniel at debian.org> Wed, 29 Jul 2009 23:15:45 +0200
+
openoffice-python (0.1+r34-1) unstable; urgency=low
* Initial release.
commit 20700d54b4905065de49fd81486dbcd7e7f54445
Author: Daniel Baumann <daniel at debian.org>
Date: Wed Jul 29 23:15:38 2009 +0200
Minimizing rules file.
diff --git a/debian/rules b/debian/rules
index 93fd0b5..000210b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,43 +1,4 @@
#!/usr/bin/make -f
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp
-
- python setup.py clean
- rm -rf dist build openoffice_python.egg-info
- find . -type f -name "*.pyc" | xargs rm -f
-
- dh_clean
-
-build:
-
-install:
- dh_testdir
- dh_testroot
- dh_prep
- dh_installdirs
-
- python setup.py install --single-version-externally-managed --root=$(CURDIR)/debian/python-openoffice --install-lib /usr/share/python-support/python-openoffice
-
- find debian/python-openoffice -type f -name "*.pyc" | xargs rm -f
-
-binary: binary-indep
-
-binary-arch:
-
-binary-indep: install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_pysupport
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-.PHONY: clean build install binary binary-arch binary-indep
+%:
+ dh ${@}
commit 3d777fc4d8ffb1c3a356f00939c2a0c6423baf5c
Author: Daniel Baumann <daniel at debian.org>
Date: Wed Jul 29 23:15:33 2009 +0200
Updating package to standards version 3.8.2.
diff --git a/debian/control b/debian/control
index fb9642c..aa025a6 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: python
Priority: optional
Maintainer: Daniel Baumann <daniel at debian.org>
Build-Depends: debhelper (>= 7), python, python-all-dev, python-setuptools, python-support
-Standards-Version: 3.8.0
+Standards-Version: 3.8.2
Homepage: http://openoffice-python.origo.ethz.ch/
Vcs-Browser: http://git.debian.net/?p=debian/python-openoffice.git
Vcs-Git: git://git.debian.net/git/debian/python-openoffice.git
commit aa7277cef54ed4e13e36dba7227fb9b77a6972bd
Author: Daniel Baumann <daniel at debian.org>
Date: Mon May 4 11:47:09 2009 +0200
Using correct rfc-2822 date formats in changelog.
diff --git a/debian/changelog b/debian/changelog
index 21460ce..411cdd8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,4 +2,4 @@ openoffice-python (0.1+r34-1) unstable; urgency=low
* Initial release.
- -- Daniel Baumann <daniel at debian.org> Wed, 4 Feb 2009 21:56:00 +0100
+ -- Daniel Baumann <daniel at debian.org> Wed, 04 Feb 2009 21:56:00 +0100
commit b3d2b7870dff5cc853073ef08ef0c191d716ff28
Author: Daniel Baumann <daniel at debian.org>
Date: Sun Mar 22 13:33:42 2009 +0100
Adding debian version 0.1+r34-1.
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..32d0415
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,15 @@
+
+* openoffice-python is licenced under the GNU GPL v3.
+
+* sample-scripts/PrintToWriter.py is licenced unter the GNU LGPL 2.1
+ (or at your option any later version)
+
+
+Abbreviations
+-------------------
+
+:GNU GPL v3: GNU General Public License version 3, see enclosed file
+ 'LICENSE-gpl-3.0.txt'.
+
+:GNU LGPL: GNU Lesser General Public License, see
+ <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>
diff --git a/LICENSE-gpl-3.0.txt b/LICENSE-gpl-3.0.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/LICENSE-gpl-3.0.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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, either version 3 of the License, or
+ (at your option) any later version.
+
+ 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, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..23b1c22
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,3 @@
+include LICENSE-gpl-3.0.txt
+include MANIFEST.in
+exclude projectlogo.*
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..3af3e35
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,18 @@
+Metadata-Version: 1.1
+Name: openoffice-python
+Version: 0.1-r34-20090228
+Summary: Enhanced Python interfaces to OpenOffice.org
+Home-page: http://openoffice-python.origo.ethz.ch/
+Author: Hartmut Goebel
+Author-email: h.goebel at goebel-consult.de
+License: GPLv3
+Download-URL: http://openoffice-python.origo.ethz.ch/download
+Description: UNKNOWN
+Platform: POSIX
+Classifier: Development Status :: 3 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: Operating System :: POSIX
+Classifier: Programming Language :: Python
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Requires: python(>=2.3)
diff --git a/README b/README
new file mode 100644
index 0000000..b909306
--- /dev/null
+++ b/README
@@ -0,0 +1,27 @@
+=========================
+openoffice-python
+=========================
+------------------------------------------------------------
+Python libraries for interacting with OpenOffice.org
+------------------------------------------------------------
+
+Homepage: http://openoffice-python.origo.ethz.ch/
+
+Aim of this project is to support
+
+ * users writing complex macros for OpenOffice in Python
+
+ * developers interacting with OpenOffice from outside (eg. use
+ OpenOffice to print a file)
+
+The library is designed to supports both writing macros (called by
+OOo) and interacting with OOo from an external Python programm (using
+the UNO bridge).
+
+The "UNO bridge" side is meant to implement a more Pythonic and
+high-level interface than Danny Bewers OOoLib. While the "Macro" side
+is meant to support writing macros. Well, there will be a big
+intersection between these parts :-)
+
+For more information, eg. related projects, please visit
+<http://openoffice-python.origo.ethz.ch/>.
diff --git a/SConstruct b/SConstruct
new file mode 100644
index 0000000..e2a0d07
--- /dev/null
+++ b/SConstruct
@@ -0,0 +1,13 @@
+# -*- mode: python ; coding: utf-8 -*-
+#
+# Build requirements
+# - inkscape
+
+import os
+
+env = Environment()
+env.SConsignFile()
+
+# create PNG projectlogo for project homepage
+env.Command('projectlogo.png', 'projectlogo.svg',
+ 'inkscape -z -f $SOURCE -e $TARGET --export-height=100')
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..21460ce
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+openoffice-python (0.1+r34-1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Daniel Baumann <daniel at debian.org> Wed, 4 Feb 2009 21:56:00 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..fb9642c
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,24 @@
+Source: openoffice-python
+Section: python
+Priority: optional
+Maintainer: Daniel Baumann <daniel at debian.org>
+Build-Depends: debhelper (>= 7), python, python-all-dev, python-setuptools, python-support
+Standards-Version: 3.8.0
+Homepage: http://openoffice-python.origo.ethz.ch/
+Vcs-Browser: http://git.debian.net/?p=debian/python-openoffice.git
+Vcs-Git: git://git.debian.net/git/debian/python-openoffice.git
+
+Package: python-openoffice
+Architecture: all
+Depends: ${misc:Depends}, ${python:Depends}, python-pkg-resources
+Recommends: python-uno
+XB-Python-Version: ${python:Versions}
+Description: Python libraries for interacting with OpenOffice.org
+ This is a Python module to interacte with OpenOffice.org. It aims to support:
+ .
+ * users writing complex macros for OpenOffice in Python
+ * developers interacting with OpenOffice from outside (eg. use OpenOffice to
+ print a file)
+ .
+ The library is designed to supports both writing macros (called by OOo) and
+ interacting with OOo from an external Python program (using the UNO bridge).
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..72a2e92
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,64 @@
+Author: Hartmut Goebel <h.goebel at goebel-consult.de>
+Download: http://openoffice-python.origo.ethz.ch/download
+
+Files: *
+Copyright: (C) 2008-2009 Hartmut Goebel <h.goebel at goebel-consult.de>
+License: GPL-3+
+ 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, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ 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, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General Public License
+ can be found in /usr/share/common-licenses/GPL-3 file.
+
+Files:
+ openoffice/dialogs.py, openoffice/ListenerProcAdapters.py,
+ openoffice/config.py, sample-scripts/PrintToWriter.py
+Copyright:
+ (C) 2003-2004 Danny Brewer <d29583 at groovegarden.com>
+ (C) 2008-2009 Hartmut Goebel <h.goebel at goebel-consult.de>
+License: LGPL-2.1+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+ .
+ This library 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
+ Library General Public License for more details.
+ .
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the complete text of the GNU Library General Public License
+ can be found in /usr/share/common-licenses/LGPL-2.1 file.
+
+Files: debian/*
+Copyright: (C) 2009 Daniel Baumann <daniel at debian.org>
+License: GPL-3+
+ 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, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ 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, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General Public License
+ can be found in /usr/share/common-licenses/GPL-3 file.
diff --git a/debian/pycompat b/debian/pycompat
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/debian/pycompat
@@ -0,0 +1 @@
+2
diff --git a/debian/python-openoffice.examples b/debian/python-openoffice.examples
new file mode 100644
index 0000000..7183405
--- /dev/null
+++ b/debian/python-openoffice.examples
@@ -0,0 +1 @@
+sample-scripts/*
diff --git a/debian/pyversions b/debian/pyversions
new file mode 100644
index 0000000..8b253bc
--- /dev/null
+++ b/debian/pyversions
@@ -0,0 +1 @@
+2.4-
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..93fd0b5
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,43 @@
+#!/usr/bin/make -f
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ python setup.py clean
+ rm -rf dist build openoffice_python.egg-info
+ find . -type f -name "*.pyc" | xargs rm -f
+
+ dh_clean
+
+build:
+
+install:
+ dh_testdir
+ dh_testroot
+ dh_prep
+ dh_installdirs
+
+ python setup.py install --single-version-externally-managed --root=$(CURDIR)/debian/python-openoffice --install-lib /usr/share/python-support/python-openoffice
+
+ find debian/python-openoffice -type f -name "*.pyc" | xargs rm -f
+
+binary: binary-indep
+
+binary-arch:
+
+binary-indep: install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_pysupport
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+.PHONY: clean build install binary binary-arch binary-indep
diff --git a/openoffice/ListenerProcAdapters.py b/openoffice/ListenerProcAdapters.py
new file mode 100644
index 0000000..5b7babb
--- /dev/null
+++ b/openoffice/ListenerProcAdapters.py
@@ -0,0 +1,81 @@
+#**********************************************************************
+#
+# Danny.OOo.Listeners.ListenerProcAdapters.py
+#
+# A module to easily work with OpenOffice.org.
+#
+#**********************************************************************
+# Copyright (c) 2003-2004 Danny Brewer
+# d29583 at groovegarden.com
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See: http://www.gnu.org/licenses/lgpl.html
+#
+#**********************************************************************
+# If you make changes, please append to the change log below.
+#
+# Change Log
+# Danny Brewer Revised 2004-06-05-01
+#
+#**********************************************************************
+
+
+# OOo's libraries
+import uno
+import unohelper
+from com.sun.star.awt import XActionListener, XItemListener, XTextListener
+
+__all__ = ['ActionListenerAdapter', 'ItemListenerAdapter',
+ 'TextListenerAdapter']
+
+class __ProcAdapter_MixIn:
+ """An ActionListener adapter.
+
+ When actionPerformed is called, this will call an arbitrary python
+ procedure, with this signature:
+
+ procToCall(actionEvent, *args)
+
+ 1. the oActionEvent
+ 2. any other parameters you specified to this object's constructor
+ (as a tuple).
+ """
+ def __init__(self, procToCall, args=()):
+ self.procToCall = procToCall
+ self.args = args # additional arguments to be passed to procToCall
+ super(__ProcAdapter_MixIn, self).__init__()
+
+
+
+class ActionListenerAdapter(__ProcAdapter_MixIn, unohelper.Base, XActionListener):
+ """This class implements com.sun.star.awt.XActionListener."""
+ def actionPerformed(self, event):
+ # event is a com.sun.star.awt.ActionEvent struct.
+ return self.procToCall(event, *self.args)
+
+class ItemListenerAdapter(__ProcAdapter_MixIn, unohelper.Base, XItemListener):
+ # This object implements com.sun.star.awt.XItemListener.
+
+ def itemStateChanged(self, event):
+ # event is a com.sun.star.awt.ItemEvent struct.
+ return self.procToCall(event, *self.args)
+
+class TextListenerAdapter(__ProcAdapter_MixIn, unohelper.Base, XTextListener):
+ # This object implements com.sun.star.awt.XTextistener.
+
+ def textChanged( self, event):
+ # event is a com.sun.star.awt.TextEvent struct.
+ return self.procToCall(event, *self.args)
diff --git a/openoffice/__init__.py b/openoffice/__init__.py
new file mode 100644
index 0000000..b24217e
--- /dev/null
+++ b/openoffice/__init__.py
@@ -0,0 +1,28 @@
+# -*- mode: python ; coding: utf-8 -*-
+#
+# Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>
+# Licenced under the GNU General Public License v3 (GPLv3)
+# see file LICENSE-gpl-3.0.txt
+#
+
+__author__ = "Hartmut Goebel <h.goebel at goebel-consult.de>"
+__copyright__ = "Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>"
+__licence__ = "GPLv3 - GNU General Public License v3"
+
+import uno
+from com.sun.star.beans import PropertyValue
+
+def iter(elems, prefix=''):
+ # todo: getByIndex verwenden??
+ if hasattr(elems, 'createEnumeration'):
+ enumerator = elems.createEnumeration()
+ while enumerator.hasMoreElements():
+ yield enumerator.nextElement()
+ else:
+ for name in elems.ElementNames:
+ if name.startswith(prefix):
+ yield elems.getByName(name)
+
+def Properties(**kw):
+ return tuple([PropertyValue(k, 0, v,0)
+ for k,v in kw.iteritems()])
diff --git a/openoffice/colors.py b/openoffice/colors.py
new file mode 100644
index 0000000..1b0f746
--- /dev/null
+++ b/openoffice/colors.py
@@ -0,0 +1,136 @@
+#
+# Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>
+# Licenced under the GNU General Public License v3 (GPLv3)
+# see file LICENSE-gpl-3.0.txt
+#
+
+__author__ = "Hartmut Goebel <h.goebel at goebel-consult.de>"
+__copyright__ = "Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>"
+__licence__ = "GPLv3 - GNU General Public License v3"
+
+#------------------------------------------------------------
+# Color manipulation
+#------------------------------------------------------------
+
+import math
+
+def rgb2hsb(red, green, blue):
+ """RGB to HSB color space conversion routine.
+ red, green and blue are all numbers from 0 to 255.
+ This routine returns three floating point numbers, hue, saturation, brightness.
+ hue, saturation and brightness are all from 0.0 to 1.0.
+ """
+ c_min = min(red, green, blue)
+ c_max = max(red, green, blue)
+
+ if c_min == c_max:
+ # Grayscale
+ return 0.0, 0.0, float(c_max)
+ elif red == c_min:
+ d = green - blue
+ h = 3.0
+ elif green == c_min:
+ d = blue - red
+ h = 5.0
+ else:
+ d = red - green
+ h = 1.0
+
+ hue = (h - (float(d) / (c_max - c_min))) / 6.0
+ saturation = (c_max - c_min) / float(c_max)
+ brightness = c_max / 255.0
+
+ return hue, saturation, brightness
+
+
+
+def hsb2rgb(hue, saturation, brightness):
+ """HSB to RGB color space conversion routine.
+ hue, saturation and brightness are all from 0.0 to 1.0.
+ This routine returns three integer numbers, red, green, blue.
+ red, green and blue are all numbers from 0 to 255.
+ """
+ # Scale the brightness from a range of 0.0 thru 1.0
+ # to a range of 0.0 thru 255.0
+ # Then truncate to an integer.
+ brightness = int(min(brightness * 256.0, 255.0))
+ #brightness = int(brightness * 255.0) # hG assumes this is correct
+
+ if saturation == 0.0:
+ # Grayscale because there is no saturation
+ red = green = blue = brightness
+ else:
+ # Make hue angle be within a single rotation.
+ # If the hue is > 1.0 or < 0.0, then it has
+ # "gone around the color wheel" too many times.
+ # For example, a value of 1.2 means that it has
+ # gone around the wheel 1.2 times, which is really
+ # the same ending angle as 0.2 trips around the wheel.
+ # Scale it back to the 0.0 to 1.0 range.
+ hue = hue - math.floor(hue)
+ hue = hue * 6.0
+ # Separate hue into int and fractional parts
+ hue_i = int(hue)
+ hue = hue - hue_i
+ # Is hue even?
+ if hue_i % 2 == 0:
+ hue = 1.0 - hue
+ #
+ p = brightness * (1.0 - saturation)
+ q = brightness * (1.0 - saturation * f)
+
+ if hue_i == 1:
+ red, green, blue = q, brightness, p
+ elif hue_i == 2:
+ red, green, blue = p, brightness, q
+ elif hue_i == 3:
+ red, green, blue = p, q, brightness
+ elif hue_i == 4:
+ red, green, blue = q, p, brightness
+ elif hue_i == 5:
+ red, green, blue = brightness, p, q
+ else:
+ red, green, blue = brightness, q, p
+
+ return red, green, blue
+
+
+
+def rgb(red, green, blue):
+ """Return an integer which represents a color.
+ The color is specified in RGB notation.
+ Each of red, green and blue must be a number from 0 to 255.
+ """
+ return (int(red) & 255) << 16 | (int(green) & 255) << 8 | (int(blue) & 255)
+
+
+def hsb(hue, saturation, brightness):
+ """Return an integer which represents a color.
+ The color is specified in HSB notation.
+ Each of hue, saturation and brightness must be a number from 0.0 to 1.0.
+ """
+ return rgb(hsb2rgb(hue, saturation, brightness))
+
+
+def red(color):
+ """Return the Red component of a color as an integer from 0 to 255.
+ color is an integer representing a color.
+ This function is complimentary to the rgbColor function.
+ """
+ return (int(color) >> 16) & 255
+
+
+def green(color):
+ """Return the Green component of a color as an integer from 0 to 255.
+ color is an integer representing a color.
+ This function is complimentary to the rgbColor function.
+ """
+ return (int(color) >> 8) & 255
+
+
+def blue(color):
+ """Return the Blue component of a color as an integer from 0 to 255.
+ color is an integer representing a color.
+ This function is complimentary to the rgbColor function.
+ """
+ return int(color) & 255
diff --git a/openoffice/config.py b/openoffice/config.py
new file mode 100644
index 0000000..e7c7c68
--- /dev/null
+++ b/openoffice/config.py
@@ -0,0 +1,91 @@
+#**********************************************************************
+#
+# Danny.OOo.ConfigLib.py
+#
+# A module to easily work with OpenOffice.org.
+#
+#**********************************************************************
+# Copyright (c) 2003-2004 Danny Brewer
+# d29583 at groovegarden.com
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See: http://www.gnu.org/licenses/lgpl.html
+#
+#**********************************************************************
+# If you make changes, please append to the change log below.
+#
+# Change Log
+# Danny Brewer Revised 2004-06-20-01
+#
+#**********************************************************************
+
+
+# OOo's libraries
+import uno
+
+#from com.sun.star.beans import PropertyValue
+
+import openoffice
+from openoffice import Properties
+
+
+def getConfigAccess(nodePath, writeAccess=False, enableSync=True,
+ lazyWrite=False):
+ """An easy way to obtain a configuration node from the configuration manager."""
+ localContext = uno.getComponentContext()
+ configProvider = localContext.ServiceManager.createInstanceWithArguments(
+ "com.sun.star.configuration.ConfigurationProvider",
+ Properties(enablesync=enableSync))
+
+ if writeAccess:
+ serviceName = "com.sun.star.configuration.ConfigurationUpdateAccess"
+ else:
+ serviceName = "com.sun.star.configuration.ConfigurationAccess"
+
+ configAccess = configProvider.createInstanceWithArguments(serviceName,
+ Properties(nodepath=nodePath, lazywrite=lazyWrite))
+
+ return configAccess
+
+
+if __name__ == '__main__':
+ print '-- AddonUI --'
+ cfg = getConfigAccess("/org.openoffice.Office.Addons/AddonUI")
+ for name in cfg.ElementNames:
+ print name #, cfg.getByName(name)
+ #print
+ elem = cfg.getByName("AddonMenu")
+ #import pyXray
+ #import openoffice.interact
+ #ctx = openoffice.interact.Context()
+ #pyXray.XrayBox(ctx.context, elem)
+ #for name in elem.ElementNames:
+ # print name, cfg.getByName(name)
+ # print
+ #for name in openoffice.iter(elem):
+ # print dir(name) #.value
+
+ #for name in elem.getElementNames():
+
+ print '-- Some user data --'
+ cfg = getConfigAccess("/org.openoffice.UserProfile/Data")
+ print 'Organisation', cfg.o
+ print 'Firstname', cfg.givenname
+ print 'Lastname', cfg.sn
+ print 'Initials', cfg.initials
+ print 'Title', cfg.title
+ print 'Position', cfg.position
+ print 'Email', cfg.mail
diff --git a/openoffice/datatypes.py b/openoffice/datatypes.py
new file mode 100644
index 0000000..214c4e9
--- /dev/null
+++ b/openoffice/datatypes.py
@@ -0,0 +1,17 @@
+#
+# Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>
+# Licenced under the GNU General Public License v3 (GPLv3)
+# see file LICENSE-gpl-3.0.txt
+#
+
+__author__ = "Hartmut Goebel <h.goebel at goebel-consult.de>"
+__copyright__ = "Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>"
+__licence__ = "GPLv3 - GNU General Public License v3"
+
+
+def Array(*args):
+ """
+ This is just sugar coating so that code from OOoBasic which
+ contains the Array() function can work perfectly in PYTHON.
+ """
+ return tuple(args)
diff --git a/openoffice/dialogs.py b/openoffice/dialogs.py
new file mode 100644
index 0000000..43dbb0d
--- /dev/null
+++ b/openoffice/dialogs.py
@@ -0,0 +1,567 @@
+#**********************************************************************
+#
+# Danny.OOo.DialogLib.py
+#
+# A module to easily work with OpenOffice.org.
+#
+#**********************************************************************
+# Copyright (c) 2003-2004 Danny Brewer
+# d29583 at groovegarden.com
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See: http://www.gnu.org/licenses/lgpl.html
+#
+#**********************************************************************
+# If you make changes, please append to the change log below.
+#
+# Change Log
+# Danny Brewer Revised 2004-06-05-01
+#
+#**********************************************************************
+
+
+
+# OOo's libraries
+import uno
+import unohelper
+
+# Danny's libraries
+from Danny.OOo.OOoLib import createUnoService, createUnoStruct
+from Danny.OOo.Listeners.ListenerProcAdapters import *
+#from Danny.OOo.Listeners.TopWindowListener import TopWindowListener
+
+
+
+# The global Awt Toolkit.
+# This is initialized the first time it is needed.
+#goAwtToolkit = createUnoService("com.sun.star.awt.Toolkit")
+goAwtToolkit = None
+#
+def getAwtToolkit():
+ global goAwtToolkit
+ if goAwtToolkit == None:
+ goAwtToolkit = createUnoService("com.sun.star.awt.Toolkit")
+ return goAwtToolkit
+
+
+
+# This class builds dialog boxes.
+# This can be used in two different ways...
+# 1. by subclassing it (elegant)
+# 2. without subclassing it (less elegant)
+class DBModalDialog:
+ """Class to build a dialog box from the com.sun.star.awt.* services.
+ This doesn't do anything you couldn't already do using OOo's UNO API,
+ this just makes it much easier.
+ You can change the dialog box size, position, title, etc.
+ You can add controls, and listeners for those controls to the dialog box.
+ This class can be used by subclassing it, or without subclassing it.
+ """
+ def __init__(self, positionX=None, positionY=None, width=None, height=None,
+ title=None):
+ self.model = createUnoService("com.sun.star.awt.UncontrolDialogModel")
+ if positionX is not None: self.model.PositionX = positionX
+ if positionY is not None: self.model.PositionY = positionY
+ if width is not None: self.model.Width = width
+ if height is not None: self.model.Height = height
+ if title is not None: self.model.Title = title
+ self.dialogControl = createUnoService("com.sun.star.awt.UncontrolDialog")
+ self.dialogControl.setModel(self.model)
+
+ def release(self):
+ """Release resources.
+ After calling this, you can no longer use this object.
+ """
+ self.dialogControl.dispose()
+
+ #--------------------------------------------------
+ # Dialog box adjustments
+ #--------------------------------------------------
+
+ def setDialogPosition(self, x, y):
+ self.model.PositionX = x
+ self.model.PositionY = y
+
+ def setDialogSize(self, width, height):
+ self.model.Width = width
+ self.model.Height = height
+
+ def setDialogTitle(self, caption):
+ self.model.Title = caption
+
+ def setVisible(self, visible):
+ self.dialogControl.setVisible(visible)
+
+
+ #--------------------------------------------------
+ # com.sun.star.awt.UncontrolButton
+ #--------------------------------------------------
+
+ # After you add a Button control, you can call self.setControlModelProperty()
+ # passing any of the properties for a...
+ # com.sun.star.awt.UncontrolButtonModel
+ # com.sun.star.awt.UncontrolDialogElement
+ # com.sun.star.awt.UncontrolModel
+ def addButton(self, ctrlName, positionX, positionY, width, height,
+ label=None,
+ actionListenerProc=None,
+ tabIndex=None):
+ self.addControl("com.sun.star.awt.UncontrolButtonModel",
+ ctrlName, positionX, positionY, width, height,
+ label=label,
+ tabIndex=tabIndex)
+ if actionListenerProc is not None:
+ self.addActionListenerProc(ctrlName, actionListenerProc)
+
+ def setButtonLabel(self, ctrlName, label):
+ """Set the label of the control."""
+ control = self.getControl(ctrlName)
+ control.setLabel(label)
+
+ #--------------------------------------------------
+ # com.sun.star.awt.UncontrolCheckBox
+ #--------------------------------------------------
+
+ # After you add a CheckBox control, you can call self.setControlModelProperty()
+ # passing any of the properties for a...
+ # com.sun.star.awt.UncontrolCheckBoxModel
+ # com.sun.star.awt.UncontrolDialogElement
+ # com.sun.star.awt.UncontrolModel
+ def addCheckBox(self, ctrlName, positionX, positionY, width, height,
+ label=None,
+ itemListenerProc=None,
+ tabIndex=None):
+ self.addControl("com.sun.star.awt.UncontrolCheckBoxModel",
+ ctrlName, positionX, positionY, width, height,
+ label=label,
+ tabIndex=tabIndex)
+ if itemListenerProc is not None:
+ self.addItemListenerProc(ctrlName, itemListenerProc)
+
+ def setCheckBoxLabel(self, ctrlName, label):
+ """Set the label of the control."""
+ control = self.getControl(ctrlName)
+ control.setLabel(label)
+
+ def getCheckBoxState(self, ctrlName):
+ """Get the state of the control."""
+ control = self.getControl(ctrlName)
+ return control.getState();
+
+ def setCheckBoxState(self, ctrlName, state):
+ """Set the state of the control."""
+ control = self.getControl(ctrlName)
+ control.setState(state)
+
+ def enableCheckBoxTriState(self, ctrlName, triStateEnable):
+ """Enable or disable the tri state mode of the control."""
+ control = self.getControl(ctrlName)
+ control.enableTriState(triaStateEnable)
+
+
+ #--------------------------------------------------
+ # com.sun.star.awt.UncontrolFixedText
+ #--------------------------------------------------
+
+ def addFixedText(self, ctrlName, positionX, positionY, width, height,
+ label=None):
+ self.addControl("com.sun.star.awt.UncontrolFixedTextModel",
+ ctrlName, positionX, positionY, width, height,
+ label=label)
+
+ #--------------------------------------------------
+ # Add Controls to dialog
+ #--------------------------------------------------
+
+ def addControl(self, ctrlServiceName,
+ ctrlName, positionX, positionY, width, height,
+ label=None, tabIndex=None):
+ controlModel = self.model.createInstance(ctrlServiceName)
+ self.model.insertByName(ctrlName, controlModel)
+
+ # if negative coordinates are given for X or Y position,
+ # then make that coordinate be relative to the right/bottom
+ # edge of the dialog box instead of to the left/top.
+ if positionX < 0: positionX = self.model.Width + positionX - width
+ if positionY < 0: positionY = self.model.Height + positionY - height
+ controlModel.PositionX = positionX
+ controlModel.PositionY = positionY
+ controlModel.Width = width
+ controlModel.Height = height
+ controlModel.Name = ctrlName
+
+ if label is not None:
+ controlModel.Label = label
+
+ if tabIndex is not None:
+ controlModel.TabIndex = tabIndex
+
+ #--------------------------------------------------
+ # Access controls and control models
+ #--------------------------------------------------
+
+ def getControl(self, ctrlName):
+ """Get the control (not its model) for a particular control name.
+ The control returned includes the service com.sun.star.awt.Uncontrol,
+ and another control-specific service which inherits from it.
+ """
+ control = self.dialogControl.getControl(ctrlName)
+ return control
+
+ def getControlModel(self, ctrlName):
+ """Get the control model (not the control) for a particular control name.
+ The model returned includes the service UncontrolModel,
+ and another control-specific service which inherits from it.
+ """
+ control = self.getControl(ctrlName)
+ controlModel = control.getModel()
+ return controlModel
+
+
+ #--------------------------------------------------
+ # Adjust properties of control models
+ #--------------------------------------------------
+
+ def setControlModelProperty(self, ctrlName, propertyName, value):
+ """Set the value of a property of a control's model.
+ This affects the control model, not the control.
+ """
+ controlModel = self.getControlModel(ctrlName)
+ controlModel.setPropertyValue(propertyName, value)
+
+ def getControlModelProperty(self, ctrlName, propertyName):
+ """Get the value of a property of a control's model.
+ This affects the control model, not the control.
+ """
+ controlModel = self.getControlModel(ctrlName)
+ return controlModel.getPropertyValue(propertyName)
+
+
+ #--------------------------------------------------
+ # Sugar coated property adjustments to control models.
+ #--------------------------------------------------
+
+ def setEnabled(self, ctrlName, enabled=True):
+ """Supported controls...
+ UncontrolButtonModel
+ UncontrolCheckBoxModel
+ """
+ self.setControlModelProperty(ctrlName, "Enabled", enabled)
+
+ def getEnabled(self, ctrlName):
+ """Supported controls...
+ UncontrolButtonModel
+ UncontrolCheckBoxModel
+ """
+ return self.getControlModelProperty(ctrlName, "Enabled")
+
+ def setState(self, ctrlName, state):
+ """Supported controls...
+ UncontrolButtonModel
+ UncontrolCheckBoxModel
+ """
+ self.setControlModelProperty(ctrlName, "State", state)
+
+ def getState(self, ctrlName):
+ """Supported controls...
+ UncontrolButtonModel
+ UncontrolCheckBoxModel
+ """
+ return self.getControlModelProperty(ctrlName, "State")
+
+ def setLabel(self, ctrlName, label):
+ """Supported controls...
+ UncontrolButtonModel
+ UncontrolCheckBoxModel
+ """
+ self.setControlModelProperty(ctrlName, "Label", label)
+
+ def getLabel(self, ctrlName):
+ """Supported controls...
+ UncontrolButtonModel
+ UncontrolCheckBoxModel
+ """
+ return self.getControlModelProperty(ctrlName, "Label")
+
+ def setHelpText(self, ctrlName, helpText):
+ """Supported controls...
+ UncontrolButtonModel
+ UncontrolCheckBoxModel
+ """
+ self.setControlModelProperty(ctrlName, "HelpText", helpText)
+
+ def getHelpText(self, ctrlName):
+ """Supported controls...
+ UncontrolButtonModel
+ UncontrolCheckBoxModel
+ """
+ return self.getControlModelProperty(ctrlName, "HelpText")
+
+
+ #--------------------------------------------------
+ # Adjust controls (not models)
+ #--------------------------------------------------
+
+ # The following apply to all controls which are a
+ # com.sun.star.awt.Uncontrol
+
+ def setDesignMode(self, ctrlName, designMode=True):
+ self.getControl(ctrlName).setDesignMode(designMode)
+
+ def isDesignMode(self, ctrlName, designMode=True):
+ return self.getControl(ctrlName).isDesignMode()
+
+ def isTransparent(self, ctrlName, designMode=True):
+ return self.getControl(ctrlName).isTransparent()
+
+
+ # The following apply to all controls which are a
+ # com.sun.star.awt.UncontrolDialogElement
+
+ def setPosition(self, ctrlName, positionX, positionY):
+ self.setControlModelProperty(ctrlName, "PositionX", positionX)
+ self.setControlModelProperty(ctrlName, "PositionY", positionY)
+ def setPositionX(self, ctrlName, positionX):
+ self.setControlModelProperty(ctrlName, "PositionX", positionX)
+ def setPositionY(self, ctrlName, positionY):
+ self.setControlModelProperty(ctrlName, "PositionY", positionY)
+ def getPositionX(self, ctrlName):
+ return self.getControlModelProperty(ctrlName, "PositionX")
+ def getPositionY(self, ctrlName):
+ return self.getControlModelProperty(ctrlName, "PositionY")
+
+ def setSize(self, ctrlName, width, height):
+ self.setControlModelProperty(ctrlName, "Width", width)
+ self.setControlModelProperty(ctrlName, "Height", height)
+ def setWidth(self, ctrlName, width):
+ self.setControlModelProperty(ctrlName, "Width", width)
+ def setHeight(self, ctrlName, height):
+ self.setControlModelProperty(ctrlName, "Height", height)
+ def getWidth(self, ctrlName):
+ return self.getControlModelProperty(ctrlName, "Width")
+ def getHeight(self, ctrlName):
+ return self.getControlModelProperty(ctrlName, "Height")
+
+ def setTabIndex(self, ctrlName, width, tabIndex):
+ self.setControlModelProperty(ctrlName, "TabIndex", tabIndex)
+ def getTabIndex(self, ctrlName):
+ return self.getControlModelProperty(ctrlName, "TabIndex")
+
+ def setStep(self, ctrlName, width, step):
+ self.setControlModelProperty(ctrlName, "Step", step)
+ def getStep(self, ctrlName):
+ return self.getControlModelProperty(ctrlName, "Step")
+
+ def setTag(self, ctrlName, width, tag):
+ self.setControlModelProperty(ctrlName, "Tag", tag)
+ def getTag(self, ctrlName):
+ return self.getControlModelProperty(ctrlName, "Tag")
+
+
+ #--------------------------------------------------
+ # Add listeners to controls.
+ #--------------------------------------------------
+
+ # This applies to...
+ # UncontrolButton
+ def addActionListenerProc(self, ctrlName, actionListenerProc):
+ """Create an com.sun.star.awt.XActionListener object and add it to a control.
+ A listener object is created which will call the python procedure actionListenerProc.
+ The actionListenerProc can be either a method or a global procedure.
+ The following controls support XActionListener:
+ UncontrolButton
+ """
+ control = self.getControl(ctrlName)
+ actionListener = ActionListenerProcAdapter(actionListenerProc)
+ control.addActionListener(actionListener)
+
+ # This applies to...
+ # UncontrolCheckBox
+ def addItemListenerProc(self, ctrlName, itemListenerProc):
+ """Create an com.sun.star.awt.XItemListener object and add it to a control.
+ A listener object is created which will call the python procedure itemListenerProc.
+ The itemListenerProc can be either a method or a global procedure.
+ The following controls support XActionListener:
+ UncontrolCheckBox
+ """
+ control = self.getControl(ctrlName)
+ actionListener = ItemListenerProcAdapter(itemListenerProc)
+ control.addItemListener(actionListener)
+
+ #--------------------------------------------------
+ # Display the modal dialog.
+ #--------------------------------------------------
+
+ def doModalDialog(self):
+ """Display the dialog as a modal dialog."""
+ self.dialogControl.setVisible(True)
+ self.dialogControl.execute()
+
+ def endExecute(self):
+ """Call this from within one of the listeners to end the modal dialog.
+ For instance, the listener on your OK or Cancel button would call this to end the dialog.
+ """
+ self.dialogControl.endExecute()
+
+
+
+
+#--------------------------------------------------
+# Example of Dialog box built by subclassing the DBModalDialog class.
+
+class Test1Dialog(DBModalDialog):
+ def __init__(self):
+ DBModalDialog.__init__(self)
+ self.setDialogPosition(60, 50)
+ self.setDialogSize(150, 80)
+ self.setDialogTitle("My Test1 Dialog")
+ self.addButton("btnOK", -10, -10, 30, 14, "OK",
+ actionListenerProc = self.btnOK_clicked)
+ self.addButton("btnCancel", -50, -10, 30, 14, "Cancel",
+ actionListenerProc = self.btnCancel_clicked)
+ self.okClicks = 0
+ self.cancelClicks = 0
+
+ # Called when the OK button is clicked.
+ def btnOK_clicked(self, event):
+ self.okClicks += 1
+
+ # Called when the Cancel button is clicked.
+ def btnCancel_clicked(self, event):
+ self.cancelClicks += 1
+
+def Test1():
+ testDialog = Test1Dialog()
+
+ # Display dialog box.
+ # This does not return until the dialog box is dismissed.
+ testDialog.doModalDialog()
+
+ # Print out the global button click counters.
+ print testDialog.cancelClicks, testDialog.okClicks
+
+
+
+#--------------------------------------------------
+# Example of modal creating a dialog box without subclassing DBModalDialog.
+
+# Global vars to keep track of button clicks.
+okClicks = 0
+cancelClicks = 0
+# Global procs, called as event listeners on button clicks.
+def OKClicked(event):
+ global okClicks
+ okClicks += 1
+def CancelClicked(event):
+ global cancelClicks
+ cancelClicks += 1
+
+# Create a modal dialog box without subclassing DBModalDialog.
+def Test2():
+ testDialog = DBModalDialog(60, 50, 150, 80, "My Test2 Dialog")
+ testDialog.addButton("btnOK", -10, -10, 30, 14, "OK")
+ testDialog.addButton("btnCancel", -50, -10, 30, 14, "Cancel")
+ testDialog.addFixedText("lbl01", 10, 10, 30, 14, "Test1")
+
+ # Install global event listener procs.
+ # Use the addActionListenerProc() routine instead of supplying the event
+ # listener to the addButton() as in first example.
+ testDialog.addActionListenerProc("btnOK", OKClicked)
+ testDialog.addActionListenerProc("btnCancel", CancelClicked)
+
+ # Display dialog box.
+ # This does not return until the dialog box is dismissed.
+ testDialog.doModalDialog()
+
+ # Print out the global button click counters.
+ print cancelClicks, okClicks
+
+
+
+
+#--------------------------------------------------
+# Example of Dialog box built by subclassing the DBModalDialog class.
+
+class ModalDoggieKittyMonkeyDialog(DBModalDialog):
+ def __init__(self):
+ self.numDoggies = 0
+ self.numKitties = 0
+ self.numMonkeys = 0
+ self.tails = False
+ self.okay = False
+
+ DBModalDialog.__init__(self, 60, 50, 200, 90, "Doggie/Kitty/Monkey Dialog")
+
+ # Add an OK and a Cancel button.
+ # Both buttons share an action listener named "self.btnOkOrCancel_clicked".
+ self.addButton("btnOK", -10, -10, 50, 14, "OK",
+ actionListenerProc = self.btnOkOrCancel_clicked)
+ self.addButton("btnCancel", -10 - 50 - 10, -10, 50, 14, "Cancel",
+ actionListenerProc = self.btnOkOrCancel_clicked)
+
+ # Add three buttons.
+ self.addButton("btnDoggie", 5, 10, 50, 14, "Add Doggie",
+ actionListenerProc = self.btnDoggie_Clicked)
+ self.addButton("btnKitty", 5, 30, 50, 14, "Add Kitty",
+ actionListenerProc = self.btnKitty_Clicked)
+ self.addButton("btnMonkey", 5, 50, 50, 14, "Add Monkey",
+ actionListenerProc = self.btnMonkey_Clicked)
+
+ # Add a label to the dialog.
+ self.addFixedText("lbl1", 60, 10, 100, 14, "Add some doggies, kitties, and monkeys.")
+
+ # Add a checkbox to the dialog.
+ self.addCheckBox("chkTails", 60, 30, 50, 14, "With tails",
+ itemListenerProc = self.chkTails_changed)
+
+ def btnOkOrCancel_clicked(self, event):
+ """Called when the OK or Cancel button is clicked."""
+ if event.Source.getModel().Name == "btnOK":
+ self.okay = True
+ self.endExecute()
+
+ def btnDoggie_Clicked(self, event):
+ """Called with the Doggie button is clicked."""
+ self.numDoggies += 1
+
+ def btnKitty_Clicked(self, event):
+ """Called with the Kitty button is clicked."""
+ self.numKitties += 1
+
+ def btnMonkey_Clicked(self, event):
+ """Called with the Monkey button is clicked."""
+ self.numMonkeys += 1
+
+ def chkTails_changed(self, event):
+ """Called when the Tails checkbox is clicked."""
+ self.tails = self.getState("chkTails")
+
+
+def Test3():
+ testDialog = ModalDoggieKittyMonkeyDialog()
+ testDialog.doModalDialog()
+
+ # Print out the global button click counters.
+ print testDialog.numDoggies, testDialog.numKitties, testDialog.numMonkeys
+ print "okay:", testDialog.okay,
+ print "tails:", testDialog.tails, testDialog.getState("chkTails")
+
+
+
+
+
+#>>> import Danny.OOo.DialogLib
+#>>> reload(Danny.OOo.DialogLib); from Danny.OOo.DialogLib import *
diff --git a/openoffice/interact.py b/openoffice/interact.py
new file mode 100644
index 0000000..bb63ded
--- /dev/null
+++ b/openoffice/interact.py
@@ -0,0 +1,160 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>
+# Licenced under the GNU General Public License v3 (GPLv3)
+# see file LICENSE-gpl-3.0.txt
+#
+
+__author__ = "Hartmut Goebel <h.goebel at goebel-consult.de>"
+__copyright__ = "Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>"
+__licence__ = "GPLv3 - GNU General Public License v3"
+
+import unohelper
+import openoffice.officehelper as officehelper
+from com.sun.star.beans import PropertyValue
+
+import openoffice.streams
+
+import os
+
+class Context:
+ # Todo:
+ # - Make desktop, unoService and coreRelefection into slots (or such)
+ # - find out which objects are singletons anyway
+ def __init__(self, pipename=None, host=None, port=None):
+ """Start OOo and connect to it"""
+ self.context = officehelper.bootstrap(pipename=pipename,
+ host=host, port=port)
+ self._desktop = None
+
+ def desktop(self):
+ if self._desktop is None:
+ self._desktop = Desktop(self)
+ return self._desktop
+
+ def unoService(self, className):
+ return self.context.ServiceManager.createInstanceWithContext(className,
+ self.context)
+
+ def coreReflection(self):
+ return self.createUnoService("com.sun.star.reflection.CoreReflection")
+
+ def ceateUnoStruct(self, typeName):
+ """
+ Create a UNO struct.
+ Similar to the function of the same name in OOo Basic.
+ """
+ # Get the IDL class for the type name
+ idlClass = self.coreReflection().forName(typeName)
+ rv, struct = idlClass.createObject(None)
+ return struct
+
+ #---- API helpers ---------------
+
+ def hasUnoInterfaces(self, obj, *interfaceNames):
+ """
+ Similar to Basic's HasUnoInterfaces() function.
+ """
+ wantedInterfaces = set(interfaceNames)
+ # Get the Introspection service and the object info
+ introspect = self.createUnoService("com.sun.star.beans.Introspection")
+ objInfo = introspect.inspect( oObject )
+
+ # Get List of all methods of the object.
+ methods = objInfo.getMethods(uno.getConstantByName("com.sun.star.beans.MethodConcept.ALL"))
+ # Get the classes (=interfaces) these methods are defined by
+ supportedInterfaces = set([method.getDeclaringClass().getName()
+ for method in methods])
+ return wantedInterfaces <= supportedInterfaces
+
+
+class Desktop:
+ def __init__(self, ctx=None, pipename=None, host=None, port=None):
+ if ctx is None:
+ ctx = Context(pipename=pipename, host=host, port=port)
+ self._ctx = ctx
+ # Verbindung zur Oberflaeche
+ self._desktop = ctx.context.ServiceManager.createInstanceWithContext(
+ "com.sun.star.frame.Desktop", ctx.context)
+ self._ctx._desktop = self._desktop
+
+
+ def newDoc(self, doctype, **kw):
+ """
+ Create a new document.
+
+ ''doctype'' may be one of swriter, scalc, simpress, sdraw,
+ smath or sbase.
+ """
+ return self.openURL("private:factory/" + doctype, **kw)
+
+
+ def openURL(self, url, target='_default', hidden=False,
+ readonly=False, preview=False, stream=None):
+ """
+ Open a document from it's URL.
+
+ This argumens will be passed to loadComponentFromURL() as
+ Properties:
+
+ - hidden: do not open windows for this document, hide it
+ - readonly: open in read-only mode
+ - preview: open in preview mode
+ - stream: use this stream as "InputStream" (only usefull with
+ url='private:stream'. You should use openStream() instead.
+
+ Allowed values for 'target' are:
+
+ :_self: Returns the frame itself. The same as with an empty
+ target frame name. This means to search for a frame you
+ already have, but it is legal.
+ :_top: Returns the top frame of the called frame. The first
+ frame where isTop() returns true when traveling up the
+ hierarchy. If the starting frame does not have a parent
+ frame, the call is treated as a search for "_self".
+ This behavior is compatible to the frame targeting in a
+ web browser.
+ :_parent: Returns the next frame above in the frame hierarchy.
+ If the starting frame does not have a parent frame, the
+ call is treated as a search for "_self". This behavior
+ is compatible to the frame targeting in a web browser.
+ :_blank: Creates a new top-level frame as a child frame of the
+ desktop. If the called frame is not part of the desktop
+ hierarchy, this call fails. Using the "_blank" target
+ loads open documents again that result in a read-only
+ document, depending on the UCB content provider for the
+ component. If loading is done as a result of a user
+ action, this becomes confusing to theusers, therefore
+ the "_default" target is recommended in calls from a
+ user interface, instead of "_blank". Refer to the next
+ section for a discussion about the _default target..
+ :_default: Similar to "_blank", but the implementation defines
+ further behavior that has to be documented by the
+ implementer. The com.sun.star.frame.XComponentLoader
+ implemented at the desktop object shows the following
+ default behavior.
+ """
+ properties = (
+ PropertyValue("Hidden", 0, bool(hidden), 0),
+ PropertyValue("ReadOnly", 0, bool(readonly), 0),
+ PropertyValue("Preview", 0, bool(preview), 0),
+ PropertyValue("InputStream", 0, stream, 0),
+ )
+ return self._desktop.loadComponentFromURL(url, target, 0, properties)
+
+ def openFile(self, filename, **kw):
+ filename = os.path.expanduser(filename)
+ filename = os.path.abspath(filename)
+ url = unohelper.systemPathToFileUrl(filename)
+ return self.openURL(url, **kw)
+
+ def openStream(self, filehandle, **kw):
+ if not isinstance(filehandle, openoffice.streams.InputStream):
+ filehandle = openoffice.streams.InputStream(filehandle)
+ return self.openURL("private:stream", stream=filehandle, **kw)
+
+
+if __name__ == '___main__':
+ desktop = Desktop()
+ doc = desktop.newDoc("swriter")
diff --git a/openoffice/officehelper.py b/openoffice/officehelper.py
new file mode 100644
index 0000000..2725224
--- /dev/null
+++ b/openoffice/officehelper.py
@@ -0,0 +1,159 @@
+# -*- mode: python ; coding: utf-8 -*-
+#
+# Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>
+# Licenced under the GNU General Public License v3 (GPLv3)
+# see file LICENSE-gpl-3.0.txt
+#
+# Originally based on officehelper.py 1.2 comming with OOo
+#
+
+__author__ = "Hartmut Goebel <h.goebel at goebel-consult.de>"
+__copyright__ = "Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>"
+__licence__ = "GPLv3 - GNU General Public License v3"
+
+import os
+import random
+import sys
+from time import sleep
+
+import uno
+from com.sun.star.connection import NoConnectException
+
+class BootstrapException(Exception): pass
+
+__soffice_executable = None
+
+def _build_connect_string(pipename=None, host=None, port=None):
+ """
+ Returns a connection description string to be used to connect to
+ this process via UnoUrlResolver().resolve().
+
+ Pass either a pipename for a named pipe or host and port for a
+ socket connection.
+
+ Note: You should use the naemd pipe whenever possible, since
+ socket are unsecure: Everybody can connect to a socket and access
+ your documents without any access control.
+ """
+ if pipename:
+ connectString = "pipe,name=%s" % pipename
+ else:
+ connectString = 'socket'
+ if host: connectString += ',host='+str(host)
+ if port: connectString += ',port='+str(port)
+ return connectString
+
+
+def _build_cmd_args(connectString, unaccept=False):
+ """
+ Returns command arguments (including executable and options)
+ suitable for staring an background OOo instance listening on named
+ pipe or socket descripted in parameter 'connectString'.
+
+ If unaccept is true, the parmeter '-accept=...' will become
+ '-unaccept=...' for making the instance unlisten.
+ """
+
+ def find_executable():
+ """
+ Find 'soffice' executable.
+
+ Normaly soffice should be in the same directory as uno.py, but eg.
+ Debian does not obaj to this convention. Thus we need to search
+ the executable.
+ """
+ global __soffice_executable
+ if __soffice_executable:
+ return __soffice_executable
+ for p in [os.path.dirname(uno.__file__),
+ '/usr/lib/openoffice/program',
+ '/usr/bin',
+ '/usr/local/bin',
+ ]:
+ office = os.path.join(p, "soffice")
+ if os.path.exists(office):
+ break
+ else:
+ pathes = glob.glob('/usr/lib/ooo-[234].*/program/soffice')
+ if not pathes:
+ raise BootstrapExceptions('soffice executable not found')
+ pathes.sort(reverse=True)
+ office = pathes[0]
+ __soffice_executable = office
+ return office
+
+ # soffice script used on *ix, Mac; soffice.exe used on Windoof
+ office = find_executable()
+ if sys.platform.startswith("win"):
+ office += ".exe"
+
+ # -headless includes -invisible (which includes -nologo -nodefault)
+ accept = unaccept and '-unaccept' or '-accept'
+ cmdArray = (office,
+ "-headless", "-norestore", "%s=%s;urp;" %
+ (accept, connectString))
+ return cmdArray
+
+
+def _start_OOo(connectString):
+ """Start an OOo process listening on named pipe or socket
+ descripted in parameter 'connectString'.
+ """
+ cmdArray = _build_cmd_args(connectString)
+ # Start the office proces, don't check for exit status since
+ # an exception is caught anyway if the office terminates
+ # unexpectedly.
+ return os.spawnv(os.P_NOWAIT, cmdArray[0], cmdArray)
+
+
+def connect(connectString):
+ """
+ Connect to an OOo instance listening on named pipe or socket
+ descripted in parameter 'connectString'.
+ """
+ localContext = uno.getComponentContext()
+ resolver = localContext.ServiceManager.createInstanceWithContext(
+ "com.sun.star.bridge.UnoUrlResolver", localContext)
+ connect = "uno:" + connectString + ";urp;StarOffice.ComponentContext"
+
+ # Wait until an office is started, but loop only 20 times (10 seconds)
+ for i in range(20):
+ try:
+ context = resolver.resolve(connect)
+ break
+ except NoConnectException:
+ sleep(0.5) # Sleep 1/2 second.
+ else:
+ # for-loop completed without 'break' (this is: no connection found)
+ raise BootstrapException("Cannot connect to soffice server.")
+
+ return context
+
+
+def bootstrap(pipename=None, host=None, port=None):
+ """Bootstrap OOo and PyUNO Runtime.
+
+ If either pipename, host or port are given, connect to the OOo
+ instance listening on this pipe or hosst/port. (This is mainly for
+ convenience, so programms do not need to distinguish these cases.)
+
+ If non of these parameters are give, the soffice process is
+ started opening a named pipe of random name, then the local
+ context is used to access the pipe.
+
+ This function directly returns the remote component context, from
+ whereon you can get the ServiceManager by calling
+ getServiceManager() on the returned object.
+ """
+ if pipename or host or port:
+ connectString = _build_connect_string(pipename=pipename,
+ host=host, port=port)
+ else:
+ # Generate a random pipe name.
+ pipename = "uno" + str(random.random())[2:]
+ connectString = _build_connect_string(pipename=pipename)
+ # start OOo listening on this named pipe
+ _start_OOo(connectString)
+ # get component context and return it
+ context = connect(connectString)
+ return context
diff --git a/openoffice/streams.py b/openoffice/streams.py
new file mode 100644
index 0000000..ecae397
--- /dev/null
+++ b/openoffice/streams.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>
+# Licenced under the GNU General Public License v3 (GPLv3)
+# see file LICENSE-gpl-3.0.txt
+#
+
+__author__ = "Hartmut Goebel <h.goebel at goebel-consult.de>"
+__copyright__ = "Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>"
+__licence__ = "GPLv3 - GNU General Public License v3"
+
+import uno
+import unohelper
+from com.sun.star.io import XInputStream, XOutputStream, XSeekable
+
+class InputStream(unohelper.Base, XInputStream, XSeekable):
+ def __init__(self, stream):
+ self.f = stream
+
+ def skipBytes(self, count):
+ self.f.read(count)
+
+ def readBytes(self, retSeq, count):
+ s = self.f.read(count)
+ return len(s), uno.ByteSequence(s)
+
+ def readSomeBytes(self, retSeq , count):
+ return self.readBytes(retSeq, count)
+
+ def available(self):
+ return 0
+
+ def closeInput(self):
+ self.f.close()
+
+ def seek(self, pos):
+ self.f.seek(pos)
+
+ def getPosition(self):
+ return self.f.tell()
+
+ def getLength(self):
+ f = self.f # shortcut
+ pos = f.tell()
+ f.seek(0, 2)
+ len = f.tell()
+ f.seek(pos)
+ return len
+
+
+class OutputStream(unohelper.Base, XOutputStream):
+ def __init__(self, stream):
+ self.f = stream
+
+ def writeBytes(self, seq):
+ self.f.write(seq.value)
+
+ def closeOutput(self):
+ self.f.flush()
+
+ def flush(self):
+ self.f.flush()
diff --git a/openoffice/styles.py b/openoffice/styles.py
new file mode 100644
index 0000000..b7b4eb5
--- /dev/null
+++ b/openoffice/styles.py
@@ -0,0 +1,48 @@
+#
+# Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>
+# Licenced under the GNU General Public License v3 (GPLv3)
+# see file LICENSE-gpl-3.0.txt
+#
+
+__author__ = "Hartmut Goebel <h.goebel at goebel-consult.de>"
+__copyright__ = "Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>"
+__licence__ = "GPLv3 - GNU General Public License v3"
+
+class NoSuchStyleFamily(Exception): pass
+
+def getStyle(doc, family, name):
+ """
+ Lookup a style from the document.
+ """
+ styleFamily = doc.getStyleFamilies().getByName(family)
+ if not styleFamily:
+ raise NoSuchStyleFamily(family)
+ style = None
+ if styleFamily.hasByName(name):
+ style = styleFamily.getByName(name)
+ return style
+
+
+def defineStyle( doc, family, name, parent=None):
+ """
+ Add a new style to the style catalog if it is not already present.
+ This returns the style object so that you can alter its properties.
+ """
+ styleFamily = doc.getStyleFamilies().getByName(family)
+ if not styleFamily:
+ raise NoSuchStyleFamily(family)
+
+ style = None
+ if styleFamily.hasByName(name):
+ style = styleFamily.getByName(name)
+ if not style:
+ # Create new style object
+ style = doc.createInstance("com.sun.star.style.Style")
+ # Set its parent style
+ if parent is not None:
+ parentName = parent.Name # todo: is this correct?
+ style.setParentStyle(parentName)
+ # Add the new style to the style family
+ styleFamily.insertByName(name, style)
+ return style
+
diff --git a/openoffice/windowsListeners.py b/openoffice/windowsListeners.py
new file mode 100644
index 0000000..ebfe1a8
--- /dev/null
+++ b/openoffice/windowsListeners.py
@@ -0,0 +1,198 @@
+#
+# Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>
+# Licenced under the GNU General Public License v3 (GPLv3)
+# see file LICENSE-gpl-3.0.txt
+#
+
+__author__ = "Hartmut Goebel <h.goebel at goebel-consult.de>"
+__copyright__ = "Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>"
+__licence__ = "GPLv3 - GNU General Public License v3"
+
+from com.sun.star.awt import XTopWindowListener, XWindowListener, \
+ XFocusListener, XKeyListener, XMouseListener, XPaintListener, \
+ XEventListener
+
+
+class TopWindowListener(XTopWindowListener):
+ # Note that com.sun.star.lang.EventObject has the following members:
+ # Source which is a com.sun.star.uno.XInterface
+ # refers to the object that fired the event.
+
+ def __init__(self, *args, **kw):
+ super(self, TopWindowListener).__init__(*args, **kw)
+ # Since this class implements the XTopWindowListener interface,
+ # add ourself as a listener to our own window.
+ self._window.addTopWindowListener(self)
+
+ def windowOpened(self, event):
+ """Is invoked when a window has been opened."""
+ pass
+
+ def windowClosing(self, event):
+ """Is invoked when a window is in the process of being closed.
+ The close operation can be overridden at this point."""
+ self._window.dispose()
+
+ def windowClosed(self, event):
+ """Is invoked when a window has been closed."""
+ pass
+
+ def windowMinimized(self, event):
+ """Is invoked when a window is iconified."""
+ pass
+
+ def windowNormalized(self, event):
+ """Is invoked when a window is de-iconified."""
+ pass
+
+ def windowActivated(self, event):
+ """is invoked when a window is activated."""
+ pass
+
+ def windowDeactivated(self, event):
+ """Is invoked when a window is de-activated."""
+ pass
+
+
+class WindowListener(XWindowListener):
+ # Note that com.sun.star.awt.WindowEvent has the following members:
+ # long X long Y
+ # long Width long Height
+ # long LeftInset long TopInset
+ # long RightInset long BottomInset
+
+ def __init__(self, *args, **kw):
+ super(self, WindowListener).__init__(*args, **kw)
+ # Since this class implements the XWindowListener interface,
+ # add ourself as a listener to our own window.
+ self._window.addWindowListener(self)
+
+ def windowResized(self, event):
+ """Is invoked when the window has been resized."""
+ pass
+
+ def windowMoved(self, event):
+ """Is invoked when the window has been moved."""
+ pass
+
+ def windowShown(self, event):
+ """Is invoked when the window has been shown."""
+ # please note the type of parameter is described
+ # above in the comment for XTopWindowListener.
+ pass
+
+ def windowHidden(self, event):
+ """Is invoked when the window has been hidden."""
+ # please note the type of parameter is described
+ # above in the comment for XTopWindowListener.
+ pass
+
+
+class FocusListener(XFocusListener):
+ # Note that com.sun.star.awt.FocusEvent has the following members:
+ # short FocusFlags
+ # com.sun.star.uno.XInterface NextFocus
+ # boolean Temporary
+
+ def __init__(self, *args, **kw):
+ super(self, FocusListener).__init__(*args, **kw)
+ # Since this class implements the XFocusListener interface,
+ # add ourself as a listener to our own window.
+ self._window.addFocusListener(self)
+
+ def focusGained(self, event):
+ """Is invoked when a window gains the keyboard focus."""
+ pass
+
+ def focusLost(self, event):
+ """Is invoked when a window loses the keyboard focus."""
+ pass
+
+class KeyListener(XKeyListener):
+ # Note that com.sun.star.awt.KeyEvent has the following members:
+ # short KeyCode (constant from com.sun.star.awt.Key)
+ # char KeyChar
+ # short KeyFunc (constant from com.sun.star.awt.KeyFunction)
+
+ def __init__(self, *args, **kw):
+ super(self, KeyListener).__init__(*args, **kw)
+ # Since this class implements the XKeyListener interface,
+ # add ourself as a listener to our own window.
+ self._window.addKeyListener(self)
+
+ def keyPressed(self, event):
+ """Is invoked when a key has been pressed."""
+ pass
+
+ def keyReleased(self, event):
+ """Is invoked when a key has been released."""
+ pass
+
+
+class MouseListener(XMouseListener):
+ # Note that com.sun.star.awt.MouseEvent has the following members:
+ # short Buttons (constant from com.sun.star.awt.MouseButton)
+ # short X short Y
+ # long ClickCount
+ # boolean PupupTrigger
+
+ def __init__(self, *args, **kw):
+ super(self, MouseListener).__init__(*args, **kw)
+ # Since this class implements the XMouseListener interface,
+ # add ourself as a listener to our own window.
+ self._window.addMouseListener(self)
+
+ def mousePressed(self, event):
+ """Is invoked when a mouse button has been pressed on a window."""
+ pass
+
+ def mouseReleased(self, event):
+ """Is invoked when a mouse button has been released on a window."""
+ pass
+
+ def mouseEntered(self, event):
+ """Is invoked when the mouse enters a window."""
+ pass
+
+ def mouseExited(self, event):
+ """Is invoked when the mouse exits a window."""
+ pass
+
+
+class PaintListener(XPaintListener):
+ # Note that com.sun.star.awt.Painevent has the following members:
+ # com.sun.star.awt.Rectangle UpdateRect
+ # short Count
+
+ def __init__(self, *args, **kw):
+ super(self, PaintListener).__init__(*args, **kw)
+ # Since this class implements the XPaintListener interface,
+ # add ourself as a listener to our own window.
+ self._window.addPaintListener(self)
+
+ # [oneway] void
+ # windowPaint([in] Painevent event);
+ def windowPaint(self, event):
+ """
+ Is invoked when a region of the window became invalid, e.g.
+ when another window has been moved away.
+ """
+ pass
+
+
+class EventListener(XEventListener):
+ # Note that com.sun.star.lang.EventObject has the following members:
+ # Source which is a com.sun.star.uno.XInterface
+ # refers to the object that fired the event.
+
+ def __init__(self, *args, **kw):
+ super(self, EventListener).__init__(*args, **kw)
+
+ # void
+ # disposing([in] com.sun.star.lang.EventObject event);
+ def disposing(self, event):
+ """
+ Gets called when the broadcaster is about to be disposed.
+ """
+ pass
+
diff --git a/openoffice_python.egg-info/PKG-INFO b/openoffice_python.egg-info/PKG-INFO
new file mode 100644
index 0000000..3af3e35
--- /dev/null
+++ b/openoffice_python.egg-info/PKG-INFO
@@ -0,0 +1,18 @@
+Metadata-Version: 1.1
+Name: openoffice-python
+Version: 0.1-r34-20090228
+Summary: Enhanced Python interfaces to OpenOffice.org
+Home-page: http://openoffice-python.origo.ethz.ch/
+Author: Hartmut Goebel
+Author-email: h.goebel at goebel-consult.de
+License: GPLv3
+Download-URL: http://openoffice-python.origo.ethz.ch/download
+Description: UNKNOWN
+Platform: POSIX
+Classifier: Development Status :: 3 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: Operating System :: POSIX
+Classifier: Programming Language :: Python
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Requires: python(>=2.3)
diff --git a/openoffice_python.egg-info/SOURCES.txt b/openoffice_python.egg-info/SOURCES.txt
new file mode 100644
index 0000000..f843b4f
--- /dev/null
+++ b/openoffice_python.egg-info/SOURCES.txt
@@ -0,0 +1,27 @@
+COPYING
+LICENSE-gpl-3.0.txt
+MANIFEST.in
+README
+SConstruct
+setup.cfg
+setup.py
+openoffice/ListenerProcAdapters.py
+openoffice/__init__.py
+openoffice/colors.py
+openoffice/config.py
+openoffice/datatypes.py
+openoffice/dialogs.py
+openoffice/interact.py
+openoffice/officehelper.py
+openoffice/streams.py
+openoffice/styles.py
+openoffice/windowsListeners.py
+openoffice_python.egg-info/PKG-INFO
+openoffice_python.egg-info/SOURCES.txt
+openoffice_python.egg-info/dependency_links.txt
+openoffice_python.egg-info/top_level.txt
+sample-scripts/PrintToWriter.py
+sample-scripts/check-installation
+sample-scripts/odf2pdf.py
+sample-scripts/ooo-server
+sample-scripts/open-stream.py
\ No newline at end of file
diff --git a/openoffice_python.egg-info/dependency_links.txt b/openoffice_python.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/openoffice_python.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/openoffice_python.egg-info/top_level.txt b/openoffice_python.egg-info/top_level.txt
new file mode 100644
index 0000000..b221f0d
--- /dev/null
+++ b/openoffice_python.egg-info/top_level.txt
@@ -0,0 +1 @@
+openoffice
diff --git a/sample-scripts/PrintToWriter.py b/sample-scripts/PrintToWriter.py
new file mode 100644
index 0000000..df97341
--- /dev/null
+++ b/sample-scripts/PrintToWriter.py
@@ -0,0 +1,119 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#**********************************************************************
+#
+# PrintToWriter.py - sample script for openoffice-python
+#
+# This implements a simple class which makes it easy and convenient
+# to print a bunch of text into a Writer document.
+#
+# http://openoffice-python.origo.ethz.ch/
+#
+#**********************************************************************
+#
+# Copyright (c) 2003-2004 Danny Brewer <d29583 at groovegarden.com>
+# Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of the
+# License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+#
+# See: http://www.gnu.org/licenses/lgpl.html
+#
+#**********************************************************************
+#
+# If you make changes, please append to the change log below.
+#
+# Change Log
+# Danny Brewer 2004-06-05 Revised
+# Hartmut Goebel 2008-03-09 Major changes, adopted for
+# openoffice-python
+#
+#**********************************************************************
+
+import uno
+import openoffice.interact
+
+_ControlCharacter = "com.sun.star.text.ControlCharacter"
+
+PARAGRAPH_BREAK = uno.getConstantByName(_ControlCharacter+ ".PARAGRAPH_BREAK")
+LINE_BREAK = uno.getConstantByName(_ControlCharacter+ ".LINE_BREAK")
+HARD_HYPHEN = uno.getConstantByName(_ControlCharacter+ ".HARD_HYPHEN")
+SOFT_HYPHEN = uno.getConstantByName(_ControlCharacter+ ".SOFT_HYPHEN")
+HARD_SPACE = uno.getConstantByName(_ControlCharacter+ ".HARD_SPACE")
+APPEND_PARAGRAPH = uno.getConstantByName(_ControlCharacter+ ".APPEND_PARAGRAPH")
+
+class PrintToWriter:
+ """
+ A class which allows conveniently printing stuff into a Writer
+ document.
+
+ Very useful for debugging, general output purposes, or even for
+ creating reports.
+ """
+
+ def __init__(self, desktop=None):
+ if not desktop:
+ desktop = openoffice.interact.Desktop() # todo: defaultDesktop?
+ self._doc = desktop.newDoc('swriter', )#target='_blank', hidden=1)
+ self._text = self._doc.getText()
+ self._cursor = self._text.createTextCursor()
+
+ def writeControlCharacter(self, char, absorb=False):
+ # todo: what does 'absort' mean?
+ self._text.insertControlCharacter(self._cursor, char, absorb)
+
+ def write(self, string, absorb=False):
+ self._text.insertString(self._cursor, str(string), absorb)
+
+ def writelines(self, lines, absorb=False):
+ for line in lines:
+ self._text.insertString(self._cursor, line, absorb)
+
+ def writeTab(self, absorb=False):
+ self.write("\t", absorb)
+
+ def paragraphBreak(self, absorb=False):
+ self.writeControlCharacter(PARAGRAPH_BREAK, absorb)
+
+ def writeLn(self, *args):
+ self.writelines(args)
+ self.paragraphBreak()
+
+ def writeTabSeparated(self, *args):
+ if not args:
+ return
+ arg = args[0]
+ self.write(arg)
+ for arg in args[1:]:
+ self.writeTab()
+ self.write(arg)
+
+
+if __name__ == '__main__':
+ """
+ An example of how to use the PrintToWriter class to trivially
+ create a new Writer document, and write out text into it.
+ """
+ doc = PrintToWriter()
+ doc.writeLn("Hello World")
+ doc.writeTabSeparated("String", 123, 456.23, True)
+ doc.writeLn()
+ doc.writeLn()
+
+ doc.writeLn("Tab delimited values ...")
+
+ doc.writeTabSeparated(123, 456, 789); doc.writeLn()
+ doc.writeTabSeparated(465, 522, 835); doc.writeLn()
+ doc.writeTabSeparated(886, 164, 741); doc.writeLn()
diff --git a/sample-scripts/check-installation b/sample-scripts/check-installation
new file mode 100755
index 0000000..93593f2
--- /dev/null
+++ b/sample-scripts/check-installation
@@ -0,0 +1,120 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+"""
+Check whether openoffice-python can talk to OpenOffice. If not, try to
+find the problem.
+"""
+#
+# Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>
+# Licenced under the GNU General Public License v3 (GPLv3)
+# see file LICENSE-gpl-3.0.txt
+#
+
+import sys
+import platform
+import random
+import pprint
+
+pyver = '.'.join(map(str, sys.version_info[:2]))
+
+def print_pythonpath():
+ print
+ print "Modules are searched in this places (aka sys.path, $PYTHONPATH)"
+ pprint.pprint(sys.path)
+
+#print_pythonpath()
+
+try:
+ import uno
+except ImportError:
+ print "Can't import the uno-bridge module 'uno'."
+ if platform.system == 'Windows':
+ print "Make sure you have a installed version of OpenOffice.org which"
+ print "is matching your Python version", pyver, "and the file uno.py is on"
+ print "your $PYTHONPATH."
+ else:
+ print "Make sure the package 'openoffice.org-pyuno' is installed,"
+ print "is matching your Python version", pyver, "and the file uno.py is on"
+ print "your $PYTHONPATH."
+ if platform.dist()[0] == 'debian':
+ print "For Debian, Ubuntu and related distributions, the package"
+ print "is called, eg. 'python-uno'."
+
+ print_pythonpath()
+ raise SystemExit(21)
+
+openoffice = None
+
+try:
+ import openoffice
+ import openoffice.interact
+ import openoffice.officehelper as OH
+except ImportError, e:
+ print "Can't import openoffice-python module 'openoffice.interact'."
+ print "Make sure the Python package 'openoffice.interact' is installed"
+ print "for your Python version", pyver
+ print "This was the error message:"
+ print e
+ print_pythonpath()
+ if openoffice:
+ print 'openoffice.__file__ :', openoffice.__file__
+ raise SystemExit(22)
+
+def bootstrap(pipename=None, host=None, port=None):
+ if pipename or host or port:
+ print "Try connecting to already running OOo"
+ connectString = OH._build_connect_string(pipename=pipename,
+ host=host, port=port)
+ print "using connection string", repr(connectString)
+ else:
+ # Generate a random pipe name.
+ pipename = "uno" + str(random.random())[2:]
+ connectString = OH._build_connect_string(pipename=pipename)
+ print "Starting OOo for listening on", connectString
+ print "Will use command",
+ print OH._build_cmd_args(connectString)
+ # start OOo listening on this named pipe
+ pid = OH._start_OOo(connectString)
+ print "Started OOo with process id", pid
+
+ print
+ print "Now trying to connect to OOo."
+ sys.stdout.flush()
+ try:
+ context = OH.connect(connectString)
+ print "Connecting with context", context
+ except OH.BootstrapException:
+ raise
+ print "Can not connect to OOo. Please check whether it is running at"
+ print "all."
+ print "Try starting it using this command:"
+ print
+
+ return context
+
+if __name__ == '__main__':
+ import optparse
+ parser = optparse.OptionParser('%prog [options]')
+ group = parser.add_option_group('To connect to already running server use:')
+ group.add_option('--host', #default='localhost',
+ help="hostname/ip of server (default: %default)")
+ group.add_option('--port', default=2002, type=int,
+ help="port the server is listening on (default: %default)")
+
+ opts, args = parser.parse_args()
+ if not opts.host:
+ opts.port = None
+ context = bootstrap(host=opts.host, port=opts.port)
+
+ if context:
+ print
+ print "Looks good."
+ print
+ else:
+ print "When reporting problems, please give this OS information"
+ print platform.platform()
+ print "and this PYTHONPATH:"
+ for p in sys.path:
+ print ' ', repr(p)
+ print
+ raise SystemExit(20)
diff --git a/sample-scripts/odf2pdf.py b/sample-scripts/odf2pdf.py
new file mode 100644
index 0000000..c0f6cfb
--- /dev/null
+++ b/sample-scripts/odf2pdf.py
@@ -0,0 +1,71 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+"""
+This sample script opens a ODF file using OpenOffice.org and
+exports it as PDF.
+"""
+#
+# Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>
+# Licenced under the GNU General Public License v3 (GPLv3)
+# see file LICENSE-gpl-3.0.txt
+#
+# Based on some ideas from LX-office's 'oo-uno-convert-pdf.py'
+# (see <http:///www.lx-office.org>).
+#
+# This is just a sample script for openoffice-python. If you are
+# looking for a converter which supports more formats, you may have a
+# look at <http://www.artofsolving.com/opensource/pyodconverter>
+# (which does not use openoffiec-python).
+#
+
+import openoffice.interact
+import unohelper
+from com.sun.star.beans import PropertyValue
+
+import sys
+import os.path
+
+def write_pdf(doc, pdf_filename):
+ out_props = (
+ PropertyValue("FilterName", 0, "writer_pdf_Export", 0),
+ PropertyValue("Overwrite", 0, True, 0),
+ )
+ pdf_filename = os.path.expanduser(pdf_filename)
+ pdf_filename = os.path.abspath(pdf_filename)
+ pdf_url = unohelper.systemPathToFileUrl(pdf_filename)
+ print >> sys.stderr, pdf_url
+ doc.storeToURL(pdf_url, out_props)
+
+
+def convert2pdf(odf_filename, pdf_filename=None, opts=None):
+ desktop = openoffice.interact.Desktop(host=opts.host, port=opts.port)
+ # If the file does not exist, this will fail with:
+ # openoffice.interact.IllegalArgumentException: URL seems to be
+ # an unsupported one.
+ # (where the module name is missleading!)
+ doc = desktop.openFile(odf_filename, hidden=True)
+ if not pdf_filename:
+ pdf_filename = os.path.splitext(odf_filename)[0] + '.pdf'
+ write_pdf(doc, pdf_filename)
+ doc.dispose()
+ if opts.tear_down:
+ print >> sys.stderr, "Tear down is not yet implemented."
+ #desktop.teardown()
+
+if __name__ == '__main__':
+ import optparse
+ parser = optparse.OptionParser('%prog [options] ODF-Filename [PDF-Filename]')
+ parser.add_option('--tear-down', action='store_true',
+ help="tear down OOo after convertion")
+ group = parser.add_option_group('To connect to already running server use:')
+ group.add_option('--host', #default='localhost',
+ help="hostname/ip of server (default: %default)")
+ group.add_option('--port', default=2002, type=int,
+ help="port the server is listening on (default: %default)")
+
+ opts, args = parser.parse_args()
+ if len(args) == 0 or len(args) > 2:
+ parser.error('expects one or two arguments')
+ if not opts.host:
+ opts.port = None
+ convert2pdf(*args, **{'opts': opts})
diff --git a/sample-scripts/ooo-server b/sample-scripts/ooo-server
new file mode 100644
index 0000000..6c3636b
--- /dev/null
+++ b/sample-scripts/ooo-server
@@ -0,0 +1,109 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>
+# Licenced under the GNU General Public License v3 (GPLv3)
+# see file LICENSE-gpl-3.0.txt
+#
+"""
+Manage a OOo server: start, stop and unlisten.
+
+If you want a full-blown server, help enhancing this script! See
+source for comments.
+
+Some ideas taken from Dag Wieers unoconv
+<http://dag.wieers.com/home-made/unoconv/>
+"""
+
+# Todo:
+#
+# * Implement a full-blown deamon for Unix and a full-blown service
+# for Windows. Should this restart OOo automatically if it crashed?
+#
+# * Design issue: OOo behaves different depending whether there is
+# already an instance running: If one it running, the new process
+# returns. If there is no instance running yet, he new porcess will
+# _not_ return. But how determine whether the server started
+# successfully or there has been an error?
+#
+
+from openoffice.officehelper import _build_cmd_args, _build_connect_string, \
+ BootstrapException
+from openoffice.interact import Desktop
+
+import subprocess
+import sys
+
+def start(pipename=None, host=None, port=None):
+ """
+ Start an OOo instance which listens on pipename or host/port.
+ If there is already an running instance, it will be reused (done
+ by OOo automatically).
+ """
+ connectString = _build_connect_string(pipename, host, port)
+ cmdArray = _build_cmd_args(connectString)
+ # Todo: OOo starts a new instance, if noone is running. This is a
+ # drawback, since one can not tell, whether he has started the
+ # instancce or is reusing an already running one.
+ subprocess.Popen(cmdArray).pid
+
+
+def unlisten(pipename=None, host=None, port=None):
+ """
+ Tell the OOo instance listening on pipename or host/port to stop
+ listening on this connection.
+ """
+ connectString = _build_connect_string(pipename, host, port)
+ cmdArray = _build_cmd_args(connectString, unaccept=True)
+ subprocess.Popen(cmdArray).pid
+
+
+def stop(pipename=None, host=None, port=None):
+ '''
+ Stop the OOo instance listening pipename or host/port.
+
+ Note: If there is no instance listening on pipename or host/port,
+ none will be stopped, since it can not be reached.
+ '''
+ # Connect to the instance listening on host/port
+ try:
+ desktop = Desktop(host=host, port=port)._desktop # todo: use slots
+ except BootstrapException:
+ print >> sys.stderr, 'Could not contact OOo instance to stop it. Perhaps is was not running at all.'
+ raise SystemExit(1)
+
+ if desktop.CurrentFrame:
+ ### If there is a GUI now attached to the instance, disable only listener
+ unlisten(pipename, host, port)
+ else:
+ ### If there is no GUI attached to the instance, terminate instance
+ unlisten(pipename, host, port)
+ try:
+ desktop.terminate()
+ except DisposedException:
+ pass
+
+
+if __name__ == '__main__':
+ import optparse
+ parser = optparse.OptionParser('%prog [options] '
+ '[ start | unlisten | stop ]')
+ parser.add_option('--host', default='localhost',
+ help="server address to listen on (default: %default, "
+ "use '0.0.0.0' for listening on all IPv4 addresses)")
+ parser.add_option('--port', default=2002, type=int,
+ help="port to listen on (default: %default)")
+ opts, args = parser.parse_args()
+
+ if len(args) != 1:
+ parser.error('requiers exactly one argument')
+
+ cmd = args[0].lower()
+ if cmd == 'start':
+ start(host=opts.host, port=opts.port)
+ elif cmd == 'unlisten':
+ unlisten(host=opts.host, port=opts.port)
+ elif cmd == 'stop':
+ stop(host=opts.host, port=opts.port)
+ else:
+ parser.error('unknown action %r' % cmd)
diff --git a/sample-scripts/open-stream.py b/sample-scripts/open-stream.py
new file mode 100644
index 0000000..314d35f
--- /dev/null
+++ b/sample-scripts/open-stream.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>
+# Licenced under the GNU General Public License v3 (GPLv3)
+# see file LICENSE-gpl-3.0.txt
+#
+
+__author__ = "Hartmut Goebel <h.goebel at goebel-consult.de>"
+__copyright__ = "Copyright (c) 2008 by Hartmut Goebel <h.goebel at goebel-consult.de>"
+__licence__ = "GPLv3 - GNU General Public License v3"
+
+import openoffice.interact
+
+def loadAsStream(odf_filename, opts=None):
+ desktop = openoffice.interact.Desktop(host=opts.host, port=opts.port)
+
+ stream = open(odf_filename)
+ if 0:
+ # using a file-like object works, too
+ import StringIO
+ stream = StringIO.StringIO(stream.read())
+
+ doc = desktop.openStream(stream, hidden=True)
+ doc.dispose()
+
+
+if __name__ == '__main__':
+ import optparse
+ parser = optparse.OptionParser('%prog [options] ODF-Filename')
+ group = parser.add_option_group('To connect to already running server use:')
+ group.add_option('--host', #default='localhost',
+ help="hostname/ip of server (default: %default)")
+ group.add_option('--port', default=2002, type=int,
+ help="port the server is listening on (default: %default)")
+
+ opts, args = parser.parse_args()
+ if len(args) != 1:
+ parser.error('expects exactly one argument')
+ if not opts.host:
+ opts.port = None
+ loadAsStream(*args, **{'opts': opts})
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..f79f6f6
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,17 @@
+[bdist_rpm]
+doc_files = README
+ LICENSE-gpl-3.0.txt
+
+[sdist]
+formats = bztar
+
+[egg_info]
+tag_build = -r34-20090228
+tag_date = 0
+tag_svn_revision = 0
+
+[aliases]
+release = egg_info sdist bdist_egg bdist_msi register
+daily = egg_info --tag-date --tag-svn-revision sdist bdist_egg
+devel = develop --install-dir ~/lib/python/ --script-dir ~/bin
+
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..de741d7
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+
+try:
+ from setuptools import setup
+except ImportError:
+ from distutils.core import setup
+
+# patch distutils if it can't cope with the "classifiers" or
+# "download_url" keywords
+from sys import version
+if version < '2.2.3':
+ from distutils.dist import DistributionMetadata
+ DistributionMetadata.classifiers = None
+ DistributionMetadata.download_url = None
+
+setup(
+ name='openoffice-python',
+ description='Enhanced Python interfaces to OpenOffice.org',
+ packages=['openoffice'],
+ version='0.1',
+ author='Hartmut Goebel',
+ author_email='h.goebel at goebel-consult.de',
+ url = "http://openoffice-python.origo.ethz.ch/",
+ download_url = "http://openoffice-python.origo.ethz.ch/download",
+ platforms=['POSIX'],
+ license='GPLv3',
+ classifiers=[
+ 'Development Status :: 3 - Beta',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: GNU General Public License (GPL)',
+ 'Operating System :: POSIX',
+ 'Programming Language :: Python',
+ 'Topic :: Software Development :: Libraries :: Python Modules'
+ ],
+ requires=['python(>=2.3)'],
+ )
--
openoffice-python
More information about the tryton-debian-vcs
mailing list