I am creating a few documents in Libre office and I have to always send them as .pdf
.
but each and every time I forget to export it as pdf , So is there any way to auto convert the .odt
document into pdf
every time I save the document ?
I have only about 4 docs , I keep making changes on them , So each and every time I make a change and save the odt
I need that change to be updated in the corresponding pdf file .
Ps : I understand that unoconv
can be used to convert via command line but is there a way to automatically do it ?
Another Ps : I found out that there is something called inotify and inotify-tools and that can be used to trigger events when a file changes . But I have no idea on how to use it .
Best Answer
A quick and dirty example using code from the pyinotify project [http://github.com/seb-m/pyinotify]
You will need to change the WATCHED_DIR to your directory containing ODT files. Also remember to install unoconv first.
Save this as odtwatcher.py and then run it in the background