Merge tag 'v0.3.0' into develop

tag
This commit is contained in:
Alie 2024-01-26 18:54:21 +01:00
commit 35e2ce36e9
3 changed files with 14 additions and 14 deletions

20
Cargo.lock generated
View File

@ -850,7 +850,7 @@ dependencies = [
[[package]] [[package]]
name = "mastodon-image-uploader-bot" name = "mastodon-image-uploader-bot"
version = "0.2.2" version = "0.3.0"
dependencies = [ dependencies = [
"async-std", "async-std",
"log", "log",
@ -859,7 +859,7 @@ dependencies = [
"serde", "serde",
"stderrlog", "stderrlog",
"tokio", "tokio",
"toml 0.7.6", "toml 0.8.8",
] ]
[[package]] [[package]]
@ -1287,9 +1287,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_spanned" name = "serde_spanned"
version = "0.6.3" version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1"
dependencies = [ dependencies = [
"serde", "serde",
] ]
@ -1620,9 +1620,9 @@ dependencies = [
[[package]] [[package]]
name = "toml" name = "toml"
version = "0.7.6" version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35"
dependencies = [ dependencies = [
"serde", "serde",
"serde_spanned", "serde_spanned",
@ -1632,18 +1632,18 @@ dependencies = [
[[package]] [[package]]
name = "toml_datetime" name = "toml_datetime"
version = "0.6.3" version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
dependencies = [ dependencies = [
"serde", "serde",
] ]
[[package]] [[package]]
name = "toml_edit" name = "toml_edit"
version = "0.19.13" version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f8751d9c1b03c6500c387e96f81f815a4f8e72d142d2d4a9ffa6fedd51ddee7" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
dependencies = [ dependencies = [
"indexmap 2.0.0", "indexmap 2.0.0",
"serde", "serde",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "mastodon-image-uploader-bot" name = "mastodon-image-uploader-bot"
version = "0.2.2" version = "0.3.0"
edition = "2021" edition = "2021"
[alias] [alias]
@ -12,7 +12,7 @@ test = "cargo test -- --test-threads=1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] } tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
reqwest = "0.11.14" reqwest = "0.11.14"
serde = "1.0.171" serde = "1.0.171"
toml = "0.7.1" toml = "0.8.8"
log = "0.4.19" log = "0.4.19"
stderrlog = "0.5.4" stderrlog = "0.5.4"
async-std = "1.12.0" async-std = "1.12.0"

View File

@ -1,5 +1,5 @@
use async_std; use async_std;
use log::{self, info}; use log;
use mastodon_async::entities::visibility::Visibility; use mastodon_async::entities::visibility::Visibility;
use mastodon_async::helpers::{cli, toml as masto_toml}; use mastodon_async::helpers::{cli, toml as masto_toml};
use mastodon_async::prelude::*; use mastodon_async::prelude::*;
@ -177,7 +177,7 @@ fn set_url_as_posted(config: &Config, url: &String) -> DynResult<()> {
.append(true) // This is needed to append to file .append(true) // This is needed to append to file
.open(&config.files.posted)?; //.expect("Cannot open posted file"); // Maybe we should retry just in case .open(&config.files.posted)?; //.expect("Cannot open posted file"); // Maybe we should retry just in case
write!(file, "{}\n", url)?; //.expect("Cannot write to posted file"); // maybe we should retry tbh write!(file, "{}\n", url)?; //.expect("Cannot write to posted file"); // maybe we should retry tbh
info!("Set url {} as posted", url); log::info!("Set url {} as posted", url);
Ok(()) Ok(())
} }