mirror of
https://github.com/ikunshare/Onekey.git
synced 2026-01-13 00:27:32 +08:00
feat: 花里胡哨
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
from colorama import Fore, Back, Style, init
|
||||
|
||||
init()
|
||||
|
||||
from .log import log
|
||||
|
||||
def init():
|
||||
print('\033[1;32;40m _____ __ _ _____ _ _ _____ __ __ ' + '\033[0m')
|
||||
print('\033[1;32;40m / _ \\ | \\ | | | ____| | | / / | ____| \\ \\ / /' + '\033[0m')
|
||||
print('\033[1;32;40m | | | | | \\| | | |__ | |/ / | |__ \\ \\/ /' + '\033[0m')
|
||||
print('\033[1;32;40m | | | | | |\\ | | __| | |\\ \\ | __| \\ / ' + '\033[0m')
|
||||
print('\033[1;32;40m | |_| | | | \\ | | |___ | | \\ \\ | |___ / /' + '\033[0m')
|
||||
print('\033[1;32;40m \\_____/ |_| \\_| |_____| |_| \\_\\ |_____| /_/' + '\033[0m')
|
||||
print(f"{Fore.GREEN}{Back.BLACK}{Style.BRIGHT} _____ __ _ _____ _ _ _____ __ __ {Style.RESET_ALL}")
|
||||
print(f"{Fore.GREEN}{Back.BLACK}{Style.BRIGHT} / _ \\ | \\ | | | ____| | | / / | ____| \\ \\ / /{Style.RESET_ALL}")
|
||||
print(f"{Fore.GREEN}{Back.BLACK}{Style.BRIGHT} | | | | | \\| | | |__ | |/ / | |__ \\ \\/ /{Style.RESET_ALL}")
|
||||
print(f"{Fore.GREEN}{Back.BLACK}{Style.BRIGHT} | | | | | |\\ | | __| | |\\ \\ | __| \\ / {Style.RESET_ALL}")
|
||||
print(f"{Fore.GREEN}{Back.BLACK}{Style.BRIGHT} | |_| | | | \\ | | |___ | | \\ \\ | |___ / /{Style.RESET_ALL}")
|
||||
print(f"{Fore.GREEN}{Back.BLACK}{Style.BRIGHT} \\_____/ |_| \\_| |_____| |_| \\_\\ |_____| /_/{Style.RESET_ALL}")
|
||||
log.info('作者ikun0014')
|
||||
log.info('本项目采用GNU General Public License v3开源许可证')
|
||||
log.info('版本:1.2.1')
|
||||
log.info('项目仓库:https://github.com/ikunshare/Onekey')
|
||||
log.info('官网:ikunshare.com')
|
||||
log.warning('本项目完全开源免费,如果你在淘宝,QQ群内通过购买方式获得,赶紧回去骂商家死全家\n交流群组:\nhttps://qm.qq.com/q/d7sWovfAGI\nhttps://t.me/ikunshare_group')
|
||||
log.warning('本项目完全开源免费,如果你在淘宝,QQ群内通过购买方式获得,赶紧回去骂商家死全家\n交流群组:\nhttps://qm.qq.com/q/d7sWovfAGI\nhttps://t.me/ikunshare_group')
|
||||
|
||||
@@ -8,7 +8,7 @@ async def get(sha, path, repo, session):
|
||||
url_list = [
|
||||
f'https://cdn.jsdmirror.com/gh/{repo}@{sha}/{path}',
|
||||
f'https://jsd.onmicrosoft.cn/gh/{repo}@{sha}/{path}',
|
||||
f'https://mirror.ghproxy.com/https://raw.githubusercontent.com/{repo}/{sha}/{path}',
|
||||
# f'https://mirror.ghproxy.com/https://raw.githubusercontent.com/{repo}/{sha}/{path}',
|
||||
f'https://raw.githubusercontent.com/{repo}/{sha}/{path}',
|
||||
]
|
||||
retry = 3
|
||||
@@ -21,7 +21,7 @@ async def get(sha, path, repo, session):
|
||||
chunk_size = 1024
|
||||
content = bytearray()
|
||||
|
||||
with tqdm_asyncio(total=total_size, unit='B', unit_scale=True, desc=f'下载 {path}') as pbar:
|
||||
with tqdm_asyncio(total=total_size, unit='B', unit_scale=True, desc=f'下载 {path}', colour='#ffadad') as pbar:
|
||||
async for chunk in r.content.iter_chunked(chunk_size):
|
||||
content.extend(chunk)
|
||||
pbar.update(len(chunk))
|
||||
|
||||
Reference in New Issue
Block a user