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 --everyone, --handles, --age or --lastactive. As expected --everyone targets all users on the server. 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 not posted anything in that time frame (to find inactive users). 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
  • 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.3.0.tar.gz (16.8 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.3.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mastomsg-0.3.0.tar.gz
Algorithm Hash digest
SHA256 64bd173a6315983c86515917a4dee59a5784c695334cccbe1fab018fe8d119d6
MD5 5154b91e107d6959edc5b751d0870818
BLAKE2b-256 d1ca9771b0edb62f1cb47bf1ad70d07c4aeb513d195b2a327be901c4a9bafaac

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mastomsg-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05a9a968948324e7162870943c494a3568aad95d429c0bd1ed71820cdb782208
MD5 79892cfbe5d07220ff77105d6713bd08
BLAKE2b-256 4180c0c7d0813c9f7e7482a3deb636a6023cf697a8d55beccdeb9671a33b2962

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