{"title":"Fedwiki Merge Skill","story":[{"type":"markdown","id":"203fd646b7fa778a","text":"The `fedwiki-merge` skill analyses and cleans up a federated wiki that has been superseded by a newer domain. When a site is replaced (e.g. `david.ide.earth` → `david.vision.ide.earth`), the old site is a mix of pages already copied to the new site, standard boilerplate, and unique content worth keeping. The skill separates these and handles each appropriately, ending with a full delete of the old domain."},{"type":"markdown","id":"a77a196823945b8b","text":"## Step 1 — Analyse\n\nDry run — prints a categorised report, no files touched:\n\n```bash\nfedwiki-merge-analyse david.ide.earth david.vision.ide.earth\n```\n\nPages are placed into categories:\n\n| Category | Meaning | Action |\n|---|---|---|\n| `BOILERPLATE` | Standard tool pages (changes-to-this-site, welcome-visitors, tools…) — checked first, regardless of date | Trash |\n| `DUPLICATE_OLDER` | Same slug in new site; old version is older | Trash |\n| `MINIMAL` | ≤ 1 item AND < 100 chars | Trash |\n| `DUPLICATE_NEWER` | Same slug in new site; old version is newer | Review |\n| `UNIQUE_CONTENT` | Only in old site, has real content | Move |"},{"type":"markdown","id":"aa8effb402f16945","text":"## Step 2 — Move Unique Pages\n\nMoves all `UNIQUE_CONTENT` pages from the old site into the new site's `pages/` folder, pushes each to Nextcloud, and deletes each from the old site's remote. Pages already present in the new site are never overwritten.\n\n```bash\nfedwiki-merge-move david.ide.earth david.vision.ide.earth\n```\n\nTo move a specific page:\n\n```bash\nfedwiki-merge-move david.ide.earth david.vision.ide.earth my-page\n```"},{"type":"markdown","id":"4a33f21eed5f4263","text":"## Step 3 — Trash Safe Pages\n\nMoves `BOILERPLATE`, `DUPLICATE_OLDER`, and `MINIMAL` pages to `{old-domain}/recycler/` and deletes them from the remote. The recycler is a local safety net — pages can be manually recovered from there.\n\n```bash\nfedwiki-merge-trash david.ide.earth david.vision.ide.earth\n```"},{"type":"markdown","id":"a420c09bbed180b2","text":"## Step 4 — Reindex\n\nRebuilds the sitemap and search index on both sites after the moves and deletions:\n\n```bash\nnextcloud-reindex david.vision.ide.earth\nnextcloud-reindex david.ide.earth\n```"},{"type":"markdown","id":"833f07492c2f7757","text":"## Step 5 — Delete the Old Site\n\nOnce the old site's `pages/` folder is empty, delete the whole domain — WebDAV deletes the remote folder, then removes the local folder:\n\n```bash\nfedwiki-delete-site david.ide.earth\n```\n\nIf pages remain and you want to delete anyway:\n\n```bash\nfedwiki-delete-site david.ide.earth --force\n```"},{"type":"markdown","id":"bf10022d9bcea4e8","text":"## Scripts\n\n- `~/bin/fedwiki-merge-analyse` — categorised report, dry run\n- `~/bin/fedwiki-merge-move` — move unique content to new site\n- `~/bin/fedwiki-merge-trash` — move safe pages to recycler\n- `~/bin/fedwiki-delete-site` — delete entire domain locally and remotely\n\nAll scripts read credentials from `NC_USER` and `NC_PASSWORD` in the environment (set in `~/.zshrc`)."},{"type":"markdown","id":"dcdc79a4fcae5b6b","text":"# Assets"},{"type":"assets","id":"a8b04674fd1a95e0","text":"fedwiki-merge-skill"},{"type":"markdown","id":"7496927b08d2c78b","text":"## Related\n\n- [[Fedwiki Journal Skill]] — strip accumulated journal history before merging\n- [[Nextcloud Push Script]] — the WebDAV push used by fedwiki-merge-move\n- [[Fedwiki Reindex Skill]] — reindexing after bulk page changes"}],"journal":[{"type":"create","item":{"title":"Fedwiki Merge Skill","story":[{"type":"markdown","id":"203fd646b7fa778a","text":"The `fedwiki-merge` skill analyses and cleans up a federated wiki that has been superseded by a newer domain."}]},"date":1780927723000,"certificate":"from marvin"},{"type":"add","id":"dcdc79a4fcae5b6b","item":{"type":"markdown","id":"dcdc79a4fcae5b6b","text":"# Assets"},"date":1782590716832,"certificate":"from marvin","after":"bf10022d9bcea4e8"},{"type":"add","id":"a8b04674fd1a95e0","item":{"type":"assets","id":"a8b04674fd1a95e0","text":"fedwiki-merge-skill"},"after":"dcdc79a4fcae5b6b","date":1782590716832,"certificate":"from marvin"}]}