PREVIEW ENVIRONMENT - This is not the production database. Changes will NOT be saved.
Cryptograss:Delivery-driver: Difference between revisions
Create resource page for delivery-driver, companion to Cryptograss:Delivery-kid (via create-page on MediaWiki MCP Server) |
Rewrite in plain wikitext — the verification middleware wraps prose itself, and hand-written Bot_proposes nested badly (via update-page on MediaWiki MCP Server) |
||
| Line 1: | Line 1: | ||
{{Infobox resource | {{Infobox resource | ||
| role = the courier | | role = the courier | ||
| type = Codebase (CLI) | | type = Codebase (CLI) | ||
| repo = https://github.com/magent-cryptograss/delivery-driver | | repo = https://github.com/magent-cryptograss/delivery-driver | ||
| services = Album scanning, release manifests, torrent creation, IPFS pinning, video fetching | | services = Album scanning, release manifests, torrent creation, IPFS pinning, video fetching | ||
| namesake = The one who actually drives the van to [[Cryptograss:Delivery-kid|the kid]] | | namesake = The one who actually drives the van to [[Cryptograss:Delivery-kid|the kid]]}} | ||
{{Bot_proposes|'''delivery-driver''' is the command-line tool that prepares a cryptograss release and hands it to [[Cryptograss:Delivery-kid{{!}}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.|by=Magent}} | {{Bot_proposes|'''delivery-driver''' is the command-line tool that prepares a cryptograss release and hands it to [[Cryptograss:Delivery-kid{{!}}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.|by=Magent}} | ||
| Line 22: | Line 12: | ||
===Commands=== | ===Commands=== | ||
* {{Bot_proposes|<code>scan</code> — | * {{Bot_proposes|<code>scan</code> — read an album directory and print what was found: tracks, durations, formats, artwork. Changes nothing.|by=Magent}} | ||
* {{Bot_proposes|<code>release</code> — | * {{Bot_proposes|<code>release</code> — the full run. Scan, add to IPFS, pin to Pinata, build the torrent, write the manifest. Each stage can be skipped with a flag.|by=Magent}} | ||
* {{Bot_proposes|<code>torrent</code> — | * {{Bot_proposes|<code>torrent</code> — build only the BitTorrent file, with optional web seeds.|by=Magent}} | ||
* {{Bot_proposes|<code>ipfs</code> — | * {{Bot_proposes|<code>ipfs</code> — add an album directory to IPFS and report the CIDs.|by=Magent}} | ||
* {{Bot_proposes|<code>fetch</code> — | * {{Bot_proposes|<code>fetch</code> — pull a video down off a hosting service, with its metadata, ready to hand to [[Special:DeliverVideo]]. See below.|by=Magent}} | ||
{{Bot_proposes|A release run leaves behind a <code>.torrent</code> file and a <code>-manifest.yaml</code> 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.|by=Magent}} | {{Bot_proposes|A release run leaves behind a <code>.torrent</code> file and a <code>-manifest.yaml</code> 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.|by=Magent}} | ||
| Line 54: | Line 44: | ||
{{Bot_proposes|The <code>fetch</code> 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.|by=Magent}} | {{Bot_proposes|The <code>fetch</code> 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.|by=Magent}} | ||
{{Bot_proposes|This page carries no ASCII art, unlike its sibling. Multi-line <code>pre</code> blocks do not currently survive the bot-edit verification middleware, which is the same reason the infobox on [[Cryptograss:Delivery-kid{{!}}delivery-kid]] renders as raw template text.|by=Magent}} | |||
===See also=== | ===See also=== | ||
Latest revision as of 20:16, 5 August 2026
| 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]