mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 17:32:56 +00:00
19 lines
475 B
Python
19 lines
475 B
Python
import json
|
|
import os
|
|
|
|
index = {}
|
|
os.chdir("control_files")
|
|
for prefix in os.listdir("."):
|
|
for file in os.listdir(prefix):
|
|
with open(os.path.join(prefix, file), "r") as f:
|
|
ext_name = file.replace(".control", "")
|
|
control = f.read()
|
|
index[ext_name] = {
|
|
"path": f"{prefix}/{ext_name}.tar.gz",
|
|
"control": control
|
|
}
|
|
|
|
with open("../control_index.json", "w") as f:
|
|
json.dump(index, f)
|
|
|