#!/usr/bin/env python
import sys
import github_watcher

help = """
Available commands are:

  github-watcher [run|config|help]

    - run     Runs the daemon. Watches files and alerts when there is
              a pull request of interest.
    - config  Convenience tool to help you configure the watcher. You
              can add line ranges or directories, update the API url,
              or add new files to watch.
    - help    Displays this message and exits.
"""

if len(sys.argv) != 2 or sys.argv[1] not in ('run', 'config'):
  print help
  sys.exit(1)
else:
  if sys.argv[1] == "run":
    import github_watcher.run
    github_watcher.run.main()
  else:
    import github_watcher.config
    github_watcher.config.main()
