Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index

TomD wrote
Presumably it can be done straight from a command-line without even
needing a "script" as such.

This is an ideal task for a script. Invoking LO to determine ODF version
info is inefficient, especially for multiple files. Here is a basic bash
script to do the task under GNU/Linux:

# extract <office:version> attribute i.e., ODF version
# args: $1 path to search e.g., doc/
#       $2 file extension e.g., sxw odt od*
for f in $1*.$2;
        v=$(unzip -p $f content.xml | xmllint --format - | grep -o
"office:version=[^\>]*" | sed -e 's/office:version=//' -e 's/"//g');
        echo "$f: $v";

View this message in context:
Sent from the Users mailing list archive at

To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.