A simple python layer for ScriptForge
Project description
For Ubuntu:
apt install python3-scriptforge
Start a listening LibreOffice instance
/usr/lib/libreoffice/program/soffice --accept='socket,host=your_host,port=port_number;urp;'
- replace
your_hostandport_number. - add
--invisibleto run in background. - after running your
pythonscripts kill the process (e.g. withctrl + C)
Workdir
In src directory mkdir workdir workdir/input workdir/output workdir/temp or change the predefined paths in src/core/document.py. (Maybe create a directory structure somewhere on your computer for these kind of tasks and create symlinks - idk yet.)
Interactivity
When you start a listening LibreOffice instance you can use it interactively via the Python REPL. In Visual Studio Code there is a Run Selection/Line in Python REPL option. The shortcut for it is Shift+Enter. You don't have to build the whole project every time, also you can catch data in variables once and work with it (e.g. only one API call is enough to work with the response). If you want to see the LibreOffice results in realtime do not use the --invisible switch.
MIT License
Copyright (c) 2024 Stefan Hemrich
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file librid-0.0.1.tar.gz.
File metadata
- Download URL: librid-0.0.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83f909a312f77859ace6287019c330bd84db0aa02c9c6c49df28d128234a4771
|
|
| MD5 |
0e8be8b80f911b621a04b68ef97775dd
|
|
| BLAKE2b-256 |
0dcdd2e60ec4066b1c8310f3bf311fd2e315e5abb91f049f0921c51d2bf7519c
|
File details
Details for the file librid-0.0.1-py3-none-any.whl.
File metadata
- Download URL: librid-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6112d811c5d8488789f8bd3580d25a183f403ba0743b9794327f757dc7c95d66
|
|
| MD5 |
f691898f7fb0b07b5b66dbd36ed60b0a
|
|
| BLAKE2b-256 |
3e8a7e101e2c5ca202ebe5144f8b5303f6d484134b2670317e4293a68d129407
|