# Path: floyd/core/multiopt.py
#     def gettext(message):
#   def __init__(self,
#                indent_increment=2,
#                max_help_position=24,
#                width=None,
#                short_first=1):
#   def set_parser(self, parser):
#   def format_description(self, description):
#   def format_usage(self, usage):
#   def format_heading(self, heading):
#   def command_help_long(self):
#   def command_help_short(self):
#   def __init__(self,
#                  usage=None,
#                  option_list=None,
#                  version=None,
#                  description=None,
#                  add_help_option=True,
#                  prog=None,
#                  epilog=None,
#                  commands=[]):
#   def error(self, msg):
#   def exit(self, status=0, msg=None):
#   def print_version(self, file=None):
#   def print_help(self, file=None):
#   def print_cmd_error(self, errstr=None):
#   def print_exec_error(self, errcmd=None, errstr=None):
#   def _print_err(self, errstr=""):
#   def print_lax_help(self):
#   def _process_args(self, largs, rargs, values):
#   def __init__(self,
#                  usage=None,
#                  option_list=None,
#                  version=None,
#                  description=None,
#                  add_help_option=True,
#                  prog=None,
#                  epilog=None,
#                  help_short=None,
#                  help_long=None,
#                  cmdname=None):
#   def print_exec_error(self, errcmd=None, errstr=None):
#   def print_help_long(self):
#   def format_help_long(self):
#   def _print_err(self, errstr=""):
#   def _print(self, helpstr, file=None):
#   def __init__(self, header=None, footer=None, options=None, cmdname=None):
#   def set_cmdname(self, cmdname):
#   def get_parser(self, clsname, version, global_options):
#   def __init__(self, func=None, usage=None, desc_short='', options=[], arguments=[], desc_long='', common=True, header=None, footer=None):
#   def __call__(self, func):
#   def __init__(self, command_set={}, argv=[], clsname='', version='', 
#                desc_short="", global_options=[], add_help=False, 
#                add_version=False, footer=None):
#   def _attach_help_command(self):
#   def _attach_version_command(self):
#   def autocomplete(self):
#   def run(self):
# class CommandError(Exception): pass
# class ArgumentError(Exception): pass
# class OptionError(Exception): pass
# class MultioptHelpFormatter(optparse.HelpFormatter):
# class MultioptOptionParser(optparse.OptionParser):
# class SubcommandParser(optparse.OptionParser):
# class BaseCommand(object):
# class SubCommand(BaseCommand):
# class MultioptParser(object):


import os
import sys
import logging
import floyd.core.commands
from floyd.core.multiopt import MultioptParser, SubCommand, make_option
    usage='%prog [options] deploy <directory>',
    desc_short='Deploy a site',
    desc_long="""""",
    options=[
    ]),

  'serve': SubCommand(
    func=floyd.core.commands.serve,
    usage='%prog [options] serve <directory>',
    desc_short='Run local server instance',
    desc_long="""""",
    options=[
      make_option('-p', action="store", default='8080', type="int", dest="port"),
      make_option('-H', '--host', action="store", default='localhost', type="string", dest="host"),
    ]),
  # 
  # 'watch': SubCommand(
  #   func=floyd.core.commands.watch,
  #   usage='%prog [options] watch <directory>',
  #   desc_short='Watch site and auto-deploy on publish',
  #   options=[
  #     make_option('-S', action="store_true", dest="onsave", help="deploy on save"),
  #   ]),
}


def run_cl(argv=[]):
  logging.basicConfig(level=logging.INFO)
  
  try:

# Path: floyd/core/multiopt.py
#     def gettext(message):
#   def __init__(self,
#                indent_increment=2,
#                max_help_position=24,
#                width=None,
#                short_first=1):
#   def set_parser(self, parser):
#   def format_description(self, description):
#   def format_usage(self, usage):
#   def format_heading(self, heading):
#   def command_help_long(self):
#   def command_help_short(self):
#   def __init__(self,
#                  usage=None,
#                  option_list=None,
#                  version=None,
#                  description=None,
#                  add_help_option=True,
#                  prog=None,
#                  epilog=None,
#                  commands=[]):
#   def error(self, msg):
#   def exit(self, status=0, msg=None):
#   def print_version(self, file=None):
#   def print_help(self, file=None):
#   def print_cmd_error(self, errstr=None):
#   def print_exec_error(self, errcmd=None, errstr=None):
#   def _print_err(self, errstr=""):
#   def print_lax_help(self):
#   def _process_args(self, largs, rargs, values):
#   def __init__(self,
#                  usage=None,
#                  option_list=None,
#                  version=None,
#                  description=None,
#                  add_help_option=True,
#                  prog=None,
#                  epilog=None,
#                  help_short=None,
#                  help_long=None,
#                  cmdname=None):
#   def print_exec_error(self, errcmd=None, errstr=None):
#   def print_help_long(self):
#   def format_help_long(self):
#   def _print_err(self, errstr=""):
#   def _print(self, helpstr, file=None):
#   def __init__(self, header=None, footer=None, options=None, cmdname=None):
#   def set_cmdname(self, cmdname):
#   def get_parser(self, clsname, version, global_options):
#   def __init__(self, func=None, usage=None, desc_short='', options=[], arguments=[], desc_long='', common=True, header=None, footer=None):
#   def __call__(self, func):
#   def __init__(self, command_set={}, argv=[], clsname='', version='', 
#                desc_short="", global_options=[], add_help=False, 
#                add_version=False, footer=None):
#   def _attach_help_command(self):
#   def _attach_version_command(self):
#   def autocomplete(self):
#   def run(self):
# class CommandError(Exception): pass
# class ArgumentError(Exception): pass
# class OptionError(Exception): pass
# class MultioptHelpFormatter(optparse.HelpFormatter):
# class MultioptOptionParser(optparse.OptionParser):
# class SubcommandParser(optparse.OptionParser):
# class BaseCommand(object):
# class SubCommand(BaseCommand):
# class MultioptParser(object):


# Path: floyd/core/command_utils.py
import os
import sys
import logging
import floyd.core.commands
from floyd.core.multiopt import MultioptParser, SubCommand, make_option

    usage='%prog [options] deploy <directory>',
    desc_short='Deploy a site',
    desc_long="""""",
    options=[
    ]),

  'serve': SubCommand(
    func=floyd.core.commands.serve,
    usage='%prog [options] serve <directory>',
    desc_short='Run local server instance',
    desc_long="""""",
    options=[
      make_option('-p', action="store", default='8080', type="int", dest="port"),
      make_option('-H', '--host', action="store", default='localhost', type="string", dest="host"),
    ]),
  # 
  # 'watch': SubCommand(
  #   func=floyd.core.commands.watch,
  #   usage='%prog [options] watch <directory>',
  #   desc_short='Watch site and auto-deploy on publish',
  #   options=[
  #     make_option('-S', action="store_true", dest="onsave", help="deploy on save"),
  #   ]),
}


def run_cl(argv=[]):
  logging.basicConfig(level=logging.INFO)
  
  try:

    app = MultioptParser(