diff --git a/Cargo.lock b/Cargo.lock index 6d88679..79d4ec0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -908,6 +908,27 @@ dependencies = [ "thiserror", ] +[[package]] +name = "remindrs" +version = "0.1.0" +dependencies = [ + "anyhow", + "axum", + "clap", + "diesel", + "diesel_migrations", + "lettre", + "serde", + "time", + "tokio", + "toml 0.6.0", + "tower", + "tower-http", + "tracing", + "tracing-subscriber", + "xdg", +] + [[package]] name = "remove_dir_all" version = "0.5.3" @@ -1453,27 +1474,6 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "whakarite" -version = "0.1.0" -dependencies = [ - "anyhow", - "axum", - "clap", - "diesel", - "diesel_migrations", - "lettre", - "serde", - "time", - "tokio", - "toml 0.6.0", - "tower", - "tower-http", - "tracing", - "tracing-subscriber", - "xdg", -] - [[package]] name = "winapi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index dc0b957..f963920 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "whakarite" +name = "remindrs" version = "0.1.0" edition = "2021" description = "Organize..." license = "GPL-3.0-or-later" -repository = "https://git.onders.org/finga/whakarite" +repository = "https://git.onders.org/finga/remindrs" readme = "../README.md" keywords = ["remind"] categories = ["utility"] diff --git a/README.md b/README.md index 2d1b0c0..5d3a5a0 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,3 @@ -# Whakarite +# remindrs -to arrange, adjust, organise, put in order, appoint, assign. -to balance by equivalent, in like manner. -to make like. -to compare, correspond to, liken to. -to fulfil, perform. -to say prayers, recite rituals. +Send an email at a given time containing a certain title and message. diff --git a/config.toml b/config.toml index 287fc0a..89cd8e1 100644 --- a/config.toml +++ b/config.toml @@ -1,9 +1,9 @@ [database] # host = "localhost" # port = 5432 -# name = "whakarite" -# user = "whakarite" -pass = "whakarite" +# name = "remindrs" +# user = "remindrs" +pass = "remindrs" # [server] # address = "::1" diff --git a/src/config.rs b/src/config.rs index fe40485..381b295 100644 --- a/src/config.rs +++ b/src/config.rs @@ -16,11 +16,11 @@ const fn default_database_port() -> u16 { } fn default_database_name() -> String { - "whakarite".to_string() + env!("CARGO_BIN_NAME").to_string() } fn default_database_user() -> String { - "whakarite".to_string() + env!("CARGO_BIN_NAME").to_string() } #[derive(Debug, Deserialize)] diff --git a/src/main.rs b/src/main.rs index 32d25c9..e502974 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,7 +58,7 @@ fn remind( trace!(?reminder, "checking reminder"); if reminder.planned <= OffsetDateTime::now_utc() { let email = Message::builder() - .from("whakarite@localhost".parse()?) + .from(format!("{}@localhost", env!("CARGO_BIN_NAME")).parse()?) .to(reminder.receiver.parse()?) .subject(&reminder.title) .body(reminder.message.to_string())?;