diff --git a/pmpt/__init__.py b/pmpt/__init__.py index 5141b31..12c37ba 100644 --- a/pmpt/__init__.py +++ b/pmpt/__init__.py @@ -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]Genshin!activate![/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: diff --git a/pmpt/util.py b/pmpt/util.py index f1235e7..783267d 100644 --- a/pmpt/util.py +++ b/pmpt/util.py @@ -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: