Cobra 745844f721 install.sh: skip pip when requests is already system-wide
PEP 668 Debian 13 systems error out on 'pip install --user'. Runtime
only needs requests; pytest+requests-mock are test-only. Detect the
runtime dep first and fall back to pip only when missing.
2026-06-11 09:37:02 -04:00

coe-mirror

Mirror Nightmare_Eclipse repos from Church of Malware to pCloud.

What it does

Monitors Nightmare_Eclipse on git.churchofmalware.org for new or updated repos. Downloads per-commit zip snapshots to ~/pCloudDrive/Hacking/Nightmare_Eclipse/. Falls back to local staging when pCloud is down. Runs at 00:00 and 12:00 daily with boot catch-up.

Filename convention

{repo}_{short_sha}.zip where short_sha is the first 8 chars of the HEAD commit SHA on the default branch. New commits produce new files; old snapshots stay as history.

Install

cd ~/tools/coe-mirror
bash install.sh

Manual run

systemctl --user start coe-mirror.service
# or directly:
python3 ~/tools/coe-mirror/coe_mirror.py

Logs

  • File: ~/.local/share/coe-mirror/coe-mirror.log (rotated at 5 MB, 3 backups)
  • Journal: journalctl --user -u coe-mirror.service -n 100

Storage estimate

8 repos × 2 runs/day × ~1 commit/repo/day ≈ 16 zips/day ≈ ~5 MB/month at current zip sizes (~265 KB each). Old snapshots accumulate — no automatic pruning. Manually prune ~/pCloudDrive/Hacking/Nightmare_Eclipse/ if needed.

Behavior when pCloud is down

Downloads land in ~/.local/share/coe-mirror/pending/. Next run (or any subsequent invocation) flushes them to pCloud once the mount is healthy. No auto-start of the pCloud daemon — by design, because the daemon is a GUI AppImage with no systemd user unit. If pCloud is offline, ensure the user session is active and pCloud is running before the next scheduled run, or trigger manually.

Catch-up after machine was off

The timer is Persistent=true and OnBootSec=2min. Missed windows run automatically on next boot. The tool also diffs against the pCloud directory, so even if a run is skipped entirely, the next run catches up everything that's missing.

Matrix notification

Currently a stub. Real implementation deferred until the home Matrix server is back. Reference: ~/tools/devtrack/scripts/matrix_alerts.py shows the auth + send pattern (Infisical creds MATRIX_USER_ID and MATRIX_ACCESS_TOKEN from the devtrack folder, POST to /_matrix/client/r0/rooms/{room_id}/send/m.room.message).

Testing

cd ~/tools/coe-mirror
python3 -m pytest tests/ -v

Uninstall

systemctl --user disable --now coe-mirror.timer
rm ~/.config/systemd/user/coe-mirror.{service,timer}
systemctl --user daemon-reload
S
Description
Mirror repos from a Forgejo/Gitea instance to a local directory. Owners configured via ~/.config/coe-mirror/config.toml.
Readme 243 KiB
Languages
Python 96.9%
Shell 3.1%