Skip to content

Commit

Permalink
added project files
Browse files Browse the repository at this point in the history
  • Loading branch information
lnxwizard committed Oct 5, 2023
1 parent e839b51 commit c7044be
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/cartographer.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "cartographer"
version = "0.1.0"
description = "A command-line tool for generating and saving Minecraft seeds"
authors = ["lnxwizard <[email protected]>"]
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"
13 changes: 13 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
@@ -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,
}
15 changes: 15 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit c7044be

Please sign in to comment.