add 'kassandra' command line to the package

This commit is contained in:
histausse 2021-10-06 12:25:39 +02:00
parent 06afbc187d
commit c7de4cfbc0
Signed by: histausse
GPG key ID: 67486F107F62E9E9
2 changed files with 9 additions and 2 deletions

View file

@ -17,3 +17,7 @@ install_requires =
[options.package_data]
matrix_bot = py.typed
[options.entry_points]
console_scripts =
kassandra=kassandra.__main__:main

View file

@ -6,7 +6,7 @@ from .bot import send_messages
from .format import format_alerts
from .webhook import run_webhook
async def main():
async def __main():
parser = argparse.ArgumentParser()
parser.add_argument("-c", "--config", default="config.yaml")
args = parser.parse_args()
@ -39,5 +39,8 @@ async def main():
webhook_corout
)
def main():
asyncio.run(__main())
if __name__ == "__main__":
asyncio.run(main())
main()