diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/cartographer.iml b/.idea/cartographer.iml new file mode 100644 index 0000000..cf84ae4 --- /dev/null +++ b/.idea/cartographer.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..3b5ac98 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..454d230 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "cartographer" +version = "0.1.0" +description = "A command-line tool for generating and saving Minecraft seeds" +authors = ["lnxwizard "] +edition = "2021" +license = "GPL-3" +repository = "https://github.com/lnxwizard/cartographer" +readme = "README.md" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +clap = { version = "4.4.6", features = ["derive"] } +colored = "2.0.4" +rand = "0.8.5" diff --git a/src/cli.rs b/src/cli.rs new file mode 100644 index 0000000..e2cb678 --- /dev/null +++ b/src/cli.rs @@ -0,0 +1,13 @@ +use clap::Parser; + +#[derive(Parser, Debug)] +#[command(about = "A command-line tool built with Rust for generating and saving Minecraft seeds.")] +#[command( + long_about = "Generate random Minecraft seeds and save favorite seeds with `cartographer`." +)] +#[command(author, version)] +pub struct Cli { + #[arg(help = "Toggle colored output")] + #[arg(short = 'c', long = "colored")] + pub colored: bool, +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..a40e8ec --- /dev/null +++ b/src/main.rs @@ -0,0 +1,15 @@ +mod cli; + +use clap::Parser; +use cli::Cli; +use rand::random; + +fn main() { + let _cli = Cli::parse(); + + let seed64: i64 = random(); + let seed32: i32 = random(); + + println!("64-bit Seed: {}", seed64); + println!("32-bit Seed: {}", seed32); +}