added comments

This commit is contained in:
Valentijn
2026-03-18 19:57:30 +01:00
parent c271656f51
commit 47bb6585d1
4 changed files with 29 additions and 7 deletions

View File

@@ -4,21 +4,26 @@ from dotenv import load_dotenv
import os
def main():
# Load the environment
load_dotenv(override=True)
# Set up database, webserver and PMT connection
db = Database()
pmt = PMT()
# fetch PMT shifts
pmt.login()
days_ahead = int(os.environ.get("DAYS_TO_FETCH"))
shifts = pmt.get_shifts(days_ahead)
PMT.print_shifts(shifts)
# Insert those shifts into the database
db.insert_shifts(shifts)
print(f"\nFound {len(shifts)} shifts total.")
if __name__ == "__main__":
main()