Documentation for the Boost project¶
You’ll find below anything you need to install, configure or run Boost.
Guide¶
How to install Boost¶
From PyPI¶
$ pip3 install boost
From sources¶
You need at least Python 3.4.
On some Linux Distribution setuptools package does not come with default python install, you need to install it.
Install PIP:
$ wget https://bootstrap.pypa.io/get-pip.py -O - | sudo python3
Install setuptools module:
$ wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python3
(Alternatively, Setuptools may be installed to a user-local path):
$ wget https://bootstrap.pypa.io/ez_setup.py -O - | python3 - --user
Untar the tarball and go to the source directory with the following commands:
$ tar zxvf boost-0.1.tar.gz $ cd boost
Next, to install Boost on your computer, type the following command with the root user:
$ python3 setup.py install $ # or $ python3 setup.py install --install-scripts=/usr/bin
Configure Boost¶
As a prerequisite to use Boost, you need to register Boost an a Mastodon app on the instance hosting your Mastodon account.
In order to configure Boost, you need to create a boost.ini file (or any name you prefer, finishing with the extension .ini) with the following parameters:
[mastodon]
users_to_boost=someone@mastodon.social,someonelse@framapiarg.org
instance_url=https://mastodon.social
user_credentials=boost_usercred.txt
client_credentials=boost_clientcred.txt
[boost]
boosts = 0
do_not_boost_hashtags=dnr,
only_if_hashtags=python,
match=[Rr]egex
; only boost toots older than n minutes
older_than=60
; only boost toots younger than n minutes
younger_than=120
favorite=true
[sqlite]
sqlite_path=/var/lib/boost/boost.db
For the [mastodon] section:
- users_to_boost: the screen_name of the users to boost (in @carl_chenet, it’s carl_chenet), separated by a comma. Mandatory parameter.
- instance_url: the url of your Mastodon instance (default is https://mastodon.social). Mandatory parameter.
- user_credential: the path to your boost_usercred.txt (generated by register_boost_app, default is boost_usercred.txt). Mandatory parameter.
- client_credential: the path to your boost_clientcred.txt (generated by register_boost_app, default is boost_clientcred.txt). Mandatory parameter.
For the [boost] section:
- boosts: the minimal number of boosts the toot needs to have in order we also boost it. Defaults to 0.
- waitminsecs: the minimal number of seconds to wait after processing a toot. Defaults to 1.
- waitmaxsecs: the maximal number of seconds to wait after processing a toot. Defaults to 1.
- do_not_boost_hashtags: do not boost if one of the hashtags in this list is in the text of the toot.
- only_if_hashtags: only boost toots having one of the hashtags of the list.
- match: only boost toots containing given regular expression match.
- older_than: only boost toots older than a number of minutes.
- younger_than: only boost toots younger than a number of minutes.
- favorite: favorite all the boosted toots.
For the [sqlite] section:
- sqlite_path: the path to the sqlite3 database file storing the already boosted toot ids
Use Boost¶
After the configuration of Boost, just launch the following command:
$ boost -c /path/to/boost.ini
Using the –dry-run command line option allows not boosting the toots and not feed local SQLite database, for testing purpose:
$ boost --dry-run -c /path/to/boost.ini
First time you launch Boost, you may want to avoid to boost the last 20 entries of each user. Use –populate-database option of the command line for that:
$ boost --populate-database -c /path/to/boost.ini
License¶
This software comes under the terms of the GPLv3+. See the LICENSE file for the complete text of the license.
Authors¶
Carl Chenet <chaica@ohmytux.com>