#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
    blohg
    ~~~~~

    Main blohg command-line interface, useful for run the local server.

    :copyright: (c) 2010 by Rafael Goncalves Martins
    :license: GPL-2, see LICENSE for more details.
"""

import os, sys

# if we have a '..blohg' package available, we should use it instead of the
# system-wide package
_root_dir = os.path.join(
    os.path.dirname(os.path.abspath(__file__)), '..'
)
if os.path.isdir(os.path.join(_root_dir, 'blohg')):
    sys.path.insert(0, _root_dir)

from blohg.script import create_script

if __name__ == '__main__':
    create_script().run()
