ssod / replace_ghcnh.py
alexdum's picture
Clean initial commit for SSOD Hugging Face Space
ae2229b
Raw
History Blame Contribute Delete
878 Bytes
import os
dir_path = "/Users/alexandrudumitrescu/Documents/clima/2026/ssod"
for filename in ["global.R", "ui.R", "server.R"]:
filepath = os.path.join(dir_path, filename)
with open(filepath, "r") as f:
content = f.read()
content = content.replace("parse_ghcnh", "parse_ssod")
content = content.replace("ghcnh-station-list", "ssod-station-list")
content = content.replace("ghcnh-inventory", "ssod-inventory")
content = content.replace("ghcnh_id", "ssod_id")
content = content.replace("ghcn_id", "ssod_id")
content = content.replace("GHCNh Explorer", "SSOD Explorer")
content = content.replace("NCEI GHCN hourly", "NCEI SSOD daily")
content = content.replace("GHCNh", "SSOD")
content = content.replace("ghcnh", "ssod")
content = content.replace("GHCN", "SSOD")
with open(filepath, "w") as f:
f.write(content)