Script osplit allows to split an ODT file into sub-files, based on page breaks associated with a page style.
It means that, everytime a page break is encountered in the document, that mentions a page style, a new sub-document will be created.
osplit has been ordered by an organisation using Appy since many years. They are using it in the context of a webapp that generates letters. Via a main pod template containing a do... from pod statement, the generated pod result is a unique odt file containing hundreds of letters. Recently, a new requirement was to generate a digital signature on each of these individual letters. Once the unique odt pod result has been generated, script osplit is called to split it in as many individual letters are to be found in the document. Within the unique odt, everytime a new letter is dumped, a page break is inserted, tied to a page style: this is why such break has been chosen for the split.
Reference
All program options are documented hereafter.
usage: osplit.py [-h] path
Splits an ODT document into sub-documents
positional arguments:
path is the path to the odt file to split. Splitted sub-files will be
created in the same folder as the file to split. A sequence
number will be added to the name of each splitted file. For
example, if the file named /a/b/file.odt is splitted into 2
files, these latters will be created as /a/b/file.1.odt and
/a/b/file.2.odt.
options:
-h, --help show this help message and exit