poetry: add cli script
This commit is contained in:
parent
96d1c7e8d3
commit
e133508d39
|
@ -15,6 +15,9 @@ detools = "^0.51.0"
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
pytest = "^7.1.3"
|
pytest = "^7.1.3"
|
||||||
|
|
||||||
|
[tool.poetry.scripts]
|
||||||
|
worthless = 'worthless.cli:main'
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["poetry-core"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
|
@ -3,4 +3,4 @@ import asyncio
|
||||||
from worthless import cli
|
from worthless import cli
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
asyncio.run(cli.main())
|
cli.main()
|
||||||
|
|
|
@ -322,7 +322,7 @@ class UI:
|
||||||
await self._patcher.clear_cache()
|
await self._patcher.clear_cache()
|
||||||
|
|
||||||
|
|
||||||
async def main():
|
async def main_async():
|
||||||
default_dirs = appdirs.AppDirs(constants.APP_NAME, constants.APP_AUTHOR)
|
default_dirs = appdirs.AppDirs(constants.APP_NAME, constants.APP_AUTHOR)
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
prog="worthless", description="A worthless launcher written in Python."
|
prog="worthless", description="A worthless launcher written in Python."
|
||||||
|
@ -584,5 +584,9 @@ async def main():
|
||||||
await ui.verify_game()
|
await ui.verify_game()
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
asyncio.run(main_async())
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
asyncio.run(main())
|
main()
|
||||||
|
|
Loading…
Reference in New Issue