summaryrefslogtreecommitdiff
path: root/src/cli.rs
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2024-11-15 10:14:41 -0500
committerKit La Touche <kit@transneptune.net>2024-11-15 10:14:41 -0500
commit1635a4db77898e9394adaa104b4c53b94c59e2da (patch)
tree041158bc15a1b83caaa245fbe60faf46e84a3070 /src/cli.rs
parentfefe76b35b6329cbcc92755a65e47c7f62f64690 (diff)
parent2fb328089f01776e5bb553a1d50a061396588c8c (diff)
Merge branch 'main' into prop/shorter-expiry
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 308294d..0d448d2 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -1,6 +1,6 @@
-//! The `hi` command-line interface.
+//! The `pilcrow` command-line interface.
//!
-//! This module supports running `hi` as a freestanding program, via the
+//! This module supports running `pilcrow` as a freestanding program, via the
//! [`Args`] struct.
use std::{future, io};
@@ -22,18 +22,18 @@ use crate::{
ui,
};
-/// Command-line entry point for running the `hi` server.
+/// Command-line entry point for running the `pilcrow` server.
///
/// This is intended to be used as a Clap [Parser], to capture command-line
-/// arguments for the `hi` server:
+/// arguments for the `pilcrow` server:
///
/// ```no_run
-/// # use hi::cli::Error;
+/// # use pilcrow::cli::Error;
/// #
/// # #[tokio::main]
/// # async fn main() -> Result<(), Error> {
/// use clap::Parser;
-/// use hi::cli::Args;
+/// use pilcrow::cli::Args;
///
/// let args = Args::parse();
/// args.run().await?;
@@ -43,35 +43,36 @@ use crate::{
#[derive(Parser)]
#[command(
version,
- about = "Run the `hi` server.",
- long_about = r#"Run the `hi` server.
+ about = "Run the `pilcrow` server.",
+ long_about = r#"Run the `pilcrow` server.
The database at `--database-url` will be created, or upgraded, automatically."#
)]
pub struct Args {
- /// The network address `hi` should listen on
+ /// The network address `pilcrow` should listen on
#[arg(short, long, env, default_value = "localhost")]
address: String,
- /// The network port `hi` should listen on
+ /// The network port `pilcrow` should listen on
#[arg(short, long, env, default_value_t = 64209)]
port: u16,
- /// Sqlite URL or path for the `hi` database
- #[arg(short, long, env, default_value = "sqlite://.hi")]
+ /// Sqlite URL or path for the `pilcrow` database
+ #[arg(short, long, env, default_value = "sqlite://pilcrow.db")]
database_url: String,
- /// Sqlite URL or path for a backup of the `hi` database during upgrades
- #[arg(short = 'D', long, env, default_value = "sqlite://.hi.backup")]
+ /// Sqlite URL or path for a backup of the `pilcrow` database during
+ /// upgrades
+ #[arg(short = 'D', long, env, default_value = "sqlite://pilcrow.db.backup")]
backup_database_url: String,
}
impl Args {
- /// Runs the `hi` server, using the parsed configuation in `self`.
+ /// Runs the `pilcrow` server, using the parsed configuation in `self`.
///
/// This will perform the following tasks:
///
- /// * Migrate the `hi` database (at `--database-url`).
+ /// * Migrate the `pilcrow` database (at `--database-url`).
/// * Start an HTTP server (on the interface and port controlled by
/// `--address` and `--port`).
/// * Print a status message.