added barebone cli
This commit is contained in:
		| @@ -1,2 +0,0 @@ | |||||||
| __version__ = "0.0.0" |  | ||||||
| __name__ = "$REPO_NAME_SNAKE" |  | ||||||
| @@ -0,0 +1,6 @@ | |||||||
|  | import pathlib | ||||||
|  |  | ||||||
|  |  | ||||||
|  | __name__ = "$REPO_NAME_SNAKE" | ||||||
|  | __folder__ = str(pathlib.Path(__file__).parent) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,5 +1,18 @@ | |||||||
| from .__about__ import __name__, __version__ | import argparse | ||||||
|  | import logging | ||||||
|  |  | ||||||
|  |  | ||||||
| def cli(): | def cli(): | ||||||
|     print(f"Running {__name__} version {__version__} from __main__.py") |     parser = argparse.ArgumentParser( | ||||||
|  |         description="$REPO_DESCRIPTION", | ||||||
|  |         formatter_class=argparse.RawTextHelpFormatter | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     parser.add_argument( | ||||||
|  |         "--debug", | ||||||
|  |         action="store_true", | ||||||
|  |         help="Sets the logging level to debug." | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     args = parser.parse_args() | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user