Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Group accounts on Fediverse services that don't support them natively.

License

NotificationsYou must be signed in to change notification settings

oe4dns/tootgroup.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tested to be compatible with:

Hosting groups: Mastodon, Pleroma and GoToSocial - others will probably work too.

Posting to groups: Mastodon, Pleroma GoToSocial and Friendica - others willvery likely work.

What is this?

Some federated social media platforms allow groups of users to post into aunified "group" timeline/instance/whatever you want to call it. This is currentlynot possible on Mastodon or other services that are styled after it, except bygiving all members full login credentials to a group.tootgroup.py is anattempt to solve this specific use case.

tootgroup.py groups can be hosted on a variety of services that are compatiblewith the Mastodon API. All tested platforms are listed above, more will verylikely work just as good and all tests are welcome!

How does it work?

tootgroup.py has to be set up on a computer and run periodically. It reads thenotifications from the Fediverse account it is connected to and filtersthem for messages to repost. The group consists of all user accounts the groupaccount is following. Unfollowing accounts, removes users from the group again.

There are two methods of creating a group post. One or both of them can beenabled during the setup procedure.

  1. Public mentions of group members are boosted if they preceed the group'sname with an Exclamation Mark like "!@mastodon". For posts originatingfrom Friendica, the correct syntax is "!mastodon".

  2. tootgroup.py can also look for direct messages from group members. If thegroup is @mentioned at the very beginning, The message will be reposted asa new public toot originating directly from the group account. The statustext as well as media files are included. The originating user will not beshown publicly. (It can still be seen by all group and instanceadministrators tough!)

If both repost methods are disabled,tootgroup.py will still run but not repostanything.

But how to simply use it?

Mastodon/Pleroma/GoToSocial and others

  1. Write a message that should be boosted by the group:Just include "!@group_name" anywhere in the toot.

    EXAMPLE: "OHAI! just found that !@mastodon thingie!"

  2. Write a message that should appear as a new post from the group:Put "@group_name" at the very beginning of a direct/private message.

    EXAMPLE: "@mastodon HERE BE THE MESSAGE TEXT"

Friendica

Because of its history and much more flexible nature, things are a bit differentand maybe even a bit more complicated when posting from Friendica. Neverthelessthis is fully supported, tested and in daily use.

  1. Write a message that should be reposted by the group:Friendica handles the Exclamation Mark in a special way because it is alsoused to address the Friendica Forum functionality. Therefore the Asterisk isused instead of the Exclamation Mark. Just include "*@group_name" anywhere inthe message. - This would also work with other services like Mastodon, justdon't tell them ;-)

    EXAMPLE (from Friendica): "OHAI! just found that *@mastodon thingie!"

  2. Write a message that should appear as a new post from the group:You can send a direct message by limiting the visibility of a "normal" postor by using the personal message menu. The second method does not work withimages though, so creating normal posts with limited visibility is preferred.You should always leave the Title/Subject field empty, it might not work asexpected otherwise. Put "@group_name" at the very beginning of adirect/private message.

    EXAMPLE: "@mastodon HERE BE THE MESSAGE TEXT"

How to set up?

The easiest way to installtootgroup.py is via PyPI, the Python Package Index.Usepip3 install tootgroup.py to install it as well as all its dependencies.

It is also possible to download the script manually from the GitHub repository athttps://github.com/oe4dns/tootgroup.py In that case the necessary dependencieshave to be provided too:

tootgroup.py requireshttps://github.com/halcy/Mastodon.py as well ashttps://pypi.org/project/platformdirs to run. Install them via youroperating system's package manager, pip or even manually.

tootgroup.py will guide you through setup by asking all information it needswhen you run it from the commandline for the first time. Being somewhatcomfortable with Python scripting and the commandline in general might helpif difficulties should appear.

  1. You need an account on any Fediverse instance that will act asyour group account. Think about if you should mark it as a "Bot".

  2. Runtootgroup.py from the command line.

  3. tootgroup.py will ask you for all needed setup data and try to get themright by connecting to the Fediverse server. If it cannot do so, itwill tell you and you can retry. When successful,tootgroup.py will writethe configuration to its tootgroup.conf file and read it from there nexttime you run the script.

    The place for storing configuration is operating system dependent but will beshown during the first-run/setup phase. A local tootgroup.conf file placednext to thetootgroup.py script will override these settings though and canbe used for development or testing purposes.

  4. If you want to set uptootgroup.py for more than one group, you can run itagain while specifying the "--group GROUP_HANDLE" flag. This will thengenerate an independent configuration that will be read each time you calltootgroup.py using this name. If you don't specify any group name, thehandle "default" is created and used automatically

  5. Test the funcionality by sending direct messages and "!@mentions" to yourgroup while runningtootgroup.py manually. See if things work as expected.The script will print an according message after each successful run.If everything works, run the script periodically via cron and enjoygroop-tooting!

    Here is an example for a crontab entry that runstootgroup.py every two minutes:

    */2 * * * * /path/to/tootgroup.py --group default

  6. There is also the "-d" or "--dry-run" commandline flag that prevents any toots.You can use it to test what would be posted by the script.

    Use "-h" or "--help" for more information about all available options

About

Group accounts on Fediverse services that don't support them natively.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp