From 320e23c0ae4709515a9754638c6993555fdf1d31 Mon Sep 17 00:00:00 2001 From: Vikranth3140 Date: Sat, 8 Jun 2024 18:49:07 +0530 Subject: [PATCH] Fixed os dir path --- main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.py b/main.py index 0f6b260..3a0c346 100644 --- a/main.py +++ b/main.py @@ -1,8 +1,14 @@ from fetch_contributions import fetch_github_events, calculate_streaks from generate_svg import generate_svg +import os if __name__ == '__main__': username = 'Vikranth3140' + + # Ensure the output directory exists + if not os.path.exists('output'): + os.makedirs('output') + events = fetch_github_events(username) total_contributions, current_streak, longest_streak = calculate_streaks(events) generate_svg(total_contributions, current_streak, longest_streak) \ No newline at end of file