Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 51 lines (28 sloc) 1.231 kb
d42ed35 Reid Beels Added README content
authored
1 # gcw2html
2
3 A simple command-line utility to convert Google Code wiki markup to HTML
56bca2e Reid Beels Fixed broken link to wikiwym.
authored
4 using [wikiwm](http://code.google.com/p/wikiwym/), a JavaScript Google Code wiki
d42ed35 Reid Beels Added README content
authored
5 library.
6
7 ## Instalation
8
9 You'll need [node](http://nodejs.org/) and [npm](http://npmjs.org).
10
11 Once you've got those:
12
13 npm install -g gcw2html
14
15 ## Usage
16
17 You can pass in a file...
18
f283d4f Reid Beels Added explanation about converting google code wikis to markdown for git...
authored
19 $ gcw2html filename.wiki
20
21 or you can read from STDIN
22
23 $ cat filename.wiki | gcw2html
24
25 and you'll get HTML out!
26
27 Want to save the output to a file? Just redirect!
28
29 $ gcw2html filename.wiki > filename.html
30
31
32 ## Converting Google Code wiki markup to __markdown__
33
34 I originally wrote this in the process of transferring a moderately-sized
35 wiki from Google Code to GitHub. For those in similar boat, here's how I
36 did that using too many tools and the joys of the unix pipe.
37
38 You'll need:
39
40 * gcw2html
41 * [pandoc](http://johnmacfarlane.net/pandoc/installing.html)
42 * ruby (or some other language) to do the final regexp bit in
43
44 Conversion party:
45
46 gcw2html filename.wiki \
47 | pandoc --from html --to markdown --no-wrap \
48 | ruby -e 'puts STDIN.readlines.to_s.gsub(/\[([^\]]*)\]\(http:\/\/code\.google\.com\/p\/[^\/]*\/wiki\/([^\)]*)\)/,"[[\\1 | \\2]]")'
d42ed35 Reid Beels Added README content
authored
49
50
Something went wrong with that request. Please try again.