Tools - Amourspirit/live-libreoffice-python GitHub Wiki

Command Line Tools

The development environment comes with a few command line tools that are useful for development.

GitGet

gitget is a command line tool that allows you to download folders from GitHub. It is useful for downloading folders from GitHub without having to clone the entire repository.

Starting in our project example folder of the root directory of the project.

gitget 'https://github.com/Amourspirit/python-ooouno-ex/tree/main/ex/auto/draw/odev_bezier_builder'

Results in:

A    odev_bezier_builder/README.md
A    odev_bezier_builder/bezier_builder.py
A    odev_bezier_builder/start.py
Checked out revision 550.
$ cd odev_bezier_builder/
$ ls -l
total 16
-rw-rw-rw- 1 root root 1029 Jul 20 15:24 README.md
-rw-rw-rw- 1 root root 6346 Jul 20 15:24 bezier_builder.py
-rw-rw-rw- 1 root root  757 Jul 20 15:24 start.py

OooDev CLI Help

OooDev CLI Help is a command line tool that allows you to access the OooDev online help from the command line via various options search options This makes it easy to access the online help from the command line without having to navigate to the online help and search for the information you are looking for.

The following example show how to use the odh command line tool to search for information on the Write.append method. Then the user is presented with a list of options to choose from. The user can then choose the option they want by entering the number of the option they want to choose. This will lauch the online help in the default browser the the selected help page from the choices presented.

odh hlp -s "Write.append"

Choose an option (default 1):
[0],  Cancel (or press q followed by enter)
[1],  ooodev.office.write.Write.append                                 - method     - py
[2],  ooodev.office.write.Write.append_date_time                       - method     - py
[3],  ooodev.office.write.Write.append_line                            - method     - py
[4],  ooodev.office.write.Write.append_para                            - method     - py

LO-DEV-SEARCH

The lo-dev-search is a set of command line tools that allow you to search the LibreOffice API and offers other LibreOffice command line related tools.

LOAPI

The loapi command line tool is a way to search for that name and link to the online help for the LibreOffice API. It is similar to OooDev CLI Help in that it displays a list of options to choose from. The user can then choose the option they want by entering the number of the option they want to choose. This will lauch the online help in the default browser the the selected help page from the choices presented.

LOPROC

loproc is a command line tool that allows you to check if the LibreOffice process is running and kill the process if it is running.

While developing/debugging code, it's quite easy to inadvertently trigger a runtime exception in the Office API. In the worst case, this can cause your program to exit without shutting down the soffice process.

loproc --running show if the process is running.

loproc --kill kills the process if it is running.

There is no issue running loproc --kill without running loproc --running.

See lo-dev-search for docs more information.

Other Resources

See: Console