This repository has been archived on 2022-09-12. You can view files and clone it, but cannot push or open issues or pull requests.
project305/main.py

46 lines
942 B
Python
Raw Normal View History

2022-09-05 08:31:12 +00:00
from loguru import logger
import pretty_errors
from colorama import Fore, Back, Style, init
2022-09-07 18:00:02 +00:00
import pathlib
2022-09-05 08:31:12 +00:00
import argparse
import yaml
2022-09-07 18:00:02 +00:00
import sys
from sys import platform
2022-09-05 08:31:12 +00:00
2022-09-07 18:00:02 +00:00
if platform != "linux":
logger.critical("""\nNot for windows, run only on GNU/Linux!\n""")
input()
sys.exit(1)
parser = argparse.ArgumentParser(
description="List fish in aquarium.",
argument_default=argparse.SUPPRESS
)
2022-09-05 08:31:12 +00:00
parser.add_argument(
2022-09-07 18:00:02 +00:00
"--config", "-c",
2022-09-05 08:31:12 +00:00
help="Path to the config file",
type=pathlib.Path,
default="config.yaml",
)
2022-09-07 18:00:02 +00:00
parser.add_argument(
"--proxy", "-p",
help="Path to the proxy file",
type=pathlib.Path
)
2022-09-05 08:49:52 +00:00
parser.add_argument("--rtc_min", help="", type=int)
parser.add_argument("--rtc_max", help="", type=int)
2022-09-05 08:31:12 +00:00
2022-09-07 18:00:02 +00:00
args = vars(parser.parse_args())
2022-09-05 08:31:12 +00:00
logger.add("project.log")
logger.info("Starting...")
2022-09-07 18:00:02 +00:00
with open(args["config"]) as f:
2022-09-05 08:31:12 +00:00
config = yaml.safe_load(f)
2022-09-07 18:00:02 +00:00
config["settings"].update(args)