On Sat, Oct 25, 2003 at 09:34:49PM -0700, James Britt wrote:

> Welcome back.

=)

> >Lately I have become interested in the OpenOffice.org project, and am 
> >fairly active in the users mailing list.  I have seen several requests for 
> >a program that can search for text inside OpenOffice.org files.
[snip]
> 
> Thanks.  You'll be saving me some trouble. :)
> I was looking at the XML files the other night, thinking what would be 
> involved in writing a Ruby lib to work with them.

That's a thought.  I was thinking of a stand-alone program though.  In 
particular, I was thinking of an implementation of "grep" that took .sxw 
files as input instead of text files.

> >Are there any suggestions on the best way to approach this?
[snip]
> 
> There is a slick NSIS editor[1] that makes things much easier, and I can 
> give you hand if you like, as I've spent a bit of time using the 
> installer and the editor.

Thanks, that's a great idea.
There wouldn't be very many dependencies.  Just ruby and the three 
libraries.  The XML libraries are just ruby files.  They don't have to be 
compiled.

I guess that now I have to figure out the best way to extract a file from a 
zip archive.  I couldn't get ruby-zlib to compile.

I am running ruby 1.8.0 under Solaris 2.8.

ruby-zlib-0.6.0 $ ruby extconf.rb  
checking for deflateReset() in -lz... yes
checking for zlib.h... yes
checking for rb_block_given_p()... yes
checking for rb_str_buf_new()... yes
checking for rb_io_print()... yes
checking for rb_io_printf()... yes
checking for rb_io_puts()... yes
checking for rb_io_addstr()... yes
checking for rb_define_alloc_func()... yes
checking for rb_undef_alloc_func()... yes
checking for kind of operating system... Unix
creating Makefile
ruby-zlib-0.6.0 $ gmake
gcc -fPIC -g -O2 -I. -I/home3/dcarrera/lib/ruby/1.8/sparc-solaris2.8 
-I/home3/dcarrera/lib/ruby/1.8/sparc-solaris2.8 -I. -DHAVE_ZLIB_H 
-DHAVE_RB_BLOCK_GIVEN_P -DHAVE_RB_STR_BUF_NEW -DHAVE_RB_IO_PRINT 
-DHAVE_RB_IO_PRINTF -DHAVE_RB_IO_PUTS -DHAVE_RB_IO_ADDSTR 
-DHAVE_RB_DEFINE_ALLOC_FUNC -DHAVE_RB_UNDEF_ALLOC_FUNC  -DOS_CODE=OS_UNIX -c 
zlib.c
zlib.c:107: parse error before `NORETURN'
zlib.c:107: warning: data definition has no type or storage class
gmake: *** [zlib.o] Error 1


Any thoughts?f

Cheers,
-- 
Daniel Carrera    | OpenPGP KeyID: 9AF77A88
PhD grad student. | 
Mathematics Dept. | "To understand recursion, you must first
UMD, College Park | understand recursion".