#! /usr/bin/env python

import logging
logging.basicConfig(level=logging.INFO, format='%(message)s')

import click
import os
import sys

base_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')
sys.path.extend([base_dir])

# Fixes werkzeug and PyInstaller.
import werkzeug

# Fixes simplejson and PyInstaller.
import json
sys.modules['simplejson'] = json

# Fixes sys.getfilesystemencoding() and PyInstaller.
from watchdog.utils import unicode_paths
unicode_paths.fs_encoding = unicode_paths.fs_fallback_encoding

from grow import commands


@click.group()
def grow():
  """The Grow SDK: a declarative, file-based CMS for building high-quality web sites.
  See documentation at: http://growsdk.org."""


commands.add(grow)


if __name__ == '__main__':
  grow()
