Skip to content

Commit

Permalink
chore: docs, license and build optimization (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
fgardt authored Mar 13, 2024
1 parent 0503dc5 commit 2a08931
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[package]
name = "spritter"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
authors = ["fgardt <[email protected]>"]
description = "Spritesheet generator for factorio"

[profile.release]
strip = true
lto = "thin"

[lints.rust]
unsafe_code = "forbid"

Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <COMMAND>
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] <SOURCE> <OUTPUT>
Arguments:
<SOURCE> Folder containing the individual sprites
<OUTPUT> Output folder
Options:
-r, --recursive
Recursive search for images. Each folder will be a separate sprite sheet
-t, --tile-resolution <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 <SOURCE> <OUTPUT>
Arguments:
<SOURCE>
Folder containing the individual sprites
<OUTPUT>
Output folder
```

## Todo

- Lua output generation

0 comments on commit 2a08931

Please sign in to comment.