Commit 28145535 authored by Gerald Oster's avatar Gerald Oster
Browse files

[feature] create output_dir if it does not exist

parent d284cbca
......@@ -4,6 +4,7 @@
import os
import re
import sys
from pathlib import Path
import csv
import json
from dataclasses import dataclass
......@@ -137,6 +138,7 @@ students = load_students_from_csv_file(CSV_DIR + '/' + CSV_FILE)
# File encoding: utf8
OUTPUT_DIR = '../output'
Path(OUTPUT_DIR).mkdir(parents=False, exist_ok=True)
save_students_as_json_file(f'{OUTPUT_DIR}/{base_filename}.json', students)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment