Elektrine lite

← Feed

@blinry@chaos.social

Post #1308305

2026-04-17 11:56 UTC

`threadcat` downloads files using their original filename on the Mastodon server. So you'll end up with a lot of files like "f55dbddca60e64cb.jpg"… I tried deriving better filenames from the alt text – for example, taking the first two "non-filler" words from the alt text. That gives you filenames like "colorful-circles.jpg", "small-grey.jpg" or "drawing-snow.jpg", and possibly "drawing-snow-2.jpg". Another option would just be using timestamps: "2026-04-17T13:54Z.jpg" What do you think?

Replies (7)

  • @jer@hachyderm.io 2026-04-17 12:01

    @blinry I like "non-filler words from alt text", but maybe prefix with an incremental ID so they are sorted the same as in the post?

    Open ##1308337

  • @irina@critter.cafe 2026-04-17 12:15

    @blinry those alt text filenames are a fun and useful feature! i think a combo could be good sense, either [post-id]-colourful-circles.jpg or [timestamp]-colourful-circles.jpg - that way it's both in some useful order and readable as well

    Open ##1308339

  • @galaxis@mastodon.infra.de 2026-04-17 12:19

    @blinry I have not tried using threadcat yet, but my hunch would be to keep the original filename (ensures there are no collisions) and add some metadata. Depending on how you handle individual posts, maybe add the post ID or the ID of the anchor in your output. Having all media from a specific post in a dedicated subdirectory might be useful?

    Open ##1308340

  • @chrismarquardt@chaos.social 2026-04-17 13:12

    @blinry throwing the post id in there sounds reasonable. Will threadcat also download someone else’s threads if my account is allowed to read them?

    Open ##1308342

  • @elithebearded@fed.qaz.red 2026-04-17 17:19

    @blinry So many of movie poster bot images would be "photo-montage.jpg" or "painted-montage.jpg" @films

    Open ##1308345

  • @blinry@chaos.social 2026-04-25 16:29

    Have been receiving a bunch of feature requests for threadcat 🧶🐱, my little tool that downloads Mastodon threads as Markdown files! https://codeberg.org/blinry/threadcat Just released v0.1.2, it adds: A --help option, to tell you how to use it! An -o / --output option to specify where the Markdown should be written to. And it now refuses to overwrite existing Markdown files. I also replaced the anyhow crate with color_eyre, which formats error messages very nicely!

    Open ##1836974

  • @tyzbit@toot.now 2026-05-01 17:00

    @blinry one idea i had to get better filenames is to rank the words in the alt-text in order of frequency in a given language, then pick the less common ones and group/order them deterministically. example: an orange balloon floats over a scenic mountain range "orange", "floats" and "scenic" might be the 3 least common ("an" and "a" likely the most common), so the image could be "f55dbddca60e64cb-orange-floats-scenic.jpg" that way you can process the file locally and quickly.

    Open ##2038208