From a12d95fcb948a8d19ba8fe55566ee0ef4dd99bab Mon Sep 17 00:00:00 2001 From: museun Date: Thu, 22 Oct 2020 11:43:22 -0400 Subject: [PATCH] add readme, update cargo.toml --- Cargo.toml | 15 +++++++++------ README.md | 9 +++++++-- src/bin/json_to_rust/main.rs | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5e87796..869d16c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,13 @@ [package] -name = "json_to_rust" -version = "0.2.0" -authors = ["museun "] -edition = "2018" -license = "0BSD" -readme = "README.md" +authors = ["museun "] +description = "turns sample json into rust structs" +documentation = "https://docs.rs/json_to_rust/latest/json_to_rust/" +edition = "2018" +license = "0BSD" +name = "json_to_rust" +readme = "README.md" +repository = "https://github.com/museun/json_to_rust" +version = "0.2.0" [dependencies] anyhow = "1.0.33" diff --git a/README.md b/README.md index 032b3b9..18f8c8f 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,15 @@ +# json_to_rust + +this allows you to generate rust from sample json + ``` -json_to_rust: 0.1.0 +json_to_rust: 0.2.0 description: pipe some json to this and it'll generate some rust for you. usage: - < foo.json | json_to_rust -j json_object -n MyStruct > out.rs + cat foo.json | json_to_rust -j json_object -n MyStruct > out.rs flags: -u, --make-unit-tests generate unit tests @@ -57,6 +61,7 @@ flags: -v, --version show the current version -h, --help show this message + ``` License: 0BSD diff --git a/src/bin/json_to_rust/main.rs b/src/bin/json_to_rust/main.rs index 5e89be2..360e9e4 100644 --- a/src/bin/json_to_rust/main.rs +++ b/src/bin/json_to_rust/main.rs @@ -16,7 +16,7 @@ description: pipe some json to this and it'll generate some rust for you. usage: - < foo.json | json_to_rust -j json_object -n MyStruct > out.rs + cat foo.json | json_to_rust -j json_object -n MyStruct > out.rs flags: -u, --make-unit-tests generate unit tests @@ -53,7 +53,7 @@ description: pipe some json to this and it'll generate some rust for you. usage: - < foo.json | json_to_rust -j json_object -n MyStruct > out.rs + cat foo.json | json_to_rust -j json_object -n MyStruct > out.rs flags: -u, --make-unit-tests generate unit tests