I have a lot of .odt documents. How can I attach them together without hurting their contents?
Copy and paste in LibreOffice is not safe and may change the format. For example, the position of sliders for lines may be forgotten.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
LibreOffice calls one document made up of many sub-documents a "master document".
Take a look at the tool OOoPy. One of the tools included with this toolset is called
ooo_cat which does what you want.
ooo_cat for concatenating several OOo files into one
After downloading it you can install the tool set like so:
$ python setup.py install
ooo_cat will show up on your
$PATH. Usage is pretty straightforward:
$ ooo_cat --help
Usage: ooo_cat [-o|--output-file ] [file, ...]
Options: -h, --help show this help message and exit -o OUTPUT_FILE, --output-file=OUTPUT_FILE Output file (defaults to stdout)
Say I have this fake document named
out2.odt. I can concatenate it as many times as I want like so:
$ ooo_cat -o new.odt out2.odt out2.odt
$ ls -l new.odt out2.odt -rw-rw-r--. 1 saml saml 10061 Apr 7 21:52 new.odt -rw-rw-r--. 1 saml saml 9816 Apr 7 21:40 out2.odt
Now when we open it up:
$ ooffice new.odt
NOTE: There are 2 copies of
new.odt now. Above is showing the 2 pages side by side for reference.