Files
nowblinkie/res/iloveseason.py

43 lines
808 B
Python
Executable File

#!/usr/bin/env python3
#
# Akbar Rahman <hi@alv.cx>
#
import sys
from datetime import datetime as dt
def get_args():
""" Get command line arguments """
import argparse
parser = argparse.ArgumentParser()
return parser.parse_args()
def main(args):
""" Entry point for script """
now = dt.now()
template = ""
if now.month in [3, 4, 5]:
template = './res/spring.gif'
if now.month in [6, 7, 8]:
template = './res/summer.gif'
if now.month in [9, 10, 11]:
template = './res/autumn.gif'
if now.month in [12, 1, 2]:
template = './res/winter.gif'
print(f'template = "{template}"')
print()
return 0
if __name__ == '__main__':
try:
sys.exit(main(get_args()))
except KeyboardInterrupt:
sys.exit(0)