Skip to main content

Tool to help mastodon server admins to conveniently reach certain parts of their user base with DMs.

Project description

mastomsg

A messanger for admins of mastodon servers allowing them to message groups of users.

You can install it via pip/pipx (requires Python-3.10+):

pipx install mastomsg

Then you have access to the command mastomsg.

mastomsg expects you to pass it a (potentially multi-line) text as its first argument. The text can contain placeholders for all user account properties you might want. To use the person's display name you can for example include {target.display_name} in your text. You should ideally include "@{target.username}" somewhere to create an actual mention. If your text doesn't include any mentions you will be asked if the system should automatically prepend it. Check out the Mastodon.py docs to see all possible values.

To select the target audience you can either use --handles, --age or --lastactive. With --handles you just add a list of local usernames separated by , to send the message to. With --ages you supply a time delta (in days or hours) to select all acounts created in that timeframe. With --lastactive you supply a similar time delta but target all people who have posted anything in that time frame. Note that for bigger instances the last commands can be quite slow.

Appending --pretend does all the API calls to select the recipients but does not send out the message. Only the list of selected accounts is printed out.

TODO:

  • load message from a text file or STDIN
  • add progress bar when sending more than 10 messages
  • Allow to customize type of message (currently only DM is supported)
  • add potential websocket receiver to trigger automatic sending of welcome messages

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mastomsg-0.2.1.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mastomsg-0.2.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file mastomsg-0.2.1.tar.gz.

File metadata

  • Download URL: mastomsg-0.2.1.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for mastomsg-0.2.1.tar.gz
Algorithm Hash digest
SHA256 5a743302edbbde63766679244763b0d3791d1ea668981966d2ed3536d6966fa4
MD5 b9e68caf2b8b1167da02c38efb6bbf8b
BLAKE2b-256 09d175a14f030f05720a9c06fa84b6f7afa2097ecd4f5bd65d70119149d78429

See more details on using hashes here.

File details

Details for the file mastomsg-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: mastomsg-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for mastomsg-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b255c741f8af873a6e3cc7d975eb6df4abacc034085806b3a403152544bf2818
MD5 b73eb9341789b673c6fea3e97d99802b
BLAKE2b-256 7dde01e03720791049ba7351f2fe6e255ae532af223b11d509e7b845e814c380

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page