Merge branch 'small_fixes' into 'master'

Small fixes

See merge request veretcle/scootaloo!3
This commit is contained in:
VC
2020-03-02 14:13:02 +01:00
5 changed files with 14 additions and 3 deletions

2
Cargo.lock generated
View File

@@ -1492,7 +1492,7 @@ dependencies = [
[[package]] [[package]]
name = "scootaloo" name = "scootaloo"
version = "0.1.2" version = "0.1.3"
dependencies = [ dependencies = [
"clap", "clap",
"egg-mode", "egg-mode",

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "scootaloo" name = "scootaloo"
version = "0.1.2" version = "0.1.3"
authors = ["VC <veretcle+framagit@mateu.be>"] authors = ["VC <veretcle+framagit@mateu.be>"]
edition = "2018" edition = "2018"

View File

@@ -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. 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… Oh and everything is sync (and not async) so this does not run at a blazing speed…

View File

@@ -144,6 +144,10 @@ fn build_basic_status(tweet: &Tweet) -> Result<StatusBuilder, Box<dyn Error>> {
toot = toot.replace(&decoded_url.0, &decoded_url.1); toot = toot.replace(&decoded_url.0, &decoded_url.1);
} }
// remove the &amp; and replace it with &
// this is the only entities and/or char that is not available via Twitter API
toot = toot.replace("&amp;", "&");
Ok(StatusBuilder::new(toot)) Ok(StatusBuilder::new(toot))
} }

View File

@@ -32,7 +32,7 @@ fn main() {
return; 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); run(config);
} }