# Path: handroll/commands/base.py
# class Command(object):
#     """A command class with the minimal interface required for each command."""
# 
#     name = 'command'
#     description = 'the command description'
#     help = 'the command help'
# 
#     def register(self, subparsers):
#         """Register required options.
# 
#         Commands should invoke this method and use the returned parser to
#         add command specific options.
#         """
#         parser = subparsers.add_parser(
#             self.name, description=self.description, help=self.help)
#         parser.set_defaults(func=self.run)
#         return parser
# 
#     def run(self, args):
#         """Run whatever action the command intends."""
#         raise NotImplementedError()
# 
# def finish():
#     print(_('Complete.'))
#     sys.exit()
# 
# Path: handroll/i18n.py

# 
# Path: handroll/scaffolder.py
# BUILTIN_SCAFFOLDS = {
#     'default': _('A complete site to get you going'),
# }
# SCAFFOLDS_PATH = os.path.join(os.path.dirname(__file__), 'scaffolds')
# def make(scaffold, site):
# def list_scaffolds():
# def display_scaffold(scaffold, label):
# def get_label(scaffold):


from handroll.commands.base import Command, finish
from handroll.i18n import _
from handroll import scaffolder
# Copyright (c) 2017, Matt Layman



class ScaffoldCommand(Command):

    name = 'scaffold'
    description = _(
        'Make a new handroll site from a scaffold '
        'or list the available scaffolds')
    help = _('make a new handroll site')

    def register(self, subparsers):
        parser = super(ScaffoldCommand, self).register(subparsers)
        parser.add_argument(
            'scaffold', nargs='?', help=_('the scaffold to generate'))
        parser.add_argument(
            'site', nargs='?', default='site',
            help=_('the path to your website'))

    def run(self, args):
        if args.scaffold:
            scaffolder.make(args.scaffold, args.site)
            finish()
        else:

# Path: handroll/commands/base.py
# class Command(object):
#     """A command class with the minimal interface required for each command."""
# 
#     name = 'command'
#     description = 'the command description'
#     help = 'the command help'
# 
#     def register(self, subparsers):
#         """Register required options.
# 
#         Commands should invoke this method and use the returned parser to
#         add command specific options.
#         """
#         parser = subparsers.add_parser(
#             self.name, description=self.description, help=self.help)
#         parser.set_defaults(func=self.run)
#         return parser
# 
#     def run(self, args):
#         """Run whatever action the command intends."""
#         raise NotImplementedError()
# 
# def finish():
#     print(_('Complete.'))
#     sys.exit()
# 
# Path: handroll/i18n.py

# 
# Path: handroll/scaffolder.py
# BUILTIN_SCAFFOLDS = {
#     'default': _('A complete site to get you going'),
# }
# SCAFFOLDS_PATH = os.path.join(os.path.dirname(__file__), 'scaffolds')
# def make(scaffold, site):
# def list_scaffolds():
# def display_scaffold(scaffold, label):
# def get_label(scaffold):


# Path: handroll/commands/scaffold.py
from handroll.commands.base import Command, finish
from handroll.i18n import _
from handroll import scaffolder

# Copyright (c) 2017, Matt Layman



class ScaffoldCommand(Command):

    name = 'scaffold'
    description = _(
        'Make a new handroll site from a scaffold '
        'or list the available scaffolds')
    help = _('make a new handroll site')

    def register(self, subparsers):
        parser = super(ScaffoldCommand, self).register(subparsers)
        parser.add_argument(
            'scaffold', nargs='?', help=_('the scaffold to generate'))
        parser.add_argument(
            'site', nargs='?', default='site',
            help=_('the path to your website'))

    def run(self, args):
        if args.scaffold:
            scaffolder.make(args.scaffold, args.site)
            finish()
        else:

            scaffolder.list_scaffolds()