Skip to content

Commit

Permalink
Add temporary debug lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Dilshan-H committed Nov 15, 2023
1 parent b8333a3 commit ccb4126
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions converters/icalendar_to_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ def ics_to_csv(file_path):
cal = Calendar.from_ical(file.read())

csv_dir = os.path.abspath(os.path.join(os.curdir, os.pardir, CSV_DIR_NAME))
print(f"CSV files will be saved in {csv_dir}")
os.makedirs(csv_dir, exist_ok=True)

# 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"Saving CSV file to {csv_file_path}")

with open(csv_file_path, "w", newline="", encoding="utf-8") as file:
fieldnames = [
Expand Down

0 comments on commit ccb4126

Please sign in to comment.