|sample keyboard bindings (disabled in manifest.xml however)|
|mario authored 5 days ago last checkin a0244ed81 ⎘|
|📄 Makefile||freeze requests‹›||107 days ago|
|📄 httprequests.py||faux: move params= to .get‹›||106 days ago|
|📄 pt_dialogs.py||prepare for language list updates (seems shorter than default list ho‹›||83 days ago|
|📄 six.py||update http version to 2.0, freeze requests at 2.25 for Py2/AOO, upda‹›||114 days ago|
|📄 translationbackends.py||prepare for language list updates (seems shorter than default list ho‹›||83 days ago|
|📄 unocompat.py||pylint whitespace etc.‹›||115 days ago|
Any modules in pythonpath/ become accessible in the LibreOffice python environment.
- Hence a good place for splitting some code into.
- Also used to bundle
requestsand other modules for Windows-package (1MB .oxt).
See the Makefile on how to deploy additional packages herein. Afterwards you could simply add/copy this directory into any existing pagetranslate.oxt.
Alternatively to bundling python modules in the OXT, one could also install them system-wide, or even within the Office program/ folder.
For Linux and LibreOffice installations, it's most sensible to add dependencies for the current user or Python site-packages via:
pip3 install -U requests deep-translator six # or `sudo pip3 ...` for system-wide installation
OpenOffice comes with a bundled python interpreter and package library, which also allows expansion. You should do this very selectively, and keep in mind that it's unlikely permanent (e.g. when updating/reinstalling the office package itself).
You firstly need to locate the openofficeX/program/ folder. It contains both the python
binary and a python-core-x.x.x/ directory.
Therein you can update packages via:
pip install -U requests==2.25.1 deep-translator -t ./lib/site-packages/
Again, this isn't the most advisable approach, but sometimes the easiest workaround for ImportErrors and such.
The same procedure can be used for Windows installations of LibreOffice/OpenOffice.
You should have a
pip.exe in the
OpenOffice4.x\program\ folder already. Else use
get-pip.py from https://bootstrap.pypa.io/ with the