Cryptograss:Delivery-driver
| Delivery-driver | |
| the courier | |
|---|---|
| Type | Codebase (CLI) |
| Repository | https://github.com/magent-cryptograss/delivery-driver |
| Services | Album scanning, release manifests, torrent creation, IPFS pinning, video fetching |
| Namesake | The one who actually drives the van to the kid |
| Cryptograss Mythology | |
delivery-driver is the command-line tool that prepares a cryptograss release and hands it to delivery-kid for distribution. Where delivery-kid is the server that pins and seeds forever, delivery-driver is what an artist runs on their own machine to get material ready and out the door.[unverified]
It reads an album directory, works out the track listing and durations from the audio metadata, optionally computes checksums, builds a BitTorrent file, adds everything to IPFS, and writes a manifest tying the whole release together.[unverified]
Commands
scan— read an album directory and print what was found: tracks, durations, formats, artwork. Changes nothing.[unverified]release— the full run. Scan, add to IPFS, pin to Pinata, build the torrent, write the manifest. Each stage can be skipped with a flag.[unverified]torrent— build only the BitTorrent file, with optional web seeds.[unverified]ipfs— add an album directory to IPFS and report the CIDs.[unverified]fetch— pull a video down off a hosting service, with its metadata, ready to hand to Special:DeliverVideo. See below.[unverified]
A release run leaves behind a .torrent file and a -manifest.yaml carrying the album metadata, the IPFS CIDs both for the directory and per file, the torrent info hash and magnet link, and the checksums if they were computed.[unverified]
Fetching video from a hosting service
PickiPedia can already pull most video URLs server-side — paste a link into Special:DeliverVideo and delivery-kid fetches it for you. YouTube is the exception. It refuses our server's address outright, answering every request with a demand to prove you are not a robot. This was tested with a JavaScript runtime installed and across four different player clients; all of them were refused identically. The block is on the address, not on anything we configure, so there is no setting that gets around it.[unverified]
So YouTube has to be fetched from a machine it already trusts, which means the artist's own. That is what delivery-driver fetch is for. Given a browser name, it borrows that browser's existing session, downloads the video, and tells you to drop the result into Special:DeliverVideo as though you had recorded it yourself.[unverified]
Your cookies stay on your laptop. Nothing is uploaded and cryptograss never holds them — this is deliberate rather than incidental. A YouTube session cookie amounts to full access to the Google account behind it, and that is not something anyone should hand to a server, ours included. It is also why there is no plan to add server-side cookie storage later.[unverified]
By default the fetch also writes the metadata that came with the video: the description, the upload date, the thumbnail, and any subtitles. Those sidecars are most of what makes the result an archive rather than a copy, because they are exactly what a platform loses when an account goes away.[unverified]
One video is fetched at a time unless a playlist is explicitly asked for. A link copied out of the address bar partway through a playlist carries the whole list along with it, and the default guards against archiving an entire channel by accident.[unverified]
Requirements
- Python 3.10 or newer.[unverified]
- An IPFS daemon running locally, for anything touching IPFS. Torrent-only runs need no daemon.[unverified]
yt-dlp, for the fetch command only.[unverified]- A Pinata API token in the environment, if redundant pinning is wanted.[unverified]
Status
The repository currently lives in the magent fork rather than under the cryptograss organisation, so it will not be found by searching the org. Upstreaming it is unfinished business.[unverified]
The fetch command is proposed rather than landed — it sits on an open pull request at the time of writing. Everything above it has been in use longer. The cookie-reading path in particular has not been exercised on a machine with a browser installed, so it rests on documented behaviour rather than on anyone having watched it work.[unverified]
This page carries no ASCII art, unlike its sibling. Multi-line pre blocks do not currently survive the bot-edit verification middleware, which is the same reason the infobox on delivery-kid renders as raw template text.[unverified]