respec2html command line utility

Hi,

I wrote a small command line utility for converting a ReSpec source file into a static HTML snapshot. It should be especially helpful for editors who are maintaining both the source .src.html and .html snapshots of Editor's Drafts that are updated frequently.

If you want to give it a spin, here's how:

Install PhantomJS:
  
  http://phantomjs.org/download.html

Grab the respec2html.js script:

  http://darobin.github.com/respec/tools/respec2html.js

Then you can say, assuming Overview.src.html is your source, and Overview.html is the static snapshot you want to create:

  $ /path/to/bin/phantomjs /path/to/respec2html.js Overview.src.html Overview.html

You may want to alias this for convenience, and define something like the following in the config file of your shell (in OS X, that'd likely be ~/.profile):  

  alias respec2html='/path/to/bin/phantomjs /path/to/respec2html.js'

And this will work:

  $ respec2html Overview.src.html Overview.html 
  Loading Overview.src.html
  Loading https://www.w3.org/StyleSheets/TR/W3C-ED
  Loading https://www.w3.org/Icons/w3c_home
  Loading http://www.w3.org/StyleSheets/TR/logo-ED
  Serializing the DOM into HTML...
  Overview.html created!

Enjoy!

-Anssi

Received on Thursday, 21 February 2013 18:31:24 UTC