-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |