Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A simple command-line utility to convert Google Code wiki markup to HTML using wikiwm, a JavaScript Google Code wiki library.
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md
gcw2html.js
package.json

README.md

gcw2html

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

Instalation

You'll need node and npm.

Once you've got those:

npm install -g gcw2html

Usage

You can pass in a file...

$ gcw2html filename.wiki

or you can read from STDIN

$ cat filename.wiki | gcw2html

and you'll get HTML out!

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

$ gcw2html filename.wiki > 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 filename.wiki \
  | pandoc --from html --to markdown --no-wrap \
  | ruby -e 'puts STDIN.readlines.to_s.gsub(/\[([^\]]*)\]\(http:\/\/code\.google\.com\/p\/[^\/]*\/wiki\/([^\)]*)\)/,"[[\\1 | \\2]]")'
Something went wrong with that request. Please try again.