aboutsummaryrefslogtreecommitdiff
path: root/csv2json.py
diff options
context:
space:
mode:
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>2025-04-04 17:22:06 +0200
committerFriedrich Beckmann <friedrich.beckmann@gmx.de>2025-04-04 17:22:06 +0200
commitcf0e5d04eeeb75d02cdf2c422ab3c081d5716d03 (patch)
tree6281d73fda2371049adf45c4405bd03cc036516f /csv2json.py
parent78ef1ec2f346e48c61f64635293a41ba516edf22 (diff)
add first course table version without calendar
Diffstat (limited to 'csv2json.py')
-rw-r--r--csv2json.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/csv2json.py b/csv2json.py
new file mode 100644
index 0000000..20c264d
--- /dev/null
+++ b/csv2json.py
@@ -0,0 +1,9 @@
+import csv
+import json
+
+csvfile = open('kurse.csv', 'r')
+jsonfile = open('kurse.json', 'w')
+
+reader = csv.DictReader( csvfile)
+out = json.dumps( [ row for row in reader ] )
+jsonfile.write(out) \ No newline at end of file