[Cialug] OpenOffice ColorFix script (and minor rant)

Josh More MoreJ at alliancetechnologies.net
Thu Nov 18 10:16:17 CST 2010


If any of you are like me, and have spent the last decade of your life asking people not to use freaking red text to highlight and having them ignore you, this may help.

It's only been tested on .docx files that have been opened and saved in OpenOffice .odt files, and there is VAST room for improvement.  (Ideally, it would be a script I could run from within OpenOffice and Firefox... but I don't have time to solve that problem.  (Really, you'd think an addon would exit by now.))


#!/bin/sh
FILE=$1
BASE=`basename $FILE .odt`
mkdir $FILE.dir
cd $FILE.dir
unzip ../$FILE
sed 's/ff0000/0000ff/g' <content.xml >content.xml.out
mv content.xml.out content.xml
zip -r ../$BASE-blue.odt .


It's simple, straightfoward, and completely unnecessary if:

1) People would actually be somewhat considerate
or
2) Developers would take some basic effort to write color accessibility into their freaking stuff






-Josh More, CISSP, GIAC-GSLC, GIAC-GCIH, RHCE, NCLP
morej at alliancetechnologies.net
515-245-7701


More information about the Cialug mailing list