.doc to wiki page ?

442 views
Skip to first unread message

Falk

unread,
Mar 17, 2008, 4:04:16 AM3/17/08
to Trac Users
Hi,

I've got some MS Word files (.doc) that I want to convert in wiki
format. Is there a converter? The Word file just contains simple text,
titles, simple tables, lists and embedded images. Everything that a
wiki page offers as well. The advantage of wiki page is for me to have
the history of changes which we make in the future. To put the Word
files in SVN doesn't make sense to me since .doc is a binary format
and diffs can't easily be displayed in the source browser of trac.

Cheers, Falk

Simon Martin

unread,
Mar 17, 2008, 6:43:45 AM3/17/08
to Trac Users
Hi,

I'd need such a converter, too. My ugly workaround is putting the old
doc files of our documentation in SVN and use TortoiseSVN to compare
versions etc. I don't like it, but I don't want to convert all the old
Word docs by hand into trac.

At least there exists a Word2MoinMoin converter (http://moinmo.in/
MicrosoftWordConverter) and a Moin2trac script (http://trac-hacks.org/
wiki/MoinToTracScript).
I've never used it and it's probably not very comfortable, but you can
try.

BR,
Simon

Jani Tiainen

unread,
Mar 17, 2008, 7:17:28 AM3/17/08
to trac-...@googlegroups.com
Simon Martin kirjoitti:

At least back in old days There was "save as html" and "save as rtf"
available that worked somewhat well. Except HTML was something awful.

AFAIK there is limited ability to paste text from word to that WYSIWYG
editor while keeping formating.

--
Jani Tiainen

Steve Romanow

unread,
Mar 17, 2008, 12:40:29 PM3/17/08
to trac-...@googlegroups.com

--- Simon Martin <simon.j...@gmail.com> wrote:

>
> At least there exists a Word2MoinMoin converter (http://moinmo.in/
> MicrosoftWordConverter) and a Moin2trac script (http://trac-hacks.org/
> wiki/MoinToTracScript).
> I've never used it and it's probably not very comfortable, but you can
> try.
>
> BR,
> Simon
>
>

I was over at Maluke.com to look at their S3 backup soln and saw they have a
Word to HTML converter that apparently can run in batch mode.

I bet its python.

Its not a free app, but it appears to ba a soln.

Steve

jpjoyal

unread,
Mar 18, 2008, 11:30:03 AM3/18/08
to Trac Users
TracWysiwygPlugin (http://trac-hacks.org/wiki/TracWysiwygPlugin) allow
you to copy/paste from word and works fine with simple formatting.
(even table don't look too bad either) I've tested with Trac 0.11dev-
r5927 and TracWysiwygPlugin r3279

Sure not a batch-mode solution but for as-you-go it's a good helper

On Mar 17, 12:40 pm, Steve Romanow <slestak...@yahoo.com> wrote:

Falk

unread,
Mar 20, 2008, 7:30:34 AM3/20/08
to Trac Users
Hi,
thanks for your hints.
I found out the best is the TracWysiwygPlugin. The standalone macros
are too hard too install, or converting is quite poor.
CU, Falk

Jason Winnebeck

unread,
Mar 20, 2008, 8:24:48 AM3/20/08
to trac-...@googlegroups.com
I've used the attached macro (hopefully it doesn't get marked as an unsafe attachment) with success. It is based on a modified version of a macro found at http://tikiwiki.org/tiki-index.php?page=WordToWiki

Instructions:
# Open Word.
# Open the Visual Basic Editor (Alt+F11).
# Select File → Import File... (Ctrl+M) and select Word2Trac.bas.
# Open a document in Word.
# Run the macro: Tools → Macros → Macros (Alt-F8), select the macro, and press Run.
# The conversion will modify the document in-place (don't save it!) and automatically copy the results to the clipboard.
# Paste the markup into Trac and clean up the markup in whatever way necessary.

I've also used the TracWysiwygPlugin to copy/paste the document. It works decently with most formatting, although it generates horrible and often broken wiki where it adds extra BRs for no reason, adds loads of extra spaces (which doesn't affect output but affects source), and sometimes deletes the spaces between words making a huge runon word.

I usually use the wysiwyg plugin to paste and then correct the output by hand, but I use the macro too sometimes, which works usually perfectly for the content that it supports.

Jason

--‾--‾---------‾--‾----‾------------‾-------‾--‾----‾
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-...@googlegroups.com
To unsubscribe from this group, send email to trac-users-...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-‾----------‾----‾----‾----‾------‾----‾------‾--‾---

Word2Trac.zip

Jason Winnebeck

unread,
Mar 20, 2008, 8:29:41 AM3/20/08
to trac-...@googlegroups.com
OK, the attachment doesn't work so I put the file at
http://gillius.org/Word2Trac.bas. I'll host it there temporarily for
awhile (but not forever).

Also I have no clue why the last mail came out as HTML when I sent
plaintext. I apologize for that.

Jason Winnebeck

Falk

unread,
Mar 20, 2008, 8:41:41 AM3/20/08
to Trac Users
Hi Jason,
the attachment has worked for me (TM). But on trying your macro it
always stops at ThisDocument.SelectAllEditableRanges which is unknown
here.

And, can your macro handle such structure?:
- listitem1. Text is blabla
- listitem2. Text is blablabla.
This means:
- listitem2.1
- listitem2.2
And moreover blablabla...
- listitem3. text...

Most macros I've seen cannot handle the line "And moreover
blablabla..." correctly, but break the outer list there.

Cheers, Falk


On 20 Mrz., 13:29, "Jason Winnebeck" <jpw...@rit.edu> wrote:
> OK, the attachment doesn't work so I put the file athttp://gillius.org/Word2Trac.bas. I'll host it there temporarily for

Jason Winnebeck

unread,
Mar 20, 2008, 10:13:40 AM3/20/08
to trac-...@googlegroups.com
OK, so my attachment went out, but the filters on the e-mail server took
off the attachment when I received it back on the list. I'm glad others
got it.

Well I didn't write the original macro, and another member of my team
(who is no longer with us) modified it, just to output Trac format wiki.
I'm not sure the error you are getting with "ThisDocument", but I have
converted many documents and never seen this problem.

I did your example with the macro and it converted it to the following
wiki:

* listitem1. Text is blabla
* listitem2. Text is blablabla.
This means:
* listitem2.1
* listitem2.2
and moreover bababaa
* listitem3

It does not seem to recognize the beginning indent (or any method of
doing blockquote). I tried to convert the sample to Word how I thought
you meant it. It does handle lists without newlines in them with
multiple levels.

Jason

Alec Thomas

unread,
Mar 20, 2008, 11:56:01 AM3/20/08
to trac-...@googlegroups.com
If any of you get this working relatively seamlessly, it'd be nice if
you added a howto to the trac.edgewall.org Wiki.


--
Evolution: Taking care of those too stupid to take care of themselves.

Jason Winnebeck

unread,
Mar 21, 2008, 3:18:37 PM3/21/08
to trac-...@googlegroups.com
I think the real key of your mail is "relatively seamlessly" :). The
TracWysiwygPlugin can sort of get you there, and the macro can get you
there pretty well for most typical documents that only use formatting
that Trac can support. I don't think either method is good enough that
you would consider it a general solution to the problem.

Jason

AmanKow

unread,
Mar 22, 2008, 1:43:18 PM3/22/08
to Trac Users
Well, that macro is a big win for me...

I think my needs are similar to that of most people... getting a bunch
of disparate legacy docs into trac wiki as a one time deal. Then I
can work on them with spending a lot of time dealing with the 99% of
the formatting that is commonly used in word docs.

Does anyone know of a similar macro for excel? I could really use
that!

Wayne

AmanKow

unread,
Mar 23, 2008, 11:39:41 AM3/23/08
to Trac Users
BTW, I tried cutting and pasting from excel to word and then running
word2trac and the macro did a very credible job. But, if anyone knows
of an excel macro that would let me skip that step, I would be
appreciative.

Jason Winnebeck

unread,
Mar 24, 2008, 9:29:35 AM3/24/08
to trac-...@googlegroups.com
Well, one of our developers was tasked with converting a ton of Word
docs into Wiki pages, which he did with wvWare (probably combined with a
perl script to invoke and upload). However, we just converted the
documents to HTML and posted them using HTML Trac wiki processor as we
only cared to have the content for searching and historical display. He
attempted to make a wvWare script to convert directly to Trac, which I
have attached, but it was never used.

The developer's comments on the script:
"a partial, non-working attempt to make wvWare output Trac-Wiki-friendly
text, but there were some problems with lists and whitespace I could not
overcome (all bulleted lists would have to be manually corrected, and
vertical whitespace would need to be manually or automatically
corrected)."

For Excel, I noticed that when you copy/paste from or to Excel, that it
works with tab separated values. I wrote a Python macro (used as a wiki
processor) so you can paste an Excel doc or CSV file and it would format
it. There are CSV macros out there already but ours allows for Trac
formatting in the fields. The limitation is that the copy/paste only
works for things where you would expect a CSV to work, a rectangular
table. No Excel formatting nor things like graphs and charts are
preserved. What I mean when I say that it allows for Trac formatting is
that if you put "This is some cell content that has ''italics'' and
links to TracGuide", the italics and TracGuide will come out formatted.

Jason

-----Original Message-----
From: trac-...@googlegroups.com [mailto:trac-...@googlegroups.com]
On Behalf Of AmanKow
Sent: Saturday, March 22, 2008 1:43 PM
To: Trac Users
Subject: [Trac] Re: .doc to wiki page ?

wvTracWiki.xml

AmanKow

unread,
Mar 24, 2008, 11:59:25 AM3/24/08
to Trac Users
On Mar 24, 9:29 am, "Jason Winnebeck" <jpw...@rit.edu> wrote:
[...]
> For Excel, I noticed that when you copy/paste from or to Excel, that it
> works with tab separated values.
[...]
You can paste the table into word as a word table, and have a fully
formatted table ready for word2trac.
Yeah, the inability for me to get the images over was ratty, but I
assumed that was more my inexperience with excel than anything else.
Couldn't seem to highlight graph images to come along with the table.

Anyone have an idea on getting the images into word as well?

Wayne

Jason Winnebeck

unread,
Mar 24, 2008, 5:21:51 PM3/24/08
to trac-...@googlegroups.com
Unfortunately I haven't seen any solution for exporting either direction
that works properly with images. There is a Trac to PDF I saw that
almost works, except that it fails on https sites, which is where I have
my Trac, making that exporter useless.

For going out of Trac, I just copy/paste or "save webpage as" and use
the normal HTML loading features of Office. It's horrible.

Jason

-----Original Message-----
From: trac-...@googlegroups.com [mailto:trac-...@googlegroups.com]
On Behalf Of AmanKow
Sent: Monday, March 24, 2008 11:59 AM
To: Trac Users
Subject: [Trac] Re: .doc to wiki page ?

Falk

unread,
Mar 25, 2008, 4:49:42 AM3/25/08
to Trac Users
Hi,
since all converting macros and stuff cannot convert the following
example - my question is: Can trac wiki handle such structure at all?:

* listitem1. Text is blabla
* listitem2. Text is blablabla.
This means:
* listitem2.1
* listitem2.2
And moreover blablabla...
* listitem3. text...

I've got trac 0.10.4, and the line "And moreover blablabla..." is
wrongly added as new list item to the outer list, although it simply
belongs as text to listitem2.

Cheers, Falk

Norbert Wenzel

unread,
Apr 2, 2008, 9:35:20 AM4/2/08
to Trac Users
On Mar 25, 10:49 am, Falk <fbrettschnei...@baumeroptronic.de> wrote:
> Hi,
> since all converting macros and stuff cannot convert the following
> example - my question is: Can trac wiki handle such structure at all?:
>
> * listitem1. Text is blabla
> * listitem2. Text is blablabla.
> This means:
> * listitem2.1
> * listitem2.2
> And moreover blablabla...
> * listitem3. text...

You can get the desired output by manually adding a linebreak with
[[BR]].

* listitem1. Text is blabla
* listitem2. Text is blablabla.[[BR]]This means:
* listitem2.1
* listitem2.2
And moreover blablabla...
* listitem3. text...

Norbert
Reply all
Reply to author
Forward
0 new messages