#!/usr/bin/python
# -*- coding: utf-8 -*-
# 
# author: javi santana jsantfer@gmail.com
from hgwiki import *

if __name__ == '__main__':
  import sys
  if len(sys.argv) == 2:
    try:
      r = Repo(sys.argv[1])
    except:
      print "current directory is not a mercurial repository"
      sys.exit()
    config('static_root',realpath(sys.argv[1]))
    run()
  else:
    print "usage: python hg-wiki folder"
