Toot

This operation reads data prepared by concentrator and imports them into Mastodon instance. It can also attach media resources, for more details see media operation.

$ java -jar egor.jar toot -help
usage: java.lang.Process [-a <ACCESS_TOKEN>] [-c <CLIENT_ID>] [-f <FILENAME>] [-h <HOSTNAME>] [-help] [-m <FILENAME>]
       [-s] [-t <TEXT>] -u <FILENAME> [-v <TYPE>] [-x]
 -a,--access-token <ACCESS_TOKEN>   Client access token
 -c,--client-id <CLIENT_ID>         Client id
 -f,--config <FILENAME>             Configuration file
 -h,--home <HOSTNAME>               Mastodon server hostname
 -help                              print this message
 -m,--media-db <FILENAME>           Media database
 -n,--max-toots <NUMBER>            max number of inserted toots, default: 1000000
 -p,--no-post                       do not post anything, only add new hashes
 -s,--sensitive                     Mark the media of the status as NSFW
 -t,--spoiler-text <TEXT>           Text to be shown as a warning before the actual content
 -u,--unique-hash-db <FILENAME>     Content hash database
 -v,--visibility <TYPE>             Either private, unlisted or public (default)
 -x,--aggressive                    do not stop on a post issue, send the remaining statuses

Configuration variables (access token, client id, home) are read from a configuration file, but they can be reconfigured by the explicit parameters --access-token, --client-id and --home.

--config

The filename specifies configuration file with credentials.

--access-token

It sets an access token explicitly.

--client-id

It sets a client id explicitly. This parameter is not used in the current version.

--home

It sets Mastodon instance hostname explicitly.

--media-db

This read-only database is produced by media operation. It includes a lookup table of remote media URL references and their id in the Mastodon instance.

--max-toots

It specifies the maximum number of toots which are inserted, so that Mastodon instance is not flooded with many toots.

--no-post

Hashes are computed, but nothing is posted. You can use this option to initialize a new import, so that it will not start with a huge number of existing posts.

--sensitive

All (new) posts/statuses are marked as NSFW.

--spoiler-text

It defines the spoiler text for all (new) posts/statuses.

--unique-hash-db

The filename should point to a file with hashes of posted statuses. The hash values are used to eliminate duplicates, so that none status is posted several times.

--visibility

All new posts/statuses can be either public (default), private or unlisted.

--aggressive

If an insert operation of some post/status fails, the import will continue with other items and it will not be ended. By default, if an error occurs, the import is closed. This could be impractical, if the fail is caused by a single item issue (e.g. wrong letter/character).

Do not use aggressive mode on servers which are not yours. Be nice, if a server does not like your status, stop your activity and consult the issue with an admin.