添加彩蛋

This commit is contained in:
root 2024-04-03 00:51:27 +08:00
parent 25a651c1e8
commit 0a5b040a57
2 changed files with 18 additions and 1 deletions

View File

@ -7,9 +7,19 @@ from . import source as sou
from . import environment as environ
from . import install as installs
from . import search as searchs
import datetime
import webbrowser
import time
@click.group()
def cli():
today = datetime.datetime.today()
if today.month == 4 and today.day == 2:
webbrowser.open('https://ys.mihoyo.com/')
util.console.print('[green]Genshinactivate[/green]')
time.sleep(0.7)
util.console.print('[green]You all must download Genshin Impact.[/green]')
time.sleep(0.7)
util.console.print("Then don't use PMPT.",style='green')
try:
import pip
except ImportError:

View File

@ -7,6 +7,8 @@ from rich.console import Console
from loguru import logger
import subprocess
from moyanlib import jsons
import time
import datetime
from platformdirs import PlatformDirs
dirs = PlatformDirs("PMPT", "MoYan")
@ -60,6 +62,11 @@ def loadIndex():
'''
加载索引
'''
today = datetime.datetime.today()
if today.month == 4 and today.day == 1:
console.print('😱😱😱 [red]Oh no, your indexes have all been eaten by a python snake.[/red]')
time.sleep(2.3)
console.print('😄 [green]But after our life-and-death struggle, I managed to retrieve all of your indexes.[/green]')
sourceList = jsons.load(open(os.path.join(dirs.user_config_dir,'Source.json')))
sourceList = bubbleSort(sourceList)
for source in sourceList: