def main(): parser = argparse.ArgumentParser(prog='python -m urubu') parser.add_argument('--version', action='version', version=__version__) parser.add_argument('command', choices=['build', 'serve', 'serveany']) args = parser.parse_args() if args.command == 'build': project.build() elif args.command == 'serve': proj = project.load() serve(proj.site['baseurl']) elif args.command == 'serveany': proj = project.load() serve(proj.site['baseurl'], host='')