1
0

Compare commits

...

2 Commits

Author SHA1 Message Date
n1jos 241078e41c add ghostty config 2026-06-10 20:22:29 +02:00
n1jos bf2f19bbdc add batch csv to json script 2026-06-05 00:00:18 +02:00
2 changed files with 28 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
keybind = super+left=goto_split:left
keybind = super+right=goto_split:right
keybind = super+up=goto_split:top
keybind = super+down=goto_split:bottom
unfocused-split-opacity = 0.3
scrollback-limit = 10000
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env python3
import csv, json, sys
from pathlib import Path
folder = Path.cwd()
csvs = list(folder.glob("*.csv"))
if not csvs:
print("No CSV files found in current folder.")
sys.exit(0)
for src in csvs:
dst = src.with_suffix(".json")
try:
with open(src) as f:
data = list(csv.DictReader(f))
with open(dst, 'w') as f:
json.dump(data, f, indent=2)
print(f"{src.name}{dst.name}")
except Exception as e:
print(f"{src.name} failed: {e}")