diff --git a/Cargo.lock b/Cargo.lock index 7e53c655d9a03ace3fe59cdb7091b8103e5d6e4a..3967221633010d27c0a04416f2119acefda9289f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "crunch-cli" -version = "0.5.0" +version = "0.5.1" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 2f3e893ed9b203384e99bbd18dfbd790b564bce9..66173e72da33b764f634700a102290e0ecc41e48 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,11 @@ [package] name = "crunch-cli" -version = "0.5.0" +version = "0.5.1" edition = "2021" +homepage = "https://microhacks.lcr.app/crunch/" +repository = "https://lab.lcr.gr/microhacks/crunch" + license = "GPL-3.0" description = "Command line asset manipulation, set up a pipeline once and run it against all of your files" authors = [ diff --git a/README.md b/README.md index 560c145dd468a00bffe1ab1f83807e24457ab5e6..6e246fd3033aa1cc22f0cdace4435781159576f0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Command line image manipulation, set up a pipeline once and run it against all of your assets +For more info, check out [the docs](https://microhacks.lcr.app/crunch) + ## Usage Crunch takes an image and applies a transformation to it. But what if you want to do **two** transformations? diff --git a/src/cli_args.rs b/src/cli_args.rs index 5d0df2cf943f62f14ecae56ac68fab01bbf9ef57..3a5db90f6a2fee2e42faacd722ce18b10aaaeefa 100644 --- a/src/cli_args.rs +++ b/src/cli_args.rs @@ -12,7 +12,7 @@ use crate::load_image; #[derive(Parser, Debug, Clone, Serialize, Deserialize)] #[clap(name = "crunch")] #[clap(author = "Louis Capitanchik <louis@microhacks.co.uk>")] -#[clap(version = "0.5.0")] +#[clap(version = "0.5.1")] #[clap(about, long_about = None)] #[serde(tag = "command", content = "params")] pub enum Args { @@ -80,20 +80,20 @@ impl Args { .save_with_format(&flip.output, ImageFormat::Png) .map_err(anyhow::Error::from) } - Args::Remap(remap) => { - let image_data = load_image(&remap.input, None)?; - let palette_data = load_image(&remap.palette, None)?; - - let image_palette = Palette::extract_from(&image_data)?; - let target_palette = Palette::extract_from(&palette_data)?; - - let mappings = Palette::calculate_mapping(&image_palette, &target_palette); - let output = Remap::remap_image(image_data, mappings)?; - - output - .save_with_format(&remap.output, ImageFormat::Png) - .map_err(anyhow::Error::from) - } + // Args::Remap(remap) => { + // let image_data = load_image(&remap.input, None)?; + // let palette_data = load_image(&remap.palette, None)?; + // + // let image_palette = Palette::extract_from(&image_data)?; + // let target_palette = Palette::extract_from(&palette_data)?; + // + // let mappings = Palette::calculate_mapping(&image_palette, &target_palette); + // let output = Remap::remap_image(image_data, mappings)?; + // + // output + // .save_with_format(&remap.output, ImageFormat::Png) + // .map_err(anyhow::Error::from) + // } Args::Reduce(reduce) => { if let Some(amount) = reduce.colours { log::info!("Num cols {}", amount); @@ -108,6 +108,7 @@ impl Args { split.run(&image) } Args::Pipeline(pipeline) => pipeline.execute(), + _ => Ok(()), } } }