add some color to usage help

This commit is contained in:
sebthom
2024-01-12 10:59:42 +01:00
parent a87e12bf1b
commit 11f47140dc
2 changed files with 5 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ from datetime import datetime
from logging.handlers import RotatingFileHandler
from typing import Any, Final
import certifi
import certifi, colorama
from overrides import overrides
from ruamel.yaml import YAML
from selenium.common.exceptions import ElementClickInterceptedException, NoSuchElementException, TimeoutException, WebDriverException
@@ -28,6 +28,8 @@ LOG_ROOT:Final[logging.Logger] = logging.getLogger()
LOG:Final[logging.Logger] = logging.getLogger("kleinanzeigen_bot")
LOG.setLevel(logging.INFO)
colorama.init()
class KleinanzeigenBot(SeleniumMixin):
@@ -131,7 +133,7 @@ class KleinanzeigenBot(SeleniumMixin):
exe = "python -m kleinanzeigen_bot"
print(textwrap.dedent(f"""\
Usage: {exe} COMMAND [OPTIONS]
Usage: {colorama.Fore.LIGHTMAGENTA_EX}{exe} COMMAND [OPTIONS]{colorama.Style.RESET_ALL}
Commands:
publish - (re-)publishes ads

View File

@@ -32,6 +32,7 @@ classifiers = [ # https://pypi.org/classifiers/
]
requires-python = ">=3.10,<3.13" # <3.12 required for pyinstaller
dependencies = [
"colorama~=0.4",
"coloredlogs~=15.0",
"overrides~=7.4",
"ruamel.yaml~=0.18",