From f05ff85bd37ca410e0b374d83a6ec54749d9e7e5 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Fri, 28 Feb 2020 18:46:33 +0000 Subject: [PATCH] Building the command-line interface --- calibrestekje/__main__.py | 21 +++++++++++++++++++++ setup.cfg | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 calibrestekje/__main__.py diff --git a/calibrestekje/__main__.py b/calibrestekje/__main__.py new file mode 100644 index 0000000..34f3f1b --- /dev/null +++ b/calibrestekje/__main__.py @@ -0,0 +1,21 @@ +"""Command-line entrypoint module.""" + +from argparse import ArgumentParser + +# TODO: https://github.com/agronholm/sqlacodegen + + +def generate_bindings(): + """Spit out generated SQLAlchemy bindings.""" + pass + + +def entrypoint(args=None): + """Command-line entry point.""" + parser = ArgumentParser(description="Calibrestekje command-line interface") + parser.parse_args() + generate_bindings() + + +if __name__ == "__main__": + entrypoint() diff --git a/setup.cfg b/setup.cfg index be0a13c..bf9b89a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -61,3 +61,7 @@ docs = sphinx_rtd_theme changelog = towncrier <= 19.2.0, < 20.0 + +[options.entry_points] +console_scripts = + calibrestekje = calibrestekje.__main__:entrypoint