Armin Roehrl wrote:

> Hi all,
> 
>    I truly hate word, but a friend of mine running rublog in his office
> thinks that rublog would get more acceptance if people could use
> their word documents instead of the current .rdocs.
> 
> I first thought of exporting an uploaded word doc into .html and letting 
> people
> reimport the .html if they want to make any changes.
> 
> Does anybody have a better idea?

Tell them them to use OpenOffice?

:)


I had been using Word with Blogtari, with VBA code to handle automatic 
saving/conversion to plain text, followed by an HTTP post to the blog 
server.  It was sort of slick, prompting the user (me) with a form 
showing the blog entry, title, and posting URL, giving the option of 
posting the entry or going back to edit it.

It sort of fell by the wayside, as I added in some metaWeblog API 
support to Blogtari and started using w.bloggar or vim+ftp  to write 
entries.  But, in general, if a blog tool supports a known and 
"standard" XML-RPC API such as metaWeblog or blogger, then writing VBA 
to do the post shouldn't be that hard. (Might even exist someplace.)

Except, of course, you're writing VBA not Ruby.  (If anyone knows how to 
get Word to execute Ruby code much as it does VBA, please speak up.  If 
there were a general-purpose blog posting tool for Word, then it would 
have no specific relation to Ruby, but if it were written in Ruby, then 
it might be a way to get Ruby installed on more machines.  I have some 
ideas on how one might do this, but they're hacky.)

The idea of allowing a blog to support a native word processing format 
seemed like a nice idea, so I wrote a converter class for Blogtari so 
that one could upload OOo *.sxw files.

An example:
http://www.blogtari.com/index.rb/Development@A%20Not-Quite%20Roadmap.sxw
(Which now reminds me to get back to wrapping up some things ...)

Writing the same for rublog should be simple.  Getting people to switch 
from Word to OOo maybe less so.

A problem with using Word to generate HTML is that the resulting HTML is 
crap.  If one were ambitious, they could write VBA code to walk the Word 
doc and emit rdoc or textile or something similar.  Not that hard, 
really; I've got similar code for turning Word into XML floating around.

Probably here:
http://www.jamesbritt.com/code/ProVb6XmlBookCode.zip

James