命令行新增LOGO
This commit is contained in:
parent
d7a2afba48
commit
148c5b7621
@ -1,9 +1,21 @@
|
||||
import argparse
|
||||
import asyncio
|
||||
|
||||
from xiaomusic import (
|
||||
__version__,
|
||||
)
|
||||
from xiaomusic.config import Config
|
||||
from xiaomusic.xiaomusic import XiaoMusic
|
||||
|
||||
LOGO = r"""
|
||||
__ __ _ __ __ _
|
||||
\ \/ / (_) __ _ ___ | \/ | _ _ ___ (_) ___
|
||||
\ / | | / _` | / _ \ | |\/| | | | | | / __| | | / __|
|
||||
/ \ | | | (_| | | (_) | | | | | | |_| | \__ \ | | | (__
|
||||
/_/\_\ |_| \__,_| \___/ |_| |_| \__,_| |___/ |_| \___|
|
||||
{}
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
@ -45,6 +57,8 @@ def main():
|
||||
help="ffmpeg bin path",
|
||||
)
|
||||
|
||||
print(LOGO.format(f"XiaoMusic v{__version__} by: github.com/hanxi"))
|
||||
|
||||
options = parser.parse_args()
|
||||
config = Config.from_options(options)
|
||||
|
||||
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
from dataclasses import dataclass,asdict
|
||||
from dataclasses import dataclass
|
||||
|
||||
from xiaomusic.utils import validate_proxy
|
||||
|
||||
@ -108,7 +108,7 @@ class Config:
|
||||
self.append_keyword(keywords_stop, "stop")
|
||||
|
||||
# 保存配置到 config-example.json 文件
|
||||
#with open("config-example.json", "w") as f:
|
||||
# with open("config-example.json", "w") as f:
|
||||
# data = asdict(self)
|
||||
# json.dump(data, f, ensure_ascii=False, indent=4)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user