diff --git a/.github/scripts/update-modlist.js b/.github/scripts/update-modlist.js deleted file mode 100644 index 2e5c55d..0000000 --- a/.github/scripts/update-modlist.js +++ /dev/null @@ -1,55 +0,0 @@ -const fs = require('fs'); -const path = require('path'); - -const ROOT = '.'; -const EXPERIMENTAL = '.Experimental'; -const README_PATH = 'README.md'; -const MARKER_START = ''; -const MARKER_END = ''; - -function getModFolders(baseDir) { - const entries = fs.readdirSync(baseDir, { withFileTypes: true }); - return entries - .filter(entry => entry.isDirectory()) - .map(entry => path.join(baseDir, entry.name)) - .filter(dir => fs.existsSync(path.join(dir, 'README.md'))); -} - -function formatTable(mods, baseDir) { - if (mods.length === 0) return ''; - - let rows = mods.map(modPath => { - const modName = path.basename(modPath); - const readmeLink = path.join(modPath, 'README.md'); - const zipLink = path.join(modPath, `${modName}.zip`); - return `| [${modName}](${readmeLink}) | [Download](${zipLink}) |`; - }); - - return [ - `### ${baseDir === EXPERIMENTAL ? 'Experimental Mods' : 'Released Mods'}`, - '', - '| Name | Download |', - '|------|----------|', - ...rows, - '' - ].join('\n'); -} - -function updateReadme(modListSection) { - const readme = fs.readFileSync(README_PATH, 'utf8'); - const before = readme.split(MARKER_START)[0]; - const after = readme.split(MARKER_END)[1]; - - const newReadme = `${before}${MARKER_START}\n\n${modListSection}\n${MARKER_END}${after}`; - fs.writeFileSync(README_PATH, newReadme); -} - -const mainMods = getModFolders(ROOT).filter(dir => !dir.startsWith(EXPERIMENTAL)); -const experimentalMods = getModFolders(EXPERIMENTAL); - -const tableContent = [ - formatTable(mainMods, ROOT), - formatTable(experimentalMods, EXPERIMENTAL) -].join('\n'); - -updateReadme(tableContent); \ No newline at end of file diff --git a/.github/workflows/update-modlist.yml b/.github/workflows/update-modlist.yml deleted file mode 100644 index 3376080..0000000 --- a/.github/workflows/update-modlist.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Update Mod List - -on: - push: - paths: - - 'update-modlist.js' - - '.github/workflows/update-modlist.yml' - - 'README.md' - - '**/README.md' - workflow_dispatch: - -jobs: - update-modlist: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '20' - - - name: Run mod list updater - run: node update-modlist.js - - - name: Commit and push changes - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} - git add README.md - git commit -m "[NAK_CVR_Mods] Update mod list in README" || echo "No changes to commit" - git push diff --git a/README.md b/README.md index 5fa34df..76c86ad 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ ## NotAKids ChilloutVR Mods - - ## Released Mods | Mod Name | README | Download | Description | @@ -39,8 +37,6 @@ | VisualCloneFix | [README](https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/VisualCloneFix) | [Download](https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/latest/download/VisualCloneFix.dll) | Fixes the Visual Clone system. | | WhereAmIPointing | [README](https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/WhereAmIPointing) | [Download](https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/latest/download/WhereAmIPointing.dll) | Makes your controller rays always visible when the menus are open. | - - # How To Install The majority of modifications found in this repository are reviewed and made available through the [ChilloutVR Modding Group](https://discord.gg/dndGPM3bxu).