Skip to content

Commit c1b05aa

Browse files
committed
Update CHANGELOG, README and comments
Since more than Mastodon and Pleroma are supported now, this has to be reflected in the documentation accordingly.
1 parent 821c04d commit c1b05aa

File tree

6 files changed

+66
-40
lines changed

6 files changed

+66
-40
lines changed

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,25 @@ Change Log
55
----------
66

77
There is talk that Mastodon might get Group support, so maybe this tool will be obsolete in the not too distant future. We'll see
8-
about that. tootgroup.py will be supported as long as there is a need for it.
8+
about that. tootgroup.py will be supported as long as there is a need for it - For Mastodon and/or other Fediverse services.
9+
10+
[1.5] 2024-10-12
11+
----------------
12+
13+
### ADDED
14+
15+
- Compatibility with GoToSocial (tested) and possibly other Fediverse services (untested).
16+
- OAuth support for registering the tootgroup.py application with servers (needed for GoToSocial but also works with other
17+
services)
18+
19+
### CHANGED
20+
21+
- There are no more retries while registering the application with username/password. Instead an OAuth fallback is invoked.
22+
If this also fails, you have to retry manually.
23+
24+
### FIXED
25+
26+
- [GoToSocial](<https://github.com/oe4dns/tootgroup.py/issues/10>)
927

1028
[1.4.3] 2023-12-18
1129
----------------

README.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
11

2-
`tootgroup.py` - emulate group accounts on Mastodon and Pleroma
2+
`tootgroup.py` - Group accounts on Fediverse services that don't support them natively.
33
=================================================
44

5+
Tested to be compatible with:
6+
------------
7+
8+
``Hosting groups:`` Mastodon, Pleroma and GoToSocial - others will probably work too.
9+
10+
``Posting to groups:`` Mastodon, Pleroma GoToSocial and Friendica - others will
11+
very likely work.
12+
513
What is this?
614
-------------
715

8-
Some social media platforms allow groups of users to post into a unified "group"
9-
timeline/instance/whatever you want to call it. This is currently not possible
10-
on Mastodon or Pleroma without giving all members full login credentials to a
11-
group. `tootgroup.py` is an attempt to solve this specific use case.
16+
Some federated social media platforms allow groups of users to post into a
17+
unified "group" timeline/instance/whatever you want to call it. This is currently
18+
not possible on Mastodon or other services that are styled after it, except by
19+
giving all members full login credentials to a group. `tootgroup.py` is an
20+
attempt to solve this specific use case.
1221

13-
tootgroup.py groups can be hosted on Mastodon or Pleroma. But you can post
14-
TO the group FROM any ActivityPub service although there might be some
15-
incompatibilities. Currently Mastodon, Pleroma and Friendica are tested platforms
16-
for posting TO the group. More tests are welcome!
22+
`tootgroup.py` groups can be hosted on a variety of services that are compatible
23+
with the Mastodon API. All tested platforms are listed above, more will very
24+
likely work just as good and all tests are welcome!
1725

1826
How does it work?
1927
-----------------
2028

2129
`tootgroup.py` has to be set up on a computer and run periodically. It reads the
22-
notifications from the Mastodon/Pleroma account it is connected to and filters
30+
notifications from the Fediverse account it is connected to and filters
2331
them for messages to repost. The group consists of all user accounts the group
2432
account is following. Unfollowing accounts, removes users from the group again.
2533

@@ -43,7 +51,7 @@ anything.
4351
But how to simply use it?
4452
-------------------------
4553

46-
### Mastodon/Pleroma
54+
### Mastodon/Pleroma/GoToSocial and others
4755

4856
1. Write a message that should be boosted by the group:
4957
Just include "!@group_name" anywhere in the toot.
@@ -65,8 +73,8 @@ this is fully supported, tested and in daily use.
6573
Friendica handles the Exclamation Mark in a special way because it is also
6674
used to address the Friendica Forum functionality. Therefore the Asterisk is
6775
used instead of the Exclamation Mark. Just include "*@group_name" anywhere in
68-
the message. - This would also work in Mastodon/Pleroma, just don't tell them
69-
;-)
76+
the message. - This would also work with other services like Mastodon, just
77+
don't tell them ;-)
7078

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

@@ -99,13 +107,13 @@ when you run it from the commandline for the first time. Being somewhat
99107
comfortable with Python scripting and the commandline in general might help
100108
if difficulties should appear.
101109

102-
1. You need an account on any Mastodon or Pleroma instance that will act as
110+
1. You need an account on any Fediverse instance that will act as
103111
your group account. Think about if you should mark it as a "Bot".
104112

105113
2. Run `tootgroup.py` from the command line.
106114

107115
3. `tootgroup.py` will ask you for all needed setup data and try to get them
108-
right by connecting to the Mastodon/Pleroma server. If it cannot do so, it
116+
right by connecting to the Fediverse server. If it cannot do so, it
109117
will tell you and you can retry. When successful, `tootgroup.py` will write
110118
the configuration to its tootgroup.conf file and read it from there next
111119
time you run the script.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ dependencies = [
1111
]
1212
requires-python = ">=3.8"
1313
authors = [ {name = "Andreas Schreiner", email = "andreas.schreiner@sonnenmulde.at"} ]
14-
description="Group account features on Mastodon, Pleroma and Friendica"
14+
description="Group account features on Mastodon and many other Fediverse platforms "
1515
readme="README.md"
16-
keywords=["mastodon", "pleroma", "friendica", "toot", "group", "account", "fediverse"]
16+
keywords=["mastodon", "pleroma", "friendica", "gotosocial", "toot", "group", "account", "fediverse"]
1717
classifiers=[
1818
"Environment :: Console",
1919
"Development Status :: 5 - Production/Stable",

tootgroup.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
import tootgroup_tools
2525

26-
TOOTGROUP_VERSION = "1.4.3"
26+
TOOTGROUP_VERSION = "1.5"
2727

2828

2929
def main():
@@ -40,7 +40,7 @@ def main():
4040
# Get the configuration storage location
4141
config_store = tootgroup_tools.configuration_management.setup_configuration_store()
4242

43-
# Get the Mastodon/Pleroma account handle the script is running for.
43+
# Get the handle for the account the script has been invoked with.
4444
config_store["group_name"] = commandline_arguments["group_name"]
4545
group_name = config_store["group_name"]
4646

@@ -65,8 +65,8 @@ def main():
6565

6666
try:
6767
# Get the group account information.
68-
# This connects to the Mastodon or Pleroma server for the first time at
69-
# every tootgroup.py's run.
68+
# This connects to the Fediverse server for the first time at
69+
# every tootgroup.py's invocation.
7070
my_account = {
7171
"username": masto.account_verify_credentials().username,
7272
"id": masto.account_verify_credentials().id,
@@ -75,7 +75,7 @@ def main():
7575
except Exception as ex:
7676
print("")
7777
print("\n########################################################")
78-
print("tootgroup.py could not connect to the Mastodon or Pleroma")
78+
print("tootgroup.py could not connect to the Fediverse server")
7979
print("instance. If you know that it is running, there might be a")
8080
print("problem with your local configuration. Check the error")
8181
print("message for more details:")
@@ -86,7 +86,7 @@ def main():
8686
sys.exit(0)
8787

8888
# Get group member IDs. They can not be fetched directly when
89-
# connecting to the Mastodon server.
89+
# connecting to the Fediverse server.
9090
#
9191
# limit=sys.maxsize is set here because Pleroma only returns 20 Member if
9292
# the standard limit=None value is used!
@@ -305,8 +305,8 @@ def media_toot_again(orig_media_dict, mastodon_instance):
305305
videos) in a new toot. This function downloads all media files from a toot
306306
and re-uploads them. It then returns a dict formatted in a proper way to
307307
be used by the Mastodon.status_post() function.
308-
It also works with Pleroma this way altough it has not been tested if there
309-
would be another, more "direct" solution with that software."""
308+
It also works with Pleroma and others this way, altough it has not been tested
309+
if there would be another, more "direct" solution with alternative services."""
310310
new_media_dict = []
311311
for media in orig_media_dict:
312312
media_data = requests.get(media.url).content

tootgroup_tools/commandline_arguments.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ def parse_arguments():
4747
"-g",
4848
"--group",
4949
default="default",
50-
help="Input a handle for the Mastodon account. tootgroup.py stores all "
50+
help="Input a handle for the Fediverse account. tootgroup.py stores all "
5151
+ "information connected to a specific group account under this name. "
5252
+ "By choosing different handles it is possible to manage multiple "
53-
+ "Mastodon groups from the same skript. This can be chosen freely but "
54-
+ " it is wise to use a name that is related to the Mastodon account "
53+
+ "groups from the same skript. The handle can be chosen freely but "
54+
+ " it is wise to use a name that is related to the Fediverse account "
5555
+ " it will be used with. If no handle is given, "
5656
+ '"%(default)s" is always used instead.',
5757
)

tootgroup_tools/configuration_management.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
def new_credentials_from_server(config_store, config):
14-
"""Register tootgroup.py at a Mastodon (or Pleroma) server and get
14+
"""Register tootgroup.py at a compatible Fediverse server and get
1515
user credentials.
1616
1717
"config_store" dictionary containting config file name and path as
@@ -25,7 +25,7 @@ def new_credentials_from_server(config_store, config):
2525
"""
2626
group_name = config_store["group_name"]
2727

28-
# Register tootgroup.py app at the Mastodon server
28+
# Register tootgroup.py app at the Fediverse server
2929
try:
3030
mastodon.Mastodon.create_app(
3131
"tootgroup.py",
@@ -42,7 +42,7 @@ def new_credentials_from_server(config_store, config):
4242
except Exception as ex:
4343
print("")
4444
print("\n##################################################################")
45-
print("The Mastodon instance URL is wrong or the server does not respond.")
45+
print("The Fediverse instance URL is wrong or the server does not respond.")
4646
print("See the error message for more details:")
4747
print(ex)
4848
print("")
@@ -51,12 +51,12 @@ def new_credentials_from_server(config_store, config):
5151
sys.exit(0)
5252

5353
# Try to log in once with username and password to get an access token for future logins.
54-
# This might fail due to wrong user entry of because username/password login is not
54+
# This might fail due to wrong user entry or because username/password login is not
5555
# supported. In any case, if an error occurs, try logging in via OAuth instead. Only
56-
# if this also fails, exit the script with an error message asking the user to try again.
56+
# when this also fails, exit the script with an error message telling the user to try again.
5757
try:
5858
masto.log_in(
59-
input("Username (e-Mail) to log into Mastodon Instance: "),
59+
input("Username (e-Mail) to log into the Fediverse Instance: "),
6060
input("Password: "),
6161
scopes=["read", "write"],
6262
redirect_uri="urn:ietf:wg:oauth:2.0:oob",
@@ -73,7 +73,7 @@ def new_credentials_from_server(config_store, config):
7373
scopes=["read", "write"],
7474
)
7575

76-
print("\nPlease open the following URL in your webbrowser, authorize")
76+
print("\nPlease open the following URL in your webbrowser, then authorize")
7777
print("this application's access and copy the resulting access token")
7878
print("to the prompt below.\n")
7979
print("Authorization URL:")
@@ -128,15 +128,15 @@ def parse_configuration(config_store):
128128
config_store["write_NEW"] = True
129129
config_store["first_run"] = True
130130

131-
# Do we have a mastodon instance URL? If not, we have to
131+
# Do we have a Fediverse instance URL? If not, we have to
132132
# ask for it and register with our group's server first.
133133
if not config.has_option(group_name, "mastodon_instance"):
134134
config[group_name]["mastodon_instance"] = ""
135-
print("We need a Mastodon server to connect to!")
135+
print("We need a Fediverse server to connect to!")
136136
if config[group_name]["mastodon_instance"] == "":
137137
config[group_name]["mastodon_instance"] = input(
138138
"Enter the "
139-
"URL of the Mastodon instance your group account is "
139+
"URL of the Fediverse instance your group account is "
140140
"running on: "
141141
)
142142
get_new_credentials = True
@@ -220,7 +220,7 @@ def parse_configuration(config_store):
220220
config_store["write_NEW"] = True
221221

222222
# Some registration info or credentials were missing - we have to register
223-
# tootgroup.py with our Mastodon server instance. (again?)
223+
# tootgroup.py with our Fediverse server instance. (again?)
224224
if get_new_credentials:
225225
print("Some credentials are missing, need to get new ones...")
226226
new_credentials_from_server(config_store, config)

0 commit comments

Comments
 (0)