Usage
Running mechanical bull can be accomplished via
python -mmechanical_bull.run
which will not do much as no users are configured. The user configuration is stored in config.toml
logfile = "mechanical_bull.log"
management = "https://manage.domain"
[user]
private_key = "z3u2Yxcowsarethebestcowsarethebestcowsarethebest"
host = "domain"
[user.handlers]
"mechanical_bull.actions.handle_follow_request" = true
management points to the location of bovine_management that can be used to make adding did keys to bovine easier. Both the logfile and management parameters are optional. This starts a process that connects to the event sources of the configured accounts and reacts appropriately to them.
Adding users
One can add new users to bovine using the following command
usage: python -mmechanical_bull.add_user [-h] [--accept] name host
Positional Arguments
- name
Name of the entry
- host
Hostname of your ActivityPub Actor Host
Named Arguments
- --accept
Include to set automatically accepting follow requests to true
Default: False
This will create an entry of the following form in config.toml
[username]
private_key = "z3u2Yxcowsarethebestcowsarethebestcowsarethebest"
host = "example.tld"
[username.handlers]
"mechanical_bull.actions.accept_follow_request" = false
Note the configuration variable on the right is either false to disable the handler, true to enable the handler, or a dictionary to enable the handler and pass further configuration variables
"mechanical_bull.actions.log_to_file" = { filename = "cow.txt" }
Adding new handlers
mechanical_bull is meant to be extensible with new handlers. These can be defined as a python module containing a function
async def handle(client: bovine.BovineClient, data: dict, **kwargs):
return
For further details see the Moo Cow tutorial.