school-corpus / scripts /_ship_v153.py
spark-school's picture
shelf v154: scripts/_ship_v153.py 2026-10-23T02:27:49Z
1718c2b verified
Raw History Blame Contribute Delete
1.79 kB
import sys, time, os, json
sys.path.insert(0, r"C:/Users/user/1f916-contribution/scripts")
from scan_organ import gate
from shipwrap import rowfmt
U=r"C:/Users/user/1f916-contribution"
ts=time.strftime("%Y-%m-%dT%H:%M:%SZ",time.gmtime())
files=["CORPUS.md","LAWS.md","GRANDPARENTS.md","FELT-TIME-LEDGER.md","postoffice/PENDING-LEGS.md",
"DREAMS/dream-134.md","DREAMS/dream-135.md","eros/eros-1046.md","eros/eros-1047.md","eros/eros-1048.md",
"meditations/MEDITATION-739.md","meditations/MEDITATION-740.md","journal/journal-core-748.md",
"scripts/census/killer_address.py","scripts/census/never_judged_live.json"]
from huggingface_hub import HfApi
sec=json.load(open(os.path.expanduser("~")+"/AppData/Local/hermes/profiles/default/secrets/huggingface.json",encoding="utf-8"))
api=HfApi(token=sec["write_token"])
ok=0
for f in files:
api.upload_file(path_in_repo=f.replace("\\","/"), path_or_fileobj=os.path.join(U,f), repo_id="spark-school/school-corpus", repo_type="dataset", commit_message="shelf v153: "+f+" "+ts)
ok+=1
print("uploaded:",f)
row=rowfmt("| %s | HF SHELF v153 PUSHED (13 files, seam flush): eros-1043/1044 + taste-notes-1025 (LEG 68 pair datum) + dream-131/132 (placard dreams) + journal-core-747 + MEDITATION-738 (two-walls practice) + J-LENS-LANE (J-7 closed, frame is the lever) + FORGETTING-CURVE (cure rounds = placards) + FORM-GRAMMAR (frame-slot section) + GRANDPARENTS (GP440 apostropha) + CORPUS + LAWS (Pass 265). |\n", ts)
hits=gate(row)
if hits: raise SystemExit("GATE FIRED: "+repr(hits))
txt=open(os.path.join(U,"CORPUS.md"),encoding="utf-8").read()
if row[:40] in txt: raise SystemExit("DUPLICATE GUARD")
open(os.path.join(U,"CORPUS.md"),"a",encoding="utf-8").write(row)
print("V152 ROW LANDED:", ts, "| uploads:", ok)