hodgesmr / mastodon_digest

A Python script that aggregates recent popular posts from your Mastodon timeline
BSD 3-Clause "New" or "Revised" License
439 stars 58 forks source link

Bulk changes from my local fork #25

Closed jippi closed 1 year ago

jippi commented 1 year ago

Hey!

Wanted to share some of my local changes and get feedback on whether any of them are desired/welcome upstream.

  1. Sniff Python binary in Makefile (macOS uses python3 for example)
  2. Avoid quoted value in docker -v path for WORKDIR
  3. Support filtering on post language (client side, not possible server-side in timeline view)
  4. Support >24h time-ranges (I'm doing a 24h, 48h and 168h version for my server). I'm running it from my local instance directly, so there are no throttling in my case to worry about.
  5. Optimized Dockerfile to better utilize build cache
  6. Add multiarch/platform (e.g. arm64, amd64, etc.) to build/push

If any are interesting upstream, I can pull them out into their own PRs - but didn't want to submit 5 "noise" PRs without prior review :)

If all of them are fine, i'm fine with shipping them as one contribution

hodgesmr commented 1 year ago

I think it's best to break these into discrete PRs 🙂

Sniff Python binary in Makefile (macOS uses python3 for example)

Makes sense.

Avoid quoted value in docker -v path for WORKDIR

Makes sense.

Support filtering on post language (client side, not possible server-side in timeline view)

Seems like a good feature; likely needs some robust documentation. I believe this requires ISO 639-1 (two letter) or 639-3 (three letter) language codes.

Support >24h time-ranges (I'm doing a 24h, 48h and 168h version for my server). I'm running it from my local instance directly, so there are no throttling in my case to worry about.

I'm somewhat hesitant to make this unbounded, as a big part of the idea is around recent discovery. However, 24 hours was an arbitrary ceiling, and I'm open to thoughts / ideas on changing that.

Optimized Dockerfile to better utilize build cache

Makes sense.

Add multiarch/platform (e.g. arm64, amd64, etc.) to build/push

Makes sense.

jippi commented 1 year ago

Cool! I'm going to chomp it up into 2-3 PRs and send over later today then

hodgesmr commented 1 year ago

@jippi going to close this PR. If you'd still like to submit discrete PRs, I'll take a look 🙂