diff --git a/Cargo.lock b/Cargo.lock index 0e1a21e..aae0e9c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1492,7 +1492,7 @@ dependencies = [ [[package]] name = "scootaloo" -version = "0.1.2" +version = "0.1.3" dependencies = [ "clap", "egg-mode", diff --git a/Cargo.toml b/Cargo.toml index b5133e1..7f95382 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "scootaloo" -version = "0.1.2" +version = "0.1.3" authors = ["VC "] edition = "2018" diff --git a/README.md b/README.md index 6a86e65..3e5ebed 100644 --- a/README.md +++ b/README.md @@ -65,4 +65,11 @@ SUBCOMMANDS: Scootaloo does not respect the spam limits imposed by Mastodon: it will make a 429 error if too much Tweets are converted to Toots in a short amount of time (and it will not recover from it). By default, it gets the last 200 tweets from the user timeline (which is a lot!). It is recommended to put a Tweet number into the `last_tweet` file before copying an old account. +You can do that with a command like: +``` +echo -n '8189881949849' > last_tweet +``` + +**This file should only contain the last tweet ID without any other char (no EOL or new line).** + Oh and everything is sync (and not async) so this does not run at a blazing speed… diff --git a/src/lib.rs b/src/lib.rs index e91642e..7a833d1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -144,6 +144,10 @@ fn build_basic_status(tweet: &Tweet) -> Result> { toot = toot.replace(&decoded_url.0, &decoded_url.1); } + // remove the & and replace it with & + // this is the only entities and/or char that is not available via Twitter API + toot = toot.replace("&", "&"); + Ok(StatusBuilder::new(toot)) } diff --git a/src/main.rs b/src/main.rs index f4fe5bd..575358a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -32,7 +32,7 @@ fn main() { return; } - let config = parse_toml(matches.value_of("config").unwrap()); + let config = parse_toml(matches.value_of("config").unwrap_or("/usr/local/etc/scootaloo.toml")); run(config); }