From 2797966da4ab58f5a86df559fc29452cda15be75 Mon Sep 17 00:00:00 2001
From: Samuel Marks <807580+SamuelMarks@users.noreply.github.com>
Date: Thu, 28 Nov 2024 05:37:20 -0600
Subject: [PATCH] docs(README): use `--help` text & Typo fixes (#141)
---
README.md | 142 ++++++++++++++++++++++++++++++++++++++++-------
src/code.rs | 2 +-
src/global.rs | 2 +-
src/parser.rs | 2 +-
test/test_all.sh | 2 +-
5 files changed, 126 insertions(+), 24 deletions(-)
diff --git a/README.md b/README.md
index 5e6aef8d..eb4d6633 100644
--- a/README.md
+++ b/README.md
@@ -105,32 +105,134 @@ Setting up a custom binary allows you to completely customize the generation; ho
cargo install dsync
```
-**CLI Usage**
-
-* `-i`: path to the diesel schema file
-* `-o`: model output directory
-* `-c`: connection type (for example: `diesel::sqlite::SqliteConnection`)
-* `-g`: (optional, repeatable) list of columns that are automatically generated by create/update triggers (for example, `created_at`, `updated_at`)
-* `--tsync`: (optional) adds `#[tsync]` attribute to generated structs for the [`tsync` crate](https://github.com/Wulf/tsync)
-* `--model-path`: (optional) set a custom model import path, default `crate::models::`
-* `--schema-path`: (optional) set a custom schema import path, default `crate::schema::`
-* `--no-serde`: (optional) if set, does not output any serde related code
-* `--no-crud`: (optional) Do not generate the CRUD functions for generated models
-* `--create-str`: (optional) Set which string type to use for `Create*` structs (possible are `string`, `str`, `cow`)
-* `--update-str`: (optional) Set which string type to use for `Update*` structs (possible are `string`, `str`, `cow`)
-* `--single-model-file`: (optional) Generate only a single model file, instead of a directory with `mod.rs` and `generated.rs`
-* `--readonly-prefix`: (optional, repeatable) A prefix to treat a table matching this as readonly *2
-* `--readonly-suffix`: (optional, repeatable) A suffix to treat a table matching this as readonly *2
-* `--diesel-backend`: (when the "advanced-queries" feature is enabled) The diesel backend in use (possible values include `diesel::pg::Pg`, `diesel::sqlite::Sqlite`, `diesel::mysql::Mysql`, or your custom backend type)
+### CLI Usage
+```sh
+Generate rust structs & query functions from diesel schema files.
+
+Usage: dsync [OPTIONS] --input --output