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

# For python 2 compatibility
from __future__ import unicode_literals
import optparse
import gitli


if __name__ == '__main__':
    parser = optparse.OptionParser(
        usage="""Usage: git-li <command> [command-options]

Commands:
  init                      Initialize the git repositoryto use git-li
  list <PATTERN...>         List issues for this repository
  new  [--edit] <TITLE>     Create a new issue for this repository
  show <NUMBER>             Show the given issue
  edit <NUMBER>             Edit the given issue
  reopen <NUMBER>           Reopen the given issue
  remove <NUMBER>           Remove the given issue (removes all info)
  milestone                 Show the current milestone
  milestone [--up] <MILE>   Set the current milestone
  close <NUMBER>            Close the given issue

A few examples:
  git li init

  git li new 'My First Issue'

  git li close 1

  git li list open task 0.1
  
Aliases:
  git li new|add|open
  git li remove|delete""")

    #comment     Add a comment to the given issue (todo)

    parser.add_option("-e", "--edit",
            action="store_true",
            dest="edit",
            default=False,
            help='change issue type and milestone when adding a new issue.')

    parser.add_option("-u", "--up",
            action="store_true",
            dest="up",
            default=False,
            help='Move all the open issues to the next milestone specified by'\
                 ' the milestone command.')

    (options, args) = parser.parse_args()
    gitli.main(options, args, parser)
