- linux
- bash
- openoffice/libreoffice
- python
- hands
soffice -headless -nofirststartwizard -accept="socket,host=localhost,port=8100;urp;StarOffice.Service"
sleep 1
test -d 2003||mkdir 2003
find -type f -name "*.docx" -exec python DocumentConverter.py {} {}.doc \;
find -type f -name "*.pptx" -exec python DocumentConverter.py {} {}.ppt \;
mv *.ppt *.doc 2003/
killall soffice.bin
DocumentConverter.py is avaible here.
How to use it:
- Create some folder here you will put your docx/pptx
- Put here DocumentConverter.py and this script
- Put here some docx/pptx files
- Run this script
- Go to folder 2003
- Get your doc/ppt
- ???
- PROFIT!
Also, to clean this folder from temp doc,docx,ppt,pptx files you can use this script:
find -name "*.doc" -exec rm -f {} \;
find -name "*.docx" -exec rm -f {} \;