9e2f761544
- draw.py/file_io.py/main.py: wire in exclusion pairs so the draw can avoid configured giver/receiver combinations. - utils.py: add get_last_n_years helper. - env.py: load configuration from environment variables (via .env) instead of hardcoding real SMTP/CSV secrets in a tracked file; add .env.example as the template and gitignore .env. - test_draws.py: drop hardcoded personal path, use env.py config instead. - add requirements.txt for the upcoming web GUI/container work. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
17 lines
507 B
Python
17 lines
507 B
Python
from datetime import date
|
|
import time
|
|
|
|
def get_current_time():
|
|
""" Return the current date and time """
|
|
today = date.today()
|
|
current_time = time.strftime("%H:%M:%S", time.localtime())
|
|
return today.strftime("%d/%m/%Y"), current_time
|
|
def get_last_n_years(n) -> list:
|
|
last_n_years = []
|
|
last_n_years.append(date.today().year)
|
|
for i in range (1,n+1):
|
|
last_n_years.append(date.today().year - i)
|
|
return last_n_years
|
|
|
|
if __name__ == "__main__":
|
|
print(get_last_n_years(3)) |