diff --git a/.github/workflows/convert_ics.yaml b/.github/workflows/convert_ics.yaml index 807a0a3..df98bf7 100644 --- a/.github/workflows/convert_ics.yaml +++ b/.github/workflows/convert_ics.yaml @@ -34,7 +34,10 @@ jobs: git config --global user.name "GitHub Actions" csv_branch_name="csv-files-$year" git checkout -b "$csv_branch_name" + tree python converters/icalendar_to_csv.py "$file" + echo + tree git status git add "csv/$year.csv" git commit -m "Convert $year.ics to $year.csv [skip ci]" diff --git a/converters/icalendar_to_csv.py b/converters/icalendar_to_csv.py index 083dae0..ed2c626 100644 --- a/converters/icalendar_to_csv.py +++ b/converters/icalendar_to_csv.py @@ -15,12 +15,14 @@ def ics_to_csv(file_path): csv_dir = os.path.abspath(os.path.join(os.curdir, os.pardir, CSV_DIR_NAME)) os.makedirs(csv_dir, exist_ok=True) + print(f"Created directory: {csv_dir}") # Get the filename (without extension) from the input path file_name = os.path.splitext(os.path.basename(file_path))[0] # Create the CSV file path csv_file_path = os.path.join(csv_dir, f"{file_name}.csv") + print(f"CSV file path: {csv_file_path}") with open(csv_file_path, "w", newline="", encoding="utf-8") as file: fieldnames = [ diff --git a/ics/2021.ics b/ics/2021.ics index f9eaed8..1711751 100644 --- a/ics/2021.ics +++ b/ics/2021.ics @@ -204,7 +204,7 @@ STATUS:CONFIRMED UID:sl_26 DTSTART;VALUE=DATE:20211230 DTEND;VALUE=DATE:20211231 -SUMMARY:Temp Holiday v6 +SUMMARY:Temp Holiday v7 DESCRIPTION:Public,Bank,Mercantile END:VEVENT END:VCALENDAR \ No newline at end of file