Hacking OpenOffice
prostoalex writes "Peter Sefton appreciates OpenOffice Writer's open and documented XML format and hence tries to customize and configure OO Writer to his own liking. In the article on XML.com he plays with OpenOffice XML, introduces an XSTL style sheet to a Writer document, creates a keyboard shortcut for applying his own style, and creates a macro."
That's a lot you can do with xsltproc and unzip - but xsltproc is way to neat to call it a hack.1 0/perl/perl.html
Most day-to-day manipulations of Open-Office-Documents can easiely be done with perl:
At the bottom of the article (german) is a listing (Perl)
http://www.linux-magazin.de/Artikel/ausgabe/2004/
069 my $oo_output = File::Temp->new(
070 TEMPLATE => 'ooXXXXX',
071 DIR => '/tmp',
072 SUFFIX => '.sxw',
073 UNLINK => 1,
074 );
075
076 $doc->save($oo_output->filename);
Clippy: I see that you're making a XSTL style sheet to a Writer document. You can't do that with Word. Would you like to:
-> Learn about XSTL?
-> Learn about OpenOffice Writer (boo hiss)?
-> Learn about macros?
-> What is style by Trading Spaces?
-Teiresias
This is old hat. Binary XML is the new way forward. You can embed apps and pif,src, and bat and exe files now into binary XML using Microsoft Word on XP and run them with Active X and .NET and Java. Microsoft invented java and internet.
and xml
The Army reading list
Here at work many of the users are switched over to OO.O except for the producers in the video department.
why? there are no scriptwriting tools for OO.o like there are for Word 97.
there are auto scriptwriter formatting plugins and two column scriptwriting templates and tools that make their life easy.
unfortunatlly nobody has released for sale or even attempted to write the equiliviant for OO.o.
we paid $29.95 to $49.95 each machine for those scriptwriting toolkits, and would happily pay the same for OO.o equiliviants.
but nobody is interested in making them.
Let alone a version of any wordprocessor geared to Scriptwriting. I know there will never ever be a "final draft" for linux released or even an open source project like it ever started. But I at least hold out some hope for scriptwriting tools for Open Office.org to come into existance someday.
Do not look at laser with remaining good eye.
Real man uses [La]TeX!
I wrote a PHP script to do this a while back, here's my post about it:
0 29 828
i ter#results) .
http://slashdot.org/comments.pl?sid=79566&cid=7
It took a OpenOffice Writer file, unzipped it, and replaced specific text with data from my database. It wasn't too difficult, and allowed me to create Template Documents that already had information inside it.
I haven't really used it though, since everyone was happy with PDF files and I use the Pear Class for generating spreadsheets in Excel (http://pear.php.net/package/Spreadsheet_Excel_Wr
I'm sure I'll end up using the script in the future, especially for generating bids, letters, reports, etc.
---
Brandon Petersen
Get Firefox!