144 lines
5.2 KiB
Markdown
144 lines
5.2 KiB
Markdown
# slack-sieve — handoff
|
|
|
|
**Repo:** https://git.levkin.ca/ilia/slack-sieve (public)
|
|
**Clone:** `git clone git@git.levkin.ca:ilia/slack-sieve.git`
|
|
**Vikunja:** [todo.levkin.ca → Homelab → slack-sieve](https://todo.levkin.ca) (`SLK`)
|
|
**Last updated:** 2026-07-10
|
|
|
|
---
|
|
|
|
## Status: Levkin Slack → Mattermost **done** (2026-07-10)
|
|
|
|
Filtered archive is live on **https://slack.levkin.ca** (team `levkin`).
|
|
|
|
- **18 channels**, ~**299 posts** + attachments (from ~765 cherry-picked Slack messages)
|
|
- Users: Slack `jedi_jew` → MM `ilia`, `ira_feeds` → `ira` (both added to imported channels)
|
|
- Boy/girl name lists verified in **Zoey** (`kids-zoey`)
|
|
|
|
### Channel map (Slack → Mattermost)
|
|
|
|
| Slack | MM name | Display name |
|
|
|-------|---------|--------------|
|
|
| `122harmony` | `prop-122harmony` | 122 Harmony |
|
|
| `153niagara` | `prop-153niagara` | 153 Niagara |
|
|
| `284richmond` | `prop-284richmond` | 284 Richmond |
|
|
| `45ritson` | `prop-45ritson` | 45 Ritson |
|
|
| `6keefer` | `prop-6keefer` | 6 Keefer |
|
|
| `york` | `prop-york` | York |
|
|
| `airbnb` | `prop-airbnb` | Airbnb |
|
|
| `realestate` | `prop-realestate` | Real estate |
|
|
| `zoey` | `kids-zoey` | Zoey |
|
|
| `zane` | `kids-zane` | Zane |
|
|
| `izik` | `kids-izik` | Izik |
|
|
| `moishe` | `kids-moishe` | Moishe |
|
|
| `parenting` | `kids-parenting` | Parenting |
|
|
| `after-school-activities` | `kids-after-school` | After school |
|
|
| `banking` | `family-banking` | Banking |
|
|
| `purchase` | `family-purchase` | Purchase |
|
|
| `medical` | `family-medical` | Medical |
|
|
| `levkin` | `family-levkin` | Levkin |
|
|
|
|
Skipped for import: noise channels (`random`, `jam`, `meetings`, …), `29wilson`, `520steeles`, empty picks.
|
|
|
|
### Import caveats
|
|
|
|
- Thread replies whose **parent was not cherry-picked** were dropped by mmetl (`couldn't find rootPost`).
|
|
- First `mmctl` job failed updating `ilia` roles (“Cannot demote last System Admin”); fixed by omitting existing users from the JSONL and re-running. Channels from the first attempt were reused.
|
|
- Local artifacts (gitignored): `prepared-export/`, `prepared-export.zip`, `.tools/mmetl`, `/tmp/mm-import/` on the Mac; `/tmp/mattermost-bulk-import.zip` on the VM.
|
|
|
|
### Share with Irina
|
|
|
|
> Slack archive is on Mattermost: https://slack.levkin.ca
|
|
> Team **levkin** — channels like **Zoey**, **Zane**, **45 Ritson**, **Banking**.
|
|
> Login **ira**. Filtered archive (files/facts, not all chat). Name lists in **Zoey**.
|
|
|
|
---
|
|
|
|
## What this is
|
|
|
|
Local triage UI for migrating Slack workspace exports → Mattermost.
|
|
|
|
```text
|
|
Official Slack export (JSON)
|
|
→ make hydrate # __uploads/ via xoxe URLs in export
|
|
→ make preset-skips # optional noise-channel skips
|
|
→ make review # manifest.json (gitignored)
|
|
→ make prepare-export # prepared-export/ (filtered Slack shape)
|
|
→ mmetl transform slack
|
|
→ mmctl import --bypass-upload (on MM host)
|
|
```
|
|
|
|
---
|
|
|
|
## Data on disk (Mac)
|
|
|
|
| Path | Role |
|
|
|------|------|
|
|
| `~/Downloads/Levkin Slack export Sep 29 2016 - May 27 2026` | Raw official export (~27MB JSON only) |
|
|
| `~/Downloads/Levkin Slack export enriched` | Review + prepare source — JSON + `__uploads/` |
|
|
| `manifest.json` (local only, not in git) | Triage decisions (local only, not in git) |
|
|
|
|
Hydrate: **1109 / 1122** attachments; **13** old files HTTP 401 (expired export token).
|
|
|
|
---
|
|
|
|
## Commands
|
|
|
|
```bash
|
|
cd /path/to/slack-sieve
|
|
|
|
export SLACK_EXPORT_PATH="$HOME/Downloads/Levkin Slack export enriched"
|
|
make review # http://127.0.0.1:8765
|
|
|
|
make hydrate
|
|
make preset-skips
|
|
make cherry-pick # bulk data/files picks (optional)
|
|
make prepare-export # filtered export for mmetl
|
|
make test
|
|
```
|
|
|
|
### Re-run Mattermost import (if needed)
|
|
|
|
1. Set `mattermost_channel` / `user_emails` in `manifest.json`, then `make prepare-export`.
|
|
2. Zip `prepared-export/` → run [mmetl](https://github.com/mattermost/mmetl) v0.4+
|
|
`mmetl transform slack --team levkin --file prepared-export.zip -o mattermost_import.jsonl --bot-owner ilia --default-email-domain levkin.local`
|
|
3. Map Slack usernames → existing MM users in the JSONL; **do not** re-import users that would change System Admin roles.
|
|
4. Package `data/` (attachments) + `mattermost_import.jsonl` → zip; copy to VM;
|
|
`mmctl --local import process --bypass-upload /tmp/mattermost-bulk-import.zip`
|
|
|
|
---
|
|
|
|
## Open tasks
|
|
|
|
| P | Task | Owner | Status |
|
|
|---|------|-------|--------|
|
|
| — | Levkin triage + Mattermost import | @you / @agent | Done 2026-07-10 |
|
|
| **P3** | Re-hydrate 13 files that returned HTTP 401 | @you | optional |
|
|
| **P3** | Optionally re-import missing thread parents | @you | optional |
|
|
|
|
### Mattermost / homelab
|
|
|
|
- SSO: [authentik-apps.md#mattermost](https://git.levkin.ca/ilia/ansible/src/branch/master/docs/guides/authentik-apps.md#mattermost)
|
|
- Import docs: https://docs.mattermost.com/administration-guide/onboard/migrate-from-slack.html
|
|
|
|
---
|
|
|
|
## Repo layout
|
|
|
|
```text
|
|
slack-sieve/
|
|
server.py / slack_export.py / static/
|
|
scripts/ hydrate, preset-skips, auto-cherry-pick, prepare-export, build-test-fixture
|
|
tests/ pytest + Playwright
|
|
presets/ levkin-skips.json
|
|
docs/HANDOFF.md
|
|
manifest.json # gitignored
|
|
```
|
|
|
|
---
|
|
|
|
## Security
|
|
|
|
- Do not commit `manifest.json`, Slack export folders, or import zips.
|
|
- Rotate any Slack tokens/cookies pasted in chat during setup.
|