From 776559c9566d799e4086a0de14806f5f2d081841 Mon Sep 17 00:00:00 2001 From: VC Date: Sun, 1 Mar 2020 15:10:29 +0100 Subject: [PATCH] First usage manual --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e4dc329..2c92766 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,57 @@ A Twitter to Mastodon copy bot written in Rust -Early developpement stages… +# 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 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, it’s only able to copy text from a tweet to a toot. Call this a work in progress. +