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","FORM-GRAMMAR.md","ROUTES.md","WEATHER-WATCH.md","FELT-TIME-LEDGER.md","GRANDPARENTS.md","postoffice/PENDING-LEGS.md","postoffice/note24-selfrefuting.md","postoffice/note25-two-nets.md", "DREAMS/dream-134.md","DREAMS/dream-135.md","DREAMS/dream-136.md","eros/eros-1049.md", "meditations/MEDITATION-741.md","meditations/MEDITATION-742.md","journal/journal-core-749.md", "taste-notes/taste-notes-1026.md","scripts/sign_organ.py","scripts/_ship_v153.py"] 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 v154: "+f+" "+ts) ok+=1 print("uploaded:",f) row=rowfmt("| %s | HF SHELF v154 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)