feat: Add --address-file flag to repo announce command

This flag creates a file in the current working directory and writes
the `naddr` into it. This allows n34 and other tools to recognize the
repository address automatically, eliminating the need for manual input
by the user.

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb
2025-05-22 19:17:07 +00:00
parent b29937a04e
commit 57b48c7368
2 changed files with 25 additions and 9 deletions

View File

@@ -49,6 +49,9 @@ Git repository: https://git.4rs.nl/awiteb/n34.git"#;
/// Footer message, used in the help message
const FOOTER: &str = r#"Please report bugs to <naddr1qqpkuve5qgsqqqqqq9g9uljgjfcyd6dm4fegk8em2yfz0c3qp3tc6mntkrrhawgrqsqqqauesksc39>."#;
/// Name of the file storing the repository address
pub const NOSTR_ADDRESS_FILE: &str = "nostr-address";
/// The command-line interface options
#[derive(Args, Clone)]
#[clap(