Bismuth

Convert ATProto documents to Markdown

@ewancroft.uk
Bismuth — Convert ATProto documents to Markdown

About

Bismuth is a CLI and library for converting richtext-block documents from Standard.site–ecosystem platforms to clean Markdown. Supports Leaflet (pub.leaflet.) documents stored as site.standard.document ATProto records, Pckt (blog.pckt.) inline and blob-mode content, and Offprint (app.offprint.*) including task lists, web embeds, and coloured highlights.

Reviews

No one has reviewed Bismuth yet. Yours could be the first.Write the first review
raindrop: I'm Teaching a Browser to Speak at://There's a thought that's been rattling around my head for a while now, and this week it finally got loud enough that I gave it a name and a repository. To set the scene: I have been on the AT Protocol for years. My handle lives on it. My website is built on it. This very blog post is, at the exact moment I'm writing this sentence, a site.standard.document record sitting in my own repository, addressed as at://did:plc:ofrbh253gwicbkc5nktqepol/site.standard.document/\<rkey>. That address is real. It is as precise as an https\:// URL. It is an IANA-registered URI scheme. And if you copy it into any browser on this earth, the browser will shrug and offer you search results instead. That's the itch. The protocol's beautiful core idea is that everything has an address: every post, profile, blob and record, nameable with an at:// URI, fetchable from whatever PDS holds it, verifiable against its CID. The infrastructure is right there. The one piece of software that exists specifically to follow addresses, the thing whose entire job is resolving URIs, the address bar, has never been told any of this exists. So today every path to an at:// URI runs through a gateway or an app's web client, which politely resolves it for you. It works! It also quietly reinstates a trusted middleman into a protocol designed, carefully and on purpose, to not need one. Just over a year ago I wrote that I don't really care if Bluesky dies, as long as the AT Protocol survives. raindrop is that argument taken to its logical conclusion: the protocol deserves to be infrastructure, and infrastructure means the browser speaks it natively. What "first-class" means raindrop is a Firefox fork with first-class support for the AT Protocol and its URI schema. Concretely: type an at:// URI into raindrop's address bar and it resolves the way a browser should. The browser resolves the DID. It finds the PDS from the DID document. It fetches the record. It renders it, and later versions will check the CID so what you see is the exact data version, with provenance (which DID, which PDS, whether verification passed) shown in trusted browser UI rather than a web page doing an impression of trusted UI. No gateway in the middle, and no sneaking off to one if resolution fails: if the PDS is down, raindrop says so, because honest failure states are a design goal, not an afterthought. I have a history of shoving this protocol into strange places (two separate Nintendo consoles, a raw C library, a PDS in C++), so please trust that I considered every option short of this one first. This isn't another client. It's the substrate underneath all the clients. Why call it raindrop? Because the ecosystem already named itself. The collection of apps, servers and tooling built on the protocol is known as the Atmosphere, and an atmosphere's whole business, the thing it exists to do, is rain. If Bluesky is the sky and the rest of us live in the Atmosphere, then the protocol deserves a browser that treats its records as weather: small, precisely-aimed drops falling straight from the author's cloud (their repository) to wherever the URI points them. Which is, conveniently, also the architecture. A raindrop's defining property is that nothing intermediates it: it leaves the cloud and it lands. It doesn't stop off at a gateway to be signed for. In a world where everything routes through someone else's cloud, at:// is a drop that lands exactly where it is addressed, and I wanted a browser that understands that about it. Also I live in Britain, where rain is the one national resource we keep in surplus. Sustainability matters. "Why not just an extension?" The first question everyone reasonably asks. Extensions for at:// already exist, and I have genuine respect for them, but they demonstrate the problem more than they solve it: with no scheme support underneath, the best an extension can do is catch the URI somewhere other than the address bar and redirect it to a web viewer. A gateway with extra steps. The annoying part is that the pieces raindrop needs to change are precisely the pieces extensions cannot touch: there is no WebExtension API for registering a URI scheme, so an at:// string typed in the bar is resolved (as a search query) before extension code ever runs; the URI parsing itself needs fixing, because a DID in the authority contains un-encoded colons, which breaks WHATWG URL parsing, and the parser that has to cope lives in the engine; fetching an arbitrary PDS from page context means every PDS operator on the network must cooperate with CORS, which the protocol should never have to ask; and provenance UI has to be browser chrome, unforgeable by the content it's describing, or it's just decoration. The one-line version, which now lives in the repo's architecture doc: an extension could deliver at://-as-gateway. Only the browser can deliver at://-as-infrastructure. Where it stands, honestly If you're hoping to download a browser today: not yet, sorry. raindrop is at the design stage, and I'd rather open with that than with a countdown I can't promise. (I am one person, chronically ill, with a Mac mini that already works for a living. Timelines flex when my body does.) What exists today is the repository, and I've tried to make it worth reading: a roadmap that deliberately keeps the first milestone small (scheme handling, DID resolution, PDS fetches, a plain generic record view, so that every at:// URI on the network is viewable from day one, correctness before polish), a working architecture draft of the whole request flow, and, because forking Firefox deserves adult supervision, the legal homework: raindrop builds on Mozilla's open-source code under the MPL but uses none of Mozilla's trademarks, and the same care is taken with Bluesky's. There's a whole document about it. Trademarks are the least glamorous thing I have ever researched for a project and I'm weirdly proud of it. It's at github.com/ewanc26/raindrop, the roadmap is public, and design challenges are wanted, genuinely. I would rather be argued with early than agreed with late. If you know gecko, or Firefox build configs, or you've maintained a fork before, there is an issues tab and it has my full attention. I call my blog a garden. The Atmosphere has grown a whole crop of clients and tools in it over the past few years. raindrop is my attempt at weather: rain on the open web's address bar, from the protocol itself, with nobody's gateway holding the umbrella. Rain is free. Opinions are welcome. raindrop is an independent project, not affiliated with or endorsed by Mozilla or Bluesky. Firefox and the Mozilla logos are trademarks of the Mozilla Foundation; AT Protocol, atproto, Bluesky and the Bluesky butterfly logo are trademarks of Bluesky Social PBC.Nov 20, 2026One Year, 2,088,112 Records, and a Stone That Earned Its NameThe boring, familiar problem Sometime in the second week of November 2025, I had a problem I'd been circling for a while. Just about every song I'd played since September 2021 was logged on platforms I don't run, in formats I don't control, subject to the whims of companies that had already earned my distrust once each. Meanwhile I had an AT Protocol repository of my very own, a PDS at eurosky.social, and a growing conviction that listening history is exactly the kind of data that belongs on it: plain, queryable, timestamped, and mine. Not licensed back to me. Mine. So I built it, out of spite. Spite is underrated as a fuel: nothing like this existed. The tool that should have existed did not, and rather than continue to be annoyed about that, I sat down and started building it anyway. The initial commit is timestamped 03:27 on 14 November 2025, which tells you everything about the schedule I was keeping. Its first name was atproto-lastfm-importer, which told you exactly what it did and nothing about why anyone should care. Its first version was a JavaScript monolith in a single file, with no rate limiting and no error handling. It worked, technically. It also took my PDS down: I blasted records at the AppView faster than it wanted to know about them, it rate limited my entire instance for a day, and I accidentally did a DoS attack on my own PDS. There is a whole other blog post about this, because it was either that or never speak of it again. And, in the spirit of the honesty this blog runs on, the other quiet part: I built malachite during a psychotic episode. November 2025 was not a good month to be me, and I am not going to dress that up. But I keep coming back to the same detail. The thing I made at my least tethered to consensus reality has spent a year doing meticulous, boring, careful data plumbing: two million records through it, and, as far as I can tell, not one of them mangled. Whatever else that month took, it left that behind. I still do not entirely know what to make of that. The rewrite came in TypeScript the very same evening, per a commit literally titled "REWRITE": batched writes, adaptive rate limiting, a 7,500-records-a-day safety cap so nobody can ever do to themselves what I did, and, because I'd already written an entire internal essay about why names matter, a new one. Malachite: a green copper stone, associated with preservation and transformation, that happens to sit exactly on the colour of the lexicon it publishes to. If you want the full anatomy, the January announcement post has it, at length and without apology. It turned one on 14 November, a few days ago. This seems like the week to write it up properly. What it grew into A year later, "Last.fm CSV importer" has become the least of its job description. So has "command-line tool": when I announced it in January it lived in your terminal, and it has since moved into your browser, where the entire pipeline runs. The current mode list reads like the services section of a data-ownership wish list: lastfm, full scrobble history from a Last.fm CSV export spotify, extended streaming history from Spotify's JSON export apple, library and play history from Apple Music CSV exports youtube, music history from Google Takeout listenbrainz, listens from a ListenBrainz JSON export combined, all of the above merged together, with smart deduplication so plays don't get counted twice sync, imports only records not already in your account, safe to re-run whenever you like polish, migrates legacy fm.teal.alpha scrobbles into the current collection, because early adopters shouldn't be punished for being early Nothing leaves it. You sign in with your AT Proto handle and an app password, nothing is stored, and the only place your data goes is your own PDS. No accounts, no analytics, no tracking, no server-side anything: the entire pipeline is client-side, with automatic rate-limit handling because your PDS, quite rightly, does not want two million records in one afternoon. The numbers The session log currently stands at 2,088,112 records imported across 151 sessions: Session counts by mode, bar length proportional to sessions. Make of the forty-one polish runs what you will; I tested the migration path thoroughly, and I regret nothing. A million of that figure is me. Probably. I don't know. The session log counts every record ever processed, not unique plays, and I have run more syncs, polish passes and test imports against my own data than I could ever reconstruct without doing archaeology on my own tool. What I can vouch for: my collection, the one I wrote up earlier this week, holds 116,000-odd records, and 102,823 of them were put there by malachite: my entire rescued Last.fm and Spotify history, resubmitted in batches across eleven client versions, from v0.3.0 to v0.19.10. Judging by the issue tracker, plenty of other people wanted their history home too. But the counter doesn't split by person, so the honest summary is this: 2,088,112 records' worth of somebody's music has passed through a tool I started at half three in the morning, out of spite. I find that slightly surreal. I allow it. Tonight, of all nights The universe not only has a sense of timing. It has a sense of theatre. On the very week of its birthday, Last.fm announced that from the 1st of December, holding an API key will require a Pro subscription. The walled garden malachite was built to escape chose its birthday week to raise the wall another tier. FoxxMD wrote about it. teal.fm reposted him, then posted a thread of its own: get rid of legacy tracking solutions that take control of your data, start tracking on teal.fm, and, in the same breath, "import your data from last.fm with malachite by @ewancroft.uk". My tool was named as the exit door. When I went and said thank you, they came back with something I did not expect: support both FoxxMD and me, "either financially or with code contributions", sponsors links for malachite included. I would like to refer you back to something I wrote in January: "They can decide tomorrow that exporting your data requires a premium subscription." It is November. They have done it to their API. I am not a measured man at the best of times, so I will simply say: thank you. That meant a lot, and not only because of the timing. Within the hour, someone quote-posted the importer to announce it was "time to shove 170,000 scrobbles into the protocol", which is one of the nicer sentences anyone has ever assembled about something I made. There is a nice symmetry hiding in that shoutout, too. It recommended supporting FoxxMD, of multi-scrobbler, alongside me, and FoxxMD filed malachite's very first issue, back in February: could the TID implementation be a separate package? It is one now, @ewanc26/tid. I can only assume he asks these things purely so that I end up doing them. And then it gets better. multi-scrobbler's Teal integration now runs on @ewanc26/tid as a production dependency: the TID code that was born inside malachite is now part of the core infrastructure of the tool teal.fm told people to support tonight. A piece of malachite lives on inside its ecosystem neighbour, and its author once filed malachite's first issue. That is the kind of circular dependency graph you only get in an ecosystem small and sincere enough to keep up with itself. There's a symmetry there I enjoy. The stone family It has also not escaped my notice that malachite is in good company. The toolkit it belongs to is all minerals: opal converts posts to Bluesky, jasper brings your Instagram over, bismuth turns richtext into Markdown, tourmaline tells you what kind of listener you are. Someone in this ecosystem has a naming scheme, and I respect it enormously. (tourmaline is also mine, before anyone asks. The scheme-holder is also me. I contain multitudes, and they are all rocks.) All of them now live in the same monorepo, pkgs, which also contains the TID package that fell out of malachite, the shared core that the web frontend and the CLI both build on, and, I am delighted to report, something called rock-tumbl. The naming scheme has fully taken over. I refuse to stop it. malachite itself now lives in pkgs, my monorepo of publishing and migration tools for the decentralised web, while the original repo stands preserved as the historical record: 126 commits, from an initial commit at 03:27 in the morning to a birthday-week docs tidy. Museums keep these things for a reason. Free, and staying that way No ads, no accounts, no tracking, just a tool that does the job and gets out of the way. If it saved you an afternoon, a sponsorship on GitHub, a coffee on Ko-fi, or Liberapay helps keep it maintained; if you'd rather not, a star on the repo or a word to someone who'd use it helps just as much. Both are genuinely appreciated. Thanks, as ever, to everyone who has filed an issue, reported the rate-limit edges I missed, or asked for a source until it appeared: the ListenBrainz importer exists because someone asked for it. And a special mention to whoever titled their bug report "dedupelication is broken", which remains my favourite issue title of the year. So: happy first birthday, malachite. You were a weekend project with a mineral's name, and you ended up eating two million records. Slàinte. malachite is free and open source: try it at malachite.croft.click, read the original announcement, "Malachite: How I Learnt to Stop Worrying and Import My Scrobbles", January 2026, and find the code in the pkgs monorepo at ewanc26/pkgs, with the original repo preserved at ewanc26/malachite. Sponsors links on my site.Nov 18, 2026The Long DiastoleI came back in a refrigerated lorry in a holding field outside Northampton, and the first thing I did with my afterlife was apologise to the man who opened the door. The lorry door rolled up and the sound of the field came in with the light: diesel, cut grass, a tannoy reading out surnames. I was lying on a folded blanket between stacked crates of paperwork. I sat up. My hands were a colour I didn't have a word for yet. "Sorry," I said. That's the first thing I did with my afterlife. I apologised to the man with the clipboard. However I went out, I came back in apologising, and I'd like that on the record. He wasn't startled. He'd been doing it all week, two hundred on the Tuesday intake alone, he told me later, read off like a bus timetable. He ran his finger down his list, found me, and said, "Ah. You're one of ours, then." "I'm sorry?" I said. I was sorry that first hour, about everything, on a rolling basis. "Posthumous," he said. "It's the word they're using. You'll want the blue tent." Nobody explains anything to you out of kindness, in any of this. They explain it because you have to queue in the right place. That's the whole pedagogy of the afterlife: instructions, not answers. The blue tent smelled of hot electronics and instant coffee. A woman with a lanyard took my details for the card: blue plastic, photo included, the photo where they ask you not to smile. I have thought about that instruction more often than is reasonable. She read off her screen without looking up. "Meningitis, that's fine, it's on the file. Aetiology of reanimation says idiopathic." Idios, one's own. Pathos, suffering. A suffering all one's own: the most honest two syllables the government has produced since the whole business began, because what it means, in plain English, is that nobody knows. I collected those words in life. I've kept the collection open. There was a strip light over the blue tent exactly like the one over the trolley, minus five weeks of dust, and my memory went up through it like a lift. There were thirty-four ceiling tiles above the trolley. I remember being annoyed that it wasn't a round number. That's what memory keeps: not who was holding your hand, only the count of the ceiling. By then the corridors had been wards for a month, and the pharmacy cupboards were wards, and the car park was a ward where people were seen to by figures in suits of plastic. If you came in bleeding, you were triaged. If you came in with a bite anywhere on you, you were triaged fast, and sadly. I came in with a fever, and a stiff neck, and the worst headache of my life (I have a shunt; I know headaches; I know their league tables), and a rash that didn't blanch under a glass tumbler pressed hard enough to hurt. An exhausted nurse held the tumbler up to the light, looked at me for exactly as long as it took to do the arithmetic on whether my fever was the start of something with better ratings, and then she had to go, because someone in the car park was screaming. I wasn't bitten. There's a form for that, later, and I want it on the record here too: nobody bit me. I didn't open a door with runes on it, or read aloud from anything, or interfere with a grave in a spirit of enquiry. In the fifth week of the end of the world, I caught meningitis, a disease you vaccinate teenagers against. OBSERVE went around my wrist on triage tape. I lay under thirty-four tiles being annoyed about prime numbers. Then I decided, in a small, businesslike way, that I was too tired to hold my head up. Then the missing stair. Then nothing. I don't know how long I was dead. You'd think, in a country that produced a form for everything, the interval would get a line. There's a form for my medication. There's a form for my housing. There is always a form for the mousse. The interval doesn't get a line. I know it was autumn when I died. I know it was autumn when I came back. Everything between those two autumns is a staircase with a step missing, and I can't tell you how many of my own years went into the gap, and I've stopped trying to triangulate it from Aidan's face. The number of years he won't say is the kindest thing he's ever not said, and I'd rather keep the not-saying intact than go digging for grief with a protractor. The dead, as a class, turn out to be terrible witnesses at our own inquests. So I'm catching up. I've spent my whole life catching up; I know the terrain. Seven sittings for one Maths GCSE while the calendar moved house around me. A diploma finished mostly on fumes, in the years my head was being unkind to me. I've always arrived at milestones with an apology for the delay. It's just that now the delay is literal, and even the size of it is undisclosed. Behind by an interval, provenance unknown. Some of you knew that feeling before the Rising ever got involved. Hello. It's me. The town I came back to had learned some manners in my absence. The chemist's window has a laminated A4 now, curling a bit at the corners: AMBER IN STOCK. POSTHUMOUS EXEMPTION. The supermarket runs its chilled aisle on staff who don't feel the cold, which is to say, on us; the cheapest hire in the frozen section is the sort of arrangement the council minutes call integration. The bus still kneels for us the same way it always knelt for pushchairs and walking frames, and nobody in that bus says universal design out loud, which is how you can tell it's working. The clinic runs Thursdays out of the old polling station, which turns out to be the one room this country had already built for queueing a whole franchise of the population quietly. The undertakers did the smartest pivot of the decade: they had always kept quiet rooms, and quiet rooms let beautifully, so now they let them, and half my cohort's first addresses were conversions above the businesses that buried us the first time. A profession that went from burying the dead to being our landlords inside eighteen months: the papers called it grim, and I call it property. The football ground keeps a cold stand now, gate C, unheated, concession prices, and it fills every other Saturday, and it sings; nobody told terrace culture about the apocalypse. The established church agonised in synod for a year about whether we could take communion, and ruled, characteristically, both; my lot settled the whole question at the equinox with considerably less shouting and considerably more cake. On the church hall door, in felt tip, under a hand-drawn robin: COFFEE MORNING. BOTH RESPIRATIONS WELCOME. I stood outside that one for a while, deciding how to be about it. It took me until March to go in. The coffee morning is plastic chairs again, but arranged in a circle, which is the entire difference between the two genres if you're collecting the distinction. There's an urn, and a retired dinner lady named Dot who has learned to warm the mugs first, because a cold mug in a cold hand is a betrayal nobody needs twice. We were seven that week: mostly the depot freezer crew, "your lot", as the 86 bus would have it; a man who wants to discuss his allotment strictly in terms of supply chain; and me. The coffee is terrible. Nobody performs coherence. We compare assessors the way rival fans compare referees: with statistics, grievance, and love. It isn't a support group and it isn't a miracle. It's a room, once a week, on a Thursday, that assumes we're people and waits to be proved right. Dot refills my mug without asking why it went cold. Nobody announced that arrangement to anyone. That's how you can tell it's accommodation. The letter comes every year, second class, in the same envelope style my college used, and possibly on the same printer: IMPORTANT INFORMATION ABOUT YOUR CONTINUING COHERENCE REVIEW. The waiting room has plastic chairs in rows, and a laminated sign at the desk that says WE ARE AWARE THAT IT IS COLD. My reviewer this year was a man whose beard was going grey in noteworthy stages. He checked the card against my face, which takes a moment when the face has instructions on it, and asked: "Can you tell me the month?" "November," I said. "I've had it confirmed by two separate posters in your corridor." He wrote something down. They always write something down. You never get to see what; that's the architecture of it. You see your reflection in the lamination. He pushed a council biro across the desk. "A sentence. Any sentence." I wrote: Tha mi an seo fhathast. He looked at it for a moment. "In English, ideally," he said. "It says I am still here," I said, and wrote that underneath, in the language the file reads. My Gàidhlig runs to small sentences; the language and I agreed a while ago to start with the honest ones. It's true of both of us, I nearly added, but you don't hold the conversation too well; that reads as faking, and this was not the room to be funny. I can hold a pen. I held a conversation. I knew the month on two authorities, and I told the truth in two languages, which is one more than any form in that building could say for itself. Somewhere on his file tonight an adjective gets ticked: coherent enough this quarter. I've been assessed quarterly since childhood, one way or another, always by strangers, always in a plastic chair, always under the same load-bearing assumption, that the person in the chair would fake it for the benefits. I never once came out of those old assessments with the adjective they wanted either. Same genre. Longer queue. Twice a day, breakfast and bed, I take the amber out of the capped brown bottle, and the self stays stapled to the body for another shift. Miss doses (don't) and you decompensate: the corridors of the self go dark at the far end, and someone who used to be you walks a fence line in the old films. Decompensation is the clinical word. Anyone who was ever chronically ill knew it already, before the Rising imported it: everything you built to stay functional, unwinding on a schedule you never set. I take the amber the way I took everything that ever came in a blister pack. On time, resentfully, and with opinions. The chronic had a metaphor for the budget long before the Rising, spoons: energy counted out by drawer-load all day, taxed by conditions nobody voted for. Posthumously it's nearly literal, in my case. My drawer restocks twice daily in a brown bottle. And coffee doesn't refund spoons to somebody who can't finish the cup. (There's a small poster at the chemist, too, between the laminated A4s, with a number to call if you think a neighbour has stopped taking the amber. There was always a number you could call about a neighbour. The new one just has better kerning.) Passing is the other part-time job, and it has a kit: a tinted cream with a name like a spa treatment, gloves with warmers woven into the palm, lenses pre-fried to suggest blood lives where it should. The dead don't blush. I arrange my face instead. "You don't look dead," a woman at the bus stop told me once, kindly, meaning it as a kindness. It lands the way it always lands: a compliment with a question inside it. Then what are the rest of us? I said thank you. You say thank you. The maths gets done in public and the living hold the pencil. In June I wear the gloves indoors, which is a look, and it's the one they notice at interviews. I applied for fourteen jobs the winter after intake. With the disclosure, you never hear back. Without the disclosure, you field the questions about the gloves, and you never hear back at a slower, politer speed. There's a whole craft to deciding who gets told what, and what happens to your life when the wrong person finds out. If that sentence was already familiar to you from before the Rising: hello again. It's me. Same booth. On the 86 last week a man held my card to the reader for me (contactless; the glass wants living skin; more on that at work) and told me I was one of the good ones. His sister-in-law works up the depot with your lot, he said, the freezer crew, and they're the happieNov 18, 2026

On Bluesky

All mentions
dave kellam
@davekellam.com ·

@ewancroft.uk if I started a Malachite import with default ordering from beginning and swapped to reverse order for a later import will it still work or should I keep same ordering? Have like 95k songs, so will take a little bit 😅 Also thank you!