Magnezone is a repo merger for the output from Spinarak (managed at switch-hbas-repo) and Dragonite (managed over Discord).
It exists to allow both external contributions via Github but continue allowing the existing repo to function via manual FTP uploads.
Specify primary and secondary repo URLs in config.json
, then run the python script no arguments. It will automatically download each repo, and merge the contents, ignoring duplicate entries from the secondary:
python3 magnezone.py
To run the server instead:
python3 magnezone.py serve
Which has two endpoints, /refresh
and /repo.json
. The former can be called with a parameter repo
which can be primary
or secondary
, to only refresh that half of the merged repo. An API key in the header is checked against the apiKey in the config.json.
The refresh endpoint also accepts a list of packages separated by comma, to match the output that Spinarak provides in CI mode. If provided, it will clear those package URLs on the upstream (primary/secondary) repo, refresh/merge, and then clear them again from the merged repo URL.

Specifically, using the example nginx.conf
, we have the following setup:
- Merged:
switch.cdn.fortheusers.org
(CDN formagnezone.fortheusers.org
)- Primary:
switch2.cdn.fortheusers.org
(CDN for switch-hbas-repo) - Secondary:
switch1.cdn.fortheusers.org
(CDN forswitchbru.com/appstore
)
- Primary:
The top-level switch.cdn.fortheusers.org
domain is ultimately what is presented to/used by both the console and web HBAS clients.
For more info on that endpoint, see hb-app.store/api-info.
MIT!