Skip to main content

Interacting with OpenOffice.org/LibreOffice using UNO

Project description

unotools
========

Python libraries for interacting with OpenOffice.org/LibreOffice using
the "UNO bridge".

How to install
--------------

On Ubuntu 14.04
~~~~~~~~~~~~~~~

Install libreoffice, uno library and python3:

::

$ sudo aptitude install -y libreoffice libreoffice-script-provider-python uno-libs3 python3-uno python3

I like virtualenvwrapper to make temporary environment:

::

$ sudo aptitude install -y virtualenvwrapper
$ mkvirtualenv -p /usr/bin/python3.4 --system-site-packages tmp3

Confirm importing uno module:

::

(tmp3)$ python
Python 3.4.0 (default, Apr 11 2014, 13:05:11)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import uno

Install unotools from PyPI:

::

(tmp3)$ pip install unotools

How to use
----------

Startup libreoffice:

::

(tmp3)$ soffice --accept='socket,host=localhost,port=8100;urp;StarOffice.Service'

Download sample-scripts from
https://bitbucket.org/t2y/unotools/raw/default/sample-scripts:

::

(tmp3)$ python sample-scripts/writer-sample1.py -s localhost
(tmp3)$ python sample-scripts/calc-sample1.py -s localhost -d sample-scripts/datadir/
(tmp3)$ ls
sample-calc.html sample-calc.pdf sample-calc_html_eaf26d01.png
sample-scripts sample-writer.html sample-writer.pdf
sample.csv sample.doc sample.xls


ChangeLog
=========

0.3.1 (2014-05-07)
------------------

- added command line argument (-f, --file) to be able to read OpenDocument
file

0.3.0 (2014-05-05)
------------------

- first release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unotools-0.3.1.tar.gz (12.4 kB view details)

Uploaded Source

File details

Details for the file unotools-0.3.1.tar.gz.

File metadata

  • Download URL: unotools-0.3.1.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for unotools-0.3.1.tar.gz
Algorithm Hash digest
SHA256 35b10f1be8467ec6a51154547393d0aa39fe970b3c1b769546409b894acf9c49
MD5 8bf7ab9eaa8cb74834f0d0a9da303c5b
BLAKE2b-256 3071c47801ea90807b3bb6c753f085e277afe67e8d7618ba35f106f9368e840f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page