Skip to main content

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_host and port_number.
  • add --invisible to run in background.
  • after running your python scripts kill the process (e.g. with ctrl + 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


Download files

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

Source Distribution

librid-0.0.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

librid-0.0.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file librid-0.0.2.tar.gz.

File metadata

  • Download URL: librid-0.0.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for librid-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5cbdcc46470b52ff449b99b83ef0f4acaa5590b94e1b4814f1cbc8cc35192a74
MD5 374987ab1a72bcf9fad1629adc6bac6d
BLAKE2b-256 cb98996164bfabd9ad7114461de0709ed9acad1a7d48a1d883c95294f4dd8440

See more details on using hashes here.

File details

Details for the file librid-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: librid-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for librid-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 969190c78501a0048797120e95f84ba5fa5d1ea8c7f8da58e5085d88958e18d2
MD5 c1180a5c4ae40ca0ab481ee3f3a750a1
BLAKE2b-256 090a2c582ac7c023e6fa04c123e35f4192ce8c36fb63b7d84fbb28afbd4c5c07

See more details on using hashes here.

Supported by

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