Files
scootaloo/README.md
2020-03-01 15:10:29 +01:00

1.5 KiB
Raw Blame History

A Twitter to Mastodon copy bot written in Rust

Usage

First up, create a configuration file (default path is /usr/local/etc/scootaloo.toml). It will look like this:

[twitter]
username="NintendojoFR" ## User Timeline to copy

## Consumer/Access key for Twitter (can be generated at https://developer.twitter.com/en/apps)
consumer_key="MYCONSUMERKEY"
consumer_secret="MYCONSUMERSECRET"
access_key="MYACCESSKEY"
access_secret="MYACCESSSECRET"

last_tweet_path="/usr/local/etc/last_tweet" ## file containing the last tweet id received, must be writable

Then run the command with the register subcommand:

scootaloo register --host https://m.nintendojo.fr

This will give you the end of the TOML file. It will look like this:

[mastodon]
base = "https://m.nintendojo.fr"
client_id = "MYCLIENTID"
client_secret = "MYCLIENTSECRET"
redirect = "urn:ietf:wg:oauth:2.0:oob"
token = "MYTOKEN"

You can then run the application via cron for example. Here is the generic usage:

USAGE:
    scootaloo [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --config <CONFIG_FILE>    TOML config file for scootaloo (default /usr/local/etc/scootaloo.toml)

SUBCOMMANDS:
    help        Prints this message or the help of the given subcommand(s)
    register    Command to register to a Mastodon Instance

Quirks

As of now, its only able to copy text from a tweet to a toot. Call this a work in progress.