{"id":19580058,"url":"https://github.com/hyde/commando","last_synced_at":"2025-04-27T08:32:07.250Z","repository":{"id":55537334,"uuid":"1174850","full_name":"hyde/commando","owner":"hyde","description":"argparse in style","archived":false,"fork":false,"pushed_at":"2020-12-23T07:14:42.000Z","size":276,"stargazers_count":39,"open_issues_count":1,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-14T05:19:00.975Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyde.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-12-16T18:19:42.000Z","updated_at":"2024-05-17T16:39:28.000Z","dependencies_parsed_at":"2022-08-15T02:50:20.695Z","dependency_job_id":null,"html_url":"https://github.com/hyde/commando","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyde%2Fcommando","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyde%2Fcommando/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyde%2Fcommando/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyde%2Fcommando/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyde","download_url":"https://codeload.github.com/hyde/commando/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251112546,"owners_count":21538162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T07:20:59.811Z","updated_at":"2025-04-27T08:32:05.663Z","avatar_url":"https://github.com/hyde.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"============================\ncommando - argparse in style\n============================\n\n**Version 1.0.0**\n\nA simple wrapper for ``argparse`` that allows commands and arguments\nto be defined declaratively using decorators. Note that this does\nnot support all the features of ``argparse`` yet.\n\nCommando also bundles a few utilities that are useful when building\ncommand line applications.\n\nExample\n--------\n\nWithout commando::\n\n\n    def main():\n        parser = argparse.ArgumentParser(description='hyde - a python static website generator',\n                                      epilog='Use %(prog)s {command} -h to get help on individual commands')\n        parser.add_argument('-v', '--version', action='version', version='%(prog)s ' + __version__)\n        parser.add_argument('-s', '--sitepath', action='store', default='.', help=\"Location of the hyde site\")\n        subcommands = parser.add_subparsers(title=\"Hyde commands\",\n                                         description=\"Entry points for hyde\")\n        init_command = subcommands.add_parser('init', help='Create a new hyde site')\n        init_command.set_defaults(run=init)\n        init_command.add_argument('-t', '--template', action='store', default='basic', dest='template',\n                         help='Overwrite the current site if it exists')\n        init_command.add_argument('-f', '--force', action='store_true', default=False, dest='force',\n                         help='Overwrite the current site if it exists')\n        args = parser.parse_args()\n        args.run(args)\n\n    def init(self, params):\n        print params.sitepath\n        print params.template\n        print params.overwrite\n\n\nWith commando::\n\n\n    class Engine(Application):\n\n        @command(description='hyde - a python static website generator',\n                epilog='Use %(prog)s {command} -h to get help on individual commands')\n        @param('-v', '--version', action='version', version='%(prog)s ' + __version__)\n        @param('-s', '--sitepath', action='store', default='.', help=\"Location of the hyde site\")\n        def main(self, params): pass\n\n        @subcommand('init', help='Create a new hyde site')\n        @param('-t', '--template', action='store', default='basic', dest='template',\n                help='Overwrite the current site if it exists')\n        @param('-f', '--force', action='store_true', default=False, dest='overwrite',\n                help='Overwrite the current site if it exists')\n        def init(self, params):\n            print params.sitepath\n            print params.template\n            print params.overwrite\n\nResources\n---------\n\n1.  `Changelog`_\n2.  `License`_\n3.  `Contributing`_\n4.  `Authors`_\n\n\n.. _Changelog: CHANGELOG.rst\n.. _LICENSE: LICENSE\n.. _Contributing: CONTRIBUTING.rst\n.. _Authors: AUTHORS.rst\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyde%2Fcommando","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyde%2Fcommando","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyde%2Fcommando/lists"}