OpenOffice.org Optimizer
Javier Barroso
javibarroso at gmail.com
Sat Jun 24 18:13:16 BST 2006
Hi Joel,
After read your script, i rewrite it , more short (only a find command and
using perl):
#/bin/bash
openoffice_dir="/usr/lib/openoffice"
find $openoffice_dir -type f -exec sh -c "if file {} | grep -q \"XML
document text\"; then
echo \"Optimize {} ...\"
perl -i -e \"
while ( <> )
{
s/\n/ /;
next if (/^[ \t]*$/);
s/^[ \t]*//;
s/>[ \t]*</></g;
s/[ \t]*$//;
print $_;
}
\" {} ; fi " \;
XML files should be human readable and this optimize should be do with a
better parser, isn't is ?
You should exclude many files like png, gz ... that you know that aren't
XML:
find $openoffice ! -name "*png" -name "*gz" ...
On 5/11/06, Joel Bryan T. Juliano <joelbryan.juliano at gmail.com> wrote:
>
> On Wed, 2006-05-10 at 23:33 -0700, Keith Curtis wrote:
> >
> >
>
> I found alot of differences in our file structure,
> what version of OpenOffice are you using. And what distro.
>
> I got openoffice.org 2.0.2-2ubuntu5, and using Dapper with the latest
> updates. (as of Thursday, May 11, 2006)
>
> > On 5/10/06, Joel Bryan T. Juliano <joelbryan.juliano at gmail.com> wrote:
> > On Wed, 2006-05-10 at 22:58 -0700, Keith Curtis wrote:
> > > You should tell us how much smaller your files are
> > >
> >
> > I got 226092 when I du in /usr/lib/openoffice
> >
> > Don't have a comparison of the original space, my XML's is
> > already
> > changed. Can you tell me what do you got (if you have not yet
> > executed
> > the script).
> >
> > JB
> >
> > > On 5/10/06, Joel Bryan T. Juliano
> > <joelbryan.juliano at gmail.com> wrote:
> > > Hi,
> > >
> > > I made another script that will optimize all the XML
> > database
> > > OpenOffice.org 2.0 use, (847 to be exact).
> > >
> > > Sorry, no backup method for your configs yet, coz
> > it'll take
> > > up more
> > > than 50 MB of my disk space, and I don't have that
> > enough free
> > > space :-)
> > > But I tried it and nothing b0rked. But if your in
> > doubt, just
> > > backup
> > > your /usr/lib/openoffice directory. (that's >200MB)
> > >
> > > The significant effect will be felt when your inside
> > > OpenOffice.
> > > Everything is snappier, and very responsive. The
> > menus appear
> > > instantanously and spellcheck's suggested words is
> > very
> > > snappy.
> > > But I can't feel any difference in loading times. I
> > think
> > > there's just a
> > > small difference.
> > >
> > > I can say it feels more like Microsoft Office when
> > your inside
> > > the
> > > application. :-)
> > >
> > > attachment: openoffice-optimizer
> > >
> > > JB
> > > --
> > > Joel Bryan T. Juliano <joelbryan.juliano at gmail.com>
> > >
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.2.2 (GNU/Linux)
> > >
> > > iD8DBQBEYs/55tf3ds5t46cRAkdXAJ9X+TmGCl5TgJsIEz
> > > +qoiqa1OlwcgCdFIOm
> > > cv3ZXftry0RdFEH8t3xP0kA=
> > > =6RQ2
> > > -----END PGP SIGNATURE-----
> > >
> > >
> > > --
> > > ubuntu-devel mailing list
> > > ubuntu-devel at lists.ubuntu.com
> > >
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
> > >
> > >
> > >
> > >
> > --
> > Joel Bryan T. Juliano <joelbryan.juliano at gmail.com>
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.2.2 (GNU/Linux)
> >
> > iD8DBQBEYthR5tf3ds5t46cRAnYOAJ9/Im1elWsheLuFydLjxsvuDUZHvACdGdKw
> > BehetWPTc3okbtqEaDDArho=
> > =5Iut
> > -----END PGP SIGNATURE-----
> >
> >
> >
> --
> Joel Bryan T. Juliano <joelbryan.juliano at gmail.com>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
>
> iD8DBQBEYuNV5tf3ds5t46cRAosuAJ9xzI+u5jiQ79GN58x5uXCp/r20PACeI7+J
> BPNpj7NpsaYQM2I2SzVDa4Y=
> =eYgr
> -----END PGP SIGNATURE-----
>
>
> --
> ubuntu-desktop mailing list
> ubuntu-desktop at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-desktop/attachments/20060624/40b45715/attachment.htm
More information about the ubuntu-desktop
mailing list