Skip to content

Commit

Permalink
Moving all uno calls to an XMLRPC server also run by the server, (#81)
Browse files Browse the repository at this point in the history
* Moving all uno calls to an XMLRPC server also run by the server, to make light clients

* Clean up and refactor the comparison

* Update readme, more cleanup

* Updated changes.txt

* Preparing release 2.0b1

* Back to development: 2.0b2

* Made the --daemon argument work again

* Cleanup

---------

Co-authored-by: Lennart Regebro <[email protected]>
  • Loading branch information
regebro and Lennart Regebro authored Oct 18, 2023
1 parent b4a7702 commit 26b9e3a
Show file tree
Hide file tree
Showing 11 changed files with 689 additions and 310 deletions.
17 changes: 14 additions & 3 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
1.7 (unreleased)
----------------
2.0b2 (unreleased)
------------------

- Made the --daemon parameter work again


2.0b1 (2023-08-18)
------------------

- A large refactoring with an XML-RPC server and a new client using that XML-RPC
server for communicating. This means the client can now be lightweight, and
no longer needs the Uno library, or even LibreOffice installed. Instead the
new `unoserver.client.UnoClient()` can be used as a library from Python.

- Nothing changed yet.
- A cleanup and refactor of the commands, with new, more gooder parameter names.


1.6 (2023-08-18)
Expand Down
46 changes: 35 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,37 +90,61 @@ and `python3 -m unoserver.comparer` with the same arguments as the main scripts.
Unoserver
~~~~~~~~~

``unoserver [-h] [--interface INTERFACE] [--port PORT] [--daemon] [--executable EXECUTABLE]``
.. code::
* `--interface`: The interface used by the server, defaults to "localhost"
* `--port`: The port used by the server, defaults to "2002"
* `--daemon`: Deamonize the server
unoserver [-h] [--interface INTERFACE] [--uno-interface UNO_INTERFACE] [--port PORT] [--uno-port UNO_PORT]
[--daemon] [--executable EXECUTABLE] [--user-installation USER_INSTALLATION]
[--libreoffice-pid-file LIBREOFFICE_PID_FILE]
* `--interface`: The interface used by the XMLRPC server, defaults to "127.0.0.1"
* `--port`: The port used by the XMLRPC server, defaults to "2003"
* `--uno-interface`: The interface used by the LibreOffice server, defaults to "127.0.0.1"
* `--uno-port`: The port used by the LibreOffice server, defaults to "2002"
* `--daemon`: Deamonize the server
* `--executable`: The path to the LibreOffice executable
* `--user-installation`: The path to the LibreOffice user profile, defaults to a dynamically created temporary directory
* `--libreoffice-pid-file`: If set, unoserver will write the Libreoffice PID to this file.
If started in daemon mode, the file will not be deleted when unoserver exits.

Unoconvert
~~~~~~~~~~

``unoconvert [-h] [--convert-to CONVERT_TO] [--filter FILTER_NAME] [--host INTERFACE] [--port PORT] infile outfile``
.. code::
unoconvert [-h] [--convert-to CONVERT_TO] [--filter FILTER] [--filter-options FILTER_OPTIONS]
[--update-index] [--dont-update-index] [--host HOST] [--port PORT]
[--host-location {auto,remote,local}] infile outfile
* `infile`: The path to the file to be converted (use - for stdin)
* `outfile`: The path to the converted file (use - for stdout)
* `--convert-to`: The file type/extension of the output file (ex pdf). Required when using stdout
* `--filter`: The export filter to use when converting. It is selected automatically if not specified.
* `--host`: The interface used by the server, defaults to "localhost"
* `--filter-options`: Options for the export filter, in name=value format. Use true/false for boolean values.
* `--host`: The host used by the server, defaults to "127.0.0.1"
* `--port`: The port used by the server, defaults to "2002"
* `--host-location`: The host location determines the handling of files. If you run the client on the
same machine as the server, it can be set to local, and the files are sent as paths. If they are
different machines, it is remote and the files are sent as binary data. Default is auto, and it will
send the file as a path if the host is 127.0.0.1 or localhost, and binary data for other hosts.

Unocompare
~~~~~~~~~~

``unocompare [-h] [--file-type FILE_TYPE] [--host INTERFACE] [--port PORT] infile inorigfile outfile``
.. code::
unocompare [-h] [--file-type FILE_TYPE] [--host HOST] [--port PORT] [--host-location {auto,remote,local}]
oldfile newfile outfile
* `infile`: The path to the modified file to be compared with the original one (use - for stdin)
* `inorigfile`: The path to the original file to be compared with the modified one (use - for stdin)
* `oldfile`: The path to the older file to be compared with the original one (use - for stdin)
* `newfile`: The path to the newer file to be compared with the modified one (use - for stdin)
* `outfile`: The path to the result of the comparison and converted file (use - for stdout)
* `--file-type`: The file type/extension of the output file (ex pdf). Required when using stdout
* `--host`: The interface used by the server, defaults to "localhost"
* `--file-type`: The file type/extension of the result output file (ex pdf). Required when using stdout
* `--host`: The host used by the server, defaults to "127.0.0.1"
* `--port`: The port used by the server, defaults to "2002"
* `--host-location`: The host location determines the handling of files. If you run the client on the
same machine as the server, it can be set to local, and the files are sent as paths. If they are
different machines, it is remote and the files are sent as binary data. Default is auto, and it will
send the file as a path if the host is 127.0.0.1 or localhost, and binary data for other hosts.


Development and Testing
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = unoserver
version = 1.7.dev0
version = 2.0b2.dev0
description = A server for file conversions with Libre Office
long_description = file: README.rst, CONTRIBUTORS.rst, CHANGES.rst
classifiers =
Expand Down Expand Up @@ -35,8 +35,8 @@ python_requires = >= 3.8
[options.entry_points]
console_scripts =
unoserver = unoserver.server:main
unoconvert = unoserver.converter:main
unocompare = unoserver.comparer:main
unoconvert = unoserver.client:converter_main
unocompare = unoserver.client:comparer_main

[options.extras_require]
devenv =
Expand Down
Loading

0 comments on commit 26b9e3a

Please sign in to comment.