Skip to content

Instantly share code, notes, and snippets.

@fsLeg
fsLeg / get-crates.py
Last active July 19, 2026 16:41
This is a helper script for packaging Rust programs using SlackBuilds. It can generate links to crates, their MD5 hashes, fill a template .info file with crates' links and checksums and vendor pre-downloaded crates for offline building with Cargo
#!/usr/bin/env python3
# Funny enough, this script does everything but actually get crates :D
import json
import requests
import tarfile
import re
from sys import exit, stderr
from hashlib import md5, sha256