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:

#!/bin/bash
# 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;
    do 
        v=$(unzip -p $f content.xml | xmllint --format - | grep -o
"office:version=[^\>]*" | sed -e 's/office:version=//' -e 's/"//g');
        echo "$f: $v";
    done;




--
View this message in context: 
http://nabble.documentfoundation.org/ODF-1-x-vs-1-2-tp4101348p4101478.html
Sent from the Users mailing list archive at Nabble.com.

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to