diff --git a/Cargo.lock b/Cargo.lock index b666ed0..02d022d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1060,7 +1060,7 @@ dependencies = [ [[package]] name = "spritter" -version = "0.1.0" +version = "0.1.1" dependencies = [ "clap", "error-stack", diff --git a/Cargo.toml b/Cargo.toml index 363fc69..b8ea340 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,14 @@ [package] name = "spritter" -version = "0.1.0" +version = "0.1.1" edition = "2021" authors = ["fgardt "] description = "Spritesheet generator for factorio" +[profile.release] +strip = true +lto = "thin" + [lints.rust] unsafe_code = "forbid" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ebc223d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Florian Gebhardt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 5c84250..f73a51c 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,66 @@ # Spritter A simple CLI tool to combine individual sprites into spritesheets for factorio. + +## Usage + +``` +~$ spritter help +Spritesheet generator for factorio + +Usage: spritter + +Commands: + spritesheet Generate sprite sheets from a folder of images + icon Generate a mipmap icon from a folder of images + help Print this message or the help of the given subcommand(s) + +Options: + -h, --help Print help + -V, --version Print version +``` + +### Spritesheet + +``` +~$ spritter help spritesheet +Generate sprite sheets from a folder of images + +Usage: spritter spritesheet [OPTIONS] + +Arguments: + Folder containing the individual sprites + Output folder + +Options: + -r, --recursive + Recursive search for images. Each folder will be a separate sprite sheet + -t, --tile-resolution + Resolution in pixel per tile [default: 32] + --hr + Set when this is considered a high resolution texture + --no-crop + Set when the sprites should not be cropped +``` + +### Icon + +``` +~$ spritter help icon +Generate a mipmap icon from a folder of images + +The individual images are used as the respective mip levels and combined into a single image + +Usage: spritter icon + +Arguments: + + Folder containing the individual sprites + + + Output folder +``` + +## Todo + +- Lua output generation