Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions .github/workflows/misc_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Misc Invention Web Sync

on:
workflow_dispatch: # Allows you to run this manually from the Actions tab

permissions:
contents: write # Grants permission to push files directly to your repo

jobs:
sync-archives:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Build Structure and Download Assets
run: |
cat << 'EOF' > web_sync.py
import os
import time
import urllib.request
import ssl
import json
import shutil

ssl._create_default_https_context = ssl._create_unverified_context
GITHUB_USER = "Devanik21"

INVENTIONS = {
"constructs/Misc/001_LIM": "Latent-Inference-Manifold",
"constructs/Misc/002_LCM": "Latent-Consensus-Manifold",
"constructs/Misc/003_XV": "xylia-vision",
"constructs/Misc/004_LB": "Life-Beyond",
"constructs/Misc/005_TM": "Thermodynamic-Mind",
"constructs/Misc/006_DTM": "Dark-Thermodynamic-Mind",
"constructs/Misc/007_AARGE": "AION-Algorithmic-Reversal-of-Genomic-Entropy",
"constructs/Misc/008_DU": "Deep-Universe"
}

PENDING = []

def make_perfect_structure(folder, repo_name=""):
snap_path = os.path.join(folder, "snapshot")
notes_path = os.path.join(folder, "notes")
versions_path = os.path.join(folder, "versions")

os.makedirs(snap_path, exist_ok=True)
os.makedirs(notes_path, exist_ok=True)
os.makedirs(versions_path, exist_ok=True)

# Generate perfectly formatted internal markdown files
with open(os.path.join(notes_path, "evolution.md"), "w") as f: f.write("# Evolution\n")
with open(os.path.join(notes_path, "thoughts.md"), "w") as f: f.write("# Thoughts\n")
with open(os.path.join(versions_path, "v1.md"), "w") as f: f.write("# Version 1.0\n")

# Generate standard metadata JSON
meta = {"name": repo_name if repo_name else folder.split("/")[-1], "status": "active"}
with open(os.path.join(folder, "metadata.json"), "w") as f: json.dump(meta, f, indent=4)

return snap_path

# 1. Process known repos
for folder, repo in INVENTIONS.items():
snap_path = make_perfect_structure(folder, repo)

for branch in ['main', 'master']:
try:
readme_url = f"https://raw.githubusercontent.com/{GITHUB_USER}/{repo}/{branch}/README.md"
zip_url = f"https://github.com/{GITHUB_USER}/{repo}/archive/refs/heads/{branch}.zip"

# A. Download README directly into the snapshot folder
snap_readme = os.path.join(snap_path, "README.md")
urllib.request.urlretrieve(readme_url, snap_readme)

# B. Copy that exact README into the main invention folder as requested
main_readme = os.path.join(folder, "README.md")
shutil.copy(snap_readme, main_readme)

# C. Download ZIP strictly into the snapshot folder
urllib.request.urlretrieve(zip_url, os.path.join(snap_path, f"{repo}.zip"))

print(f"✅ Synced {repo} ({branch})")
break
except Exception:
continue
time.sleep(1)

# 2. Build empty pending structures to maintain standard architecture
for folder in PENDING:
make_perfect_structure(folder)

print("All downloads and structural formatting complete.")
EOF
python web_sync.py

- name: Commit and Push to Web Repo
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Flawless sync: READMEs in main & snapshot folders, ZIPs in snapshot, full directory structure built for Misc constructs" || echo "No changes to commit"
git push origin main
10 changes: 1 addition & 9 deletions .github/workflows/perfect_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,7 @@ jobs:
"constructs/010_LDD": "Lucid-Dark-Dreamer",
"constructs/011_BA": "BSHDER-Architecture",
"constructs/012_GGEO": "GENEVO-GENetic-EVolutionary-Organoid",
"constructs/013_HM": "HAG-MoE",
"constructs/Misc/001_LIM": "Latent-Inference-Manifold",
"constructs/Misc/002_LCM": "Latent-Consensus-Manifold",
"constructs/Misc/003_XV": "xylia-vision",
"constructs/Misc/004_LB": "Life-Beyond",
"constructs/Misc/005_TM": "Thermodynamic-Mind",
"constructs/Misc/006_DTM": "Dark-Thermodynamic-Mind",
"constructs/Misc/007_AARGE": "AION-Algorithmic-Reversal-of-Genomic-Entropy",
"constructs/Misc/008_DU": "Deep-Universe"
"constructs/013_HM": "HAG-MoE"
}

PENDING = []
Expand Down
28 changes: 0 additions & 28 deletions Misc/001_LIM/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions Misc/001_LIM/metadata.json

This file was deleted.

1 change: 0 additions & 1 deletion Misc/001_LIM/notes/evolution.md

This file was deleted.

1 change: 0 additions & 1 deletion Misc/001_LIM/notes/thoughts.md

This file was deleted.

Binary file removed Misc/001_LIM/snapshot/Latent-Inference-Manifold.zip
Binary file not shown.
28 changes: 0 additions & 28 deletions Misc/001_LIM/snapshot/README.md

This file was deleted.

1 change: 0 additions & 1 deletion Misc/001_LIM/versions/v1.md

This file was deleted.

Loading