From ac280e2cb783095fe681020c609962ff3f865c42 Mon Sep 17 00:00:00 2001 From: Thibaut Schmitt Date: Wed, 22 Dec 2021 10:53:00 +0100 Subject: [PATCH] Update Readme --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index 1f8ade0..34c9b5b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,41 @@ # ResgenCLI A description of this package. + +# Fonts generator + +Font generator generate an extension of `UIFont` (or a custom class). It also print `UIAppFonts` to put in your project `.plist`. +iOS required to use the **real name** of font, this name can be different from its filename. To get the **real name**, it use `fc-scan`. + +**Example** + +``` +swift run -c release FontToolCore ./SampleFiles/Fonts +--extension-output-path ./SampleFiles/Fonts/Generated \ +--extension-name R2Font +``` + +**Parameters** + +1. `-f`: force generation +2. Font input folder, it will search for every `.ttf` and `.otf` files +3. `--extension-output-path`: path where to generate generated extension +4. `--extension-name` *(optional)* : name of class to add the extension + +> ⚠️ If extension name is not set or is `UIFont`, it will generate static property on `UIFont`. + +# Colors generator + +``` +swift run -c release ColorToolCore -f ./SampleFiles/Colors/sampleColors1.txt +--style all \ +--xcassets-path "./SampleFiles/Colors/colors.xcassets" \ +--extension-output-path "./SampleFiles/Colors/Generated/" \ +--extension-name "UIColor" +``` + +# TODO + +- [ ] Remove `Generated` folder from `SampleFiles/Colors` and `SampleFiles/Font`. Create `Generated` folder next to `SampleFiles` and add it to `.gitignore`. Update samples commands and `genAllRessources.sh` accordingly. +- [ ] Generate strings and tags +- [ ] Generate images