You are not logged in.
Hi
I have already made a file in odt format, with header and footer.
I have many text files and want to convert to odt file, with every file having the above format using:
soffice --headless --convert-to odt file.txt
Can I accomplish this task in bash? It will save a lot of manual copy paste!
Thanks in advance!
OS: Arch &/ Debian
System: LENOVO ThinkPad E14
Desktop: Xfce
Offline
You'll probably need unoconv (in extra) in addition to libreoffice and you have to save your template document as a real template (ott)
unoconv -f odt -t template.ott -o result.odt file.txt
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Hi
It works. Thanks a lot.
But it only copies the header and footer.
If I want to copy a designed table with contents, it doesnt.
Thankyou
OS: Arch &/ Debian
System: LENOVO ThinkPad E14
Desktop: Xfce
Offline
You have tables in your text files? Then maybe use something like pandoc or markdown to convert it to an intermediate format first like html. pandoc might be able to directly create an odt file, but I don't know how that would work with templates.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Hi
No. I have tables in my reference format odt file!
Thankyou
OS: Arch &/ Debian
System: LENOVO ThinkPad E14
Desktop: Xfce
Offline