commit - 5c16381767852c8b16b1554ba983eaaeb95c47c3
commit + 72c999365c60eaa762a71a50f16e40b61896913e
blob - 2a4e546f5e90ce10c11acdc9c07b29c3e13daeec
blob + 27cb8abdb78e490a75bf55262bf6e0d16c4e5698
--- src/cli.rs
+++ src/cli.rs
use log::*;
use std::path::PathBuf;
-use super::{AUTHORS, VERSION};
-
#[derive(Parser)]
-#[clap(name = "rss-email")]
-#[clap(author = AUTHORS)]
-#[clap(version = VERSION)]
-#[clap(about = "Fetch RSS Feeds and send them via email")]
+#[clap(author, version, about)]
pub struct Cli {
/// Custom path to database
- #[clap(long = "database", value_parser, default_value_t = database_path().into_os_string().into_string().unwrap())]
+ #[clap(long = "database", value_name = "path", value_parser, default_value_t = database_path().into_os_string().into_string().unwrap())]
pub database_path: String,
/// Custom path to configuration
- #[clap(long = "config", value_parser, default_value_t = config_path().into_os_string().into_string().unwrap())]
+ #[clap(long = "config", value_name = "path", value_parser, default_value_t = config_path().into_os_string().into_string().unwrap())]
pub config_path: String,
/// Custom path to URLs with RSS feeds being fetched
- #[clap(long = "urls", value_parser, default_value_t = urls_path().into_os_string().into_string().unwrap())]
+ #[clap(long = "urls", value_name = "path", value_parser, default_value_t = urls_path().into_os_string().into_string().unwrap())]
pub urls_path: String,
/// Don't send emails
#[clap(long, value_parser)]
blob - e202c06d88e575e988f74cd8fa5fe4c4fff547ed
blob + f499eba9670ab4caca50e3d9efa905bc984a8643
--- src/main.rs
+++ src/main.rs
use sqlx::{sqlite::SqlitePoolOptions, Sqlite};
use tokio::task::JoinSet;
-const VERSION: &str = env!("CARGO_PKG_VERSION");
-const AUTHORS: &str = env!("CARGO_PKG_AUTHORS");
-
#[tokio::main]
async fn main() -> anyhow::Result<()> {
env_logger::init();