I have some jpegs I want to use as background pictures in a libreOffice Impress presentation. But I don't like to add them slide by slide.
Is there a way to use the (Linux) commandline to add the pics into a presentation file?
Something like:
for i in *.jpg; do <add a new slide with that jpg as background to the presentation file>; done
In LibreOffice, go to Tools -> Macros -> Organize Macros -> LibreOffice Basic and add the following macro to
Module1
.Then add an image from the command line like this.
Alternatively, run
python3
from the command line and interact with a listening instance of LibreOffice. This approach is explained at http://christopher5106.github.io/office/2015/12/06/openoffice-libreoffice-automate-your-office-tasks-with-python-macros.html.EDIT:
To run it directly, pass the file path of the image.