Find file
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (28 sloc) 1.2 KB


A simple command-line utility to convert Google Code wiki markup to HTML using wikiwm, a JavaScript Google Code wiki library.


You'll need node and npm.

Once you've got those:

npm install -g gcw2html


You can pass in a file...

$ gcw2html

or you can read from STDIN

$ cat | gcw2html

and you'll get HTML out!

Want to save the output to a file? Just redirect!

$ gcw2html > filename.html

Converting Google Code wiki markup to markdown

I originally wrote this in the process of transferring a moderately-sized wiki from Google Code to GitHub. For those in similar boat, here's how I did that using too many tools and the joys of the unix pipe.

You'll need:

  • gcw2html
  • pandoc
  • ruby (or some other language) to do the final regexp bit in

Conversion party:

gcw2html \
  | pandoc --from html --to markdown --no-wrap \
  | ruby -e 'puts STDIN.readlines.to_s.gsub(/\[([^\]]*)\]\(http:\/\/code\.google\.com\/p\/[^\/]*\/wiki\/([^\)]*)\)/,"[[\\1 | \\2]]")'