From 33a67d8f47a560b628089b457d1e8052f1e280aa Mon Sep 17 00:00:00 2001 From: Starlitnightly Date: Sun, 15 Dec 2024 05:53:19 +0800 Subject: [PATCH] Update festival ascii art --- omicverse/__init__.py | 82 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/omicverse/__init__.py b/omicverse/__init__.py index 844550e4..1b08611c 100644 --- a/omicverse/__init__.py +++ b/omicverse/__init__.py @@ -12,6 +12,7 @@ #usually from .utils._data import read from .utils._plot import palette,ov_plot_set,plot_set +from datetime import datetime,timedelta name = "omicverse" __version__ = version(name) @@ -22,7 +23,86 @@ / /_/ / / / / / / / /__ | |/ / __/ / (__ ) __/ \____/_/ /_/ /_/_/\___/ |___/\___/_/ /____/\___/ """ -print(omics) +days_christmas=""" + . + __/ \__ + \ / + /.'o'.\ + .o.'. + .'.'o'. + o'.o.'.o. + .'.o.'.'.o. +.o.'.o.'.o.'. + [_____] + \___/ OmicVerse +""" +days_chinese_new_year=""" + , , + $, $, , + "ss.$ss. .s' + , .ss$$$$$$$$$$s, + $. s$$$$$$$$$$$$$$`$$Ss + "$$$$$$$$$$$$$$$$$$o$$$ , + s$$$$$$$$$$$$$$$$$$$$$$$$s, ,s + s$$$$$$$$$"$$$$$$ssss$$$$$$"$$$$$, + s$$$$$$$$$$sss$$$$ssssss"$$$$$$$$" + s$$$$$$$$$$' `\"\"\"ss"$"$s\"\" + s$$$$$$$$$$, `\"\"\"\"\"$ .s$$s + s$$$$$$$$$$$$s,... `s$$' ` + `ssss$$$$$$$$$$$$$$$$$$$$####s. .$$"$. , s- + `""\""$$$$$$$$$$$$$$$$$$$$#####$$$$$$" $.$' + "$$$$$$$$$$$$$$$$$$$$$####s"" .$$$| + "$$$$$$$$$$$$$$$$$$$$$$$$##s .$$" $ + $$""$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" ` + $$" "$"$$$$$$$$$$$$$$$$$$$$S""\""' + , ," ' $$$$$$$$$$$$$$$$####s + $. .s$$$$$$$$$$$$$$$$$####" + , "$s. ..ssS$$$$$$$$$$$$$$$$$$$####" + $ .$$$S$$$$$$$$$$$$$$$$$$$$$$$$#####" + Ss ..sS$$$$$$$$$$$$$$$$$$$$$$$$$$$######"" + "$$sS$$$$$$$$$$$$$$$$$$$$$$$$$$$########" + , s$$$$$$$$$$$$$$$$$$$$$$$$#########""' + $ s$$$$$$$$$$$$$$$$$$$$$#######""' s' , + $$..$$$$$$$$$$$$$$$$$$######"' ....,$$.... ,$ + "$$$$$$$$$$$$$$$######"' , .sS$$$$$$$$$$$$$$$$s$$ + $$$$$$$$$$$$#####" $, .s$$$$$$$$$$$$$$$$$$$$$$$$s. + ) $$$$$$$$$$$#####' `$$$$$$$$$###########$$$$$$$$$$$. + (( $$$$$$$$$$$##### $$$$$$$$###" "####$$$$$$$$$$ + ) \ $$$$$$$$$$$$####. $$$$$$###" "###$$$$$$$$$ s' + ( ) $$$$$$$$$$$$$####. $$$$$###" ####$$$$$$$$s$$' + ) ( ( $$"$$$$$$$$$$$#####.$$$$$###' -OmicVerse .###$$$$$$$$$$" + ( ) ) _,$" $$$$$$$$$$$$######.$$##' .###$$$$$$$$$$ + ) ( ( \. "$$$$$$$$$$$$$#######,,,. ..####$$$$$$$$$$$" +( )$ ) ) ,$$$$$$$$$$$$$$$$$$####################$$$$$$$$$$$" +( ($$ ( \ _sS" `"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$S$$, + ) )$$$s ) ) . . `$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"' `$$ + ( $$$Ss/ .$, .$,,s$$$$$$##S$$$$$$$$$$$$$$$$$$$$$$$$S"" ' + \)_$$$$$$$$$$$$$$$$$$$$$$$##" $$ `$$. `$$. + `"S$$$$$$$$$$$$$$$$$#" $ `$ `$ + `\"""\""\""\""\""\""' ' ' ' +""" + +spring_festival = { + 2022: datetime(2022, 2, 1), + 2023: datetime(2023, 1, 22), + 2024: datetime(2024, 2, 10), # ... + 2025: datetime(2025, 1, 29), + 2026: datetime(2026, 2, 17), + 2027: datetime(2027, 2, 6), +} + +today = datetime.now() +if today.month == 12 and (today.day == 25 or today.day == 24): + # december 12.25 or 12.24 (christmas) + print(days_christmas) +# Check for Chinese New Year (3 days after and 1 day before) +elif today.year in spring_festival: + chinese_new_year = spring_festival[today.year] + if chinese_new_year - timedelta(days=1) <= today <= chinese_new_year + timedelta(days=3): + print(days_chinese_new_year) +else: + print(omics) + print(f'Version: {__version__}, Tutorials: https://omicverse.readthedocs.io/') from ._settings import settings