Sort data in LibreOffice Writer
Peter Flynn
peter at silmaril.ie
Thu Feb 24 20:38:16 UTC 2022
On 24/02/2022 14:48, M. Fioretti wrote:
> On Thu, Feb 24, 2022 13:49:02 PM +0100, Liam Proven wrote:
>> On Thu, 24 Feb 2022 at 13:20, Marco Fioretti <mfioretti at nexaima.net> wrote:
>>
>>> the ODF processing techniques in the link I already shared would
>>> make it automatic though. Once one has written the right script,
>>> of course. Takes time all the same, but less boring, less
>>> error-prone.
>>
>> I have never done macro scripting in LO.
>
> Whether it is the best solution ALSO for the specific situation of the
> OP, is another matter. BUT...
>
> What I shared is NOT macro scripting at all. It does not even require
> LO/OO installed. It's good old BASH/Perl/Python scripting and nothing
> more. That's the beauty and power of it. Read my posts and try that
> approach, you'll like it.
This is exactly what we do in most cases. We have systems running which
generate Word documents on the client's web server and send them to
their users.
Back to the sorting problem proof-of-concept. I pulled up a book we
typeset some years ago which was all done in Libre Office, and used the
custom style "Chapter Title" for the text:p element containing the title
of each chapter. Three templates in XSLT3 are all that is needed, using
group-starting-with to sort the chapters alphabetically by title and
output the content.xml so that it can be freshened in the .odt file.
> And if you do, and want to share how you did it, contact me off list
> for a guest post!
I'm not sure it's worth sharing but I'll mail you off-list as you suggest.
Peter
More information about the ubuntu-users
mailing list