iconz

Crates.ioiconz
lib.rsiconz
version0.2.2
sourcesrc
created_at2020-06-08 19:04:13.340043
updated_at2020-06-10 18:58:46.026135
descriptionA simple CLI to generate all the necessary Xcode icon sizes from one single source file
homepagehttps://github.com/zhooda/rusty-iconz
repositoryhttps://github.com/zhooda/rusty-iconz
max_upload_size
id251464
size24,320
Zeeshan Hooda (zhooda)

documentation

README

rusty-iconz

ubuntu macos windows license

A simple CLI to generate all those pesky Xcode icon sizes from one single source file. This is the first project I've written in Rust so there will be plenty of bad code but that's okay :)

NEW: iconz now has some decent error handling. No more thread panics!

Install from Cargo

You must have rust & cargo installed before you can install iconz.

Install the latest published version iconz:

$ cargo install iconz

Building from source

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

Clone the repository

$ git clone https://github.com/zhooda/rusty-iconz.git
$ cd rusty-iconz

Build/Run for debug using Cargo

$ cargo run # with command line arguments OR
$ cargo build # to compile but not run

# The binary will be rusty-iconz/target/debug/iconz

Build for release (if you want to add it to your $PATH)

$ cargo build --release
$ cargo install
# The binary will be rusty-iconz/target/release/iconz

Usage

If you used cargo install you can simply call it like any other command. The only command line arguments needed are source image and icon directory

$ iconz --magic sourceimage.png icondir
    iconz v0.2.2
    make xcode icons
    #blacklivesmatter https://www.blacklivesmatters.com

    ✔ appstore.png ➜ ./testdir/AppIcon20x20@2x
    ✔ appstore.png ➜ ./testdir/AppIcon20x20@3x
    ✔ appstore.png ➜ ./testdir/AppIcon29x29@2x
    ✔ appstore.png ➜ ./testdir/AppIcon29x29@3x
    ✔ appstore.png ➜ ./testdir/AppIcon40x40@2x
    ✔ appstore.png ➜ ./testdir/AppIcon40x40@3x
    ✔ appstore.png ➜ ./testdir/AppIcon60x60@2x
    ✔ appstore.png ➜ ./testdir/AppIcon60x60@3x
    # ...
    kthxbye;

Command line flags

Flag Description
no flag Uses -i by default
-i, --image Uses CatmullRom algorithm for resizing

Contributing

Pull requests are welcome.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Commit count: 46

cargo fmt