A CLI php script that, with rough periodicity, randomly picks a fediverse instance from a text file listing them one per line and makes a defined mastodon bot account “boost” the most recent post from that instance’s public timeline.

pezcurrel af80c047d4 Added missing GPL v3 license text 3 weeks ago
README.md 719f61b168 Manually indented a line. 1 month ago
randboost af80c047d4 Added missing GPL v3 license text 3 weeks ago

README.md

===[ SYNOPSIS ]===
randboost [options] <project directory>
===[ DESCRIPTION ]===
This is randboost v0.1, a CLI php script that, with rough periodicity,
randomly picks a fediverse instance from a text file listing them one per
line and makes a defined mastodon bot account “boost” the most recent
post from that instance’s public timeline.
Note that randboost won’t boost posts from accounts with a “#nobots”
hashtag in their “biographies”.
In order for randboost to work, an existing «project directory» has to be
passed as an argument to it, with a file named «randboost.conf» inside
it. This file must have the following syntax.
--- Begin «randboost.conf» ---
bot_instance=<the instance on which the mastodon bot resides>
bot_token=<the bot’s token>
instances_file=<path to a file listing instances one per line>
exclude_known_instances=<if “true”, don’t pick instances which are
                         already known to the bot’s instance>
sleep_time=<minutes to wait after a succesful boost (must be >= 15)>
verbose=<if “true”, print status messages while running>
--- End «randboost.conf» ---
Note that before each “snooze” the defined “sleep_time” will be
altered by a random value ranging from -10 to +10.
===[ OPTIONS ]===
-h, --help
 Show this help text and exit.
===[ EXIT VALUES ]===
0: regular run.
1: randboost encountered a fatal error.
===[ FILES ]===
On every run, randboost writes informations about what it’s doing in a
«randboost.log» file in the specified project directory. It also creates
a «randboost.lock» lockfile in it, and a «randboost.used» file in which
it stores instances it already picked, so it won’t “boost” twice from
an already picked instance until all others get picked. Each line of this
file contains the instance’s domain name, a space and a “1” when
randboost successfully “boosted” a post from the picked instance, a
“0” otherwise.
===[ DISCLAIMER AND LICENSE ]===
This program comes with ABSOLUTELY NO WARRANTY; for details see the source.
This is free software, and you are welcome to redistribute it under certain
conditions; see <http://www.gnu.org/licenses/> for details.