MIT License

项目介绍

JamieMason/ImageOptim-CLI 是一个托管在 GitHub 上的开源项目,主要使用 TypeScript 编写,采用 MIT License 许可证,目前获得 3.5k 个 Star、126 次 Fork。

仓库全名
JamieMason/ImageOptim-CLI
开源许可证
MIT License
Star 数
3.5k
Fork 数
126
未关闭 Issue
2

README 摘要

ImageOptim-CLI Automates ImageOptim, ImageAlpha, and JPEGmini for Mac to make batch optimisation of images part of your automated build process. Installation Usage Examples Requirements macOS only. Each app is optional and must be installed separately: ImageOptim — free ImageAlpha — free JPEGmini, JPEGmini Lite, or JPEGmini Pro — paid ⚠️ JPEGmini and support for assistive devices JPEGmini has no API or command line…

完整内容见 GitHub 原始 README 或本页 。

常见问题

ImageOptim-CLI 用什么语言开发?

主要使用 TypeScript 编写,采用 MIT License 许可证,目前有 3.5k 个 Star。

ImageOptim-CLI 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 ImageOptim-CLI 的源码?

可以直接克隆仓库:git clone https://github.com/JamieMason/ImageOptim-CLI.git,默认分支为 main;安装与运行步骤见仓库 README。

ImageOptim-CLI 最近还在维护吗?

仓库最近一次更新为 8月2日,当前有 2 个未关闭 Issue;Star 数为 3.5k,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Make optimisation of images part of your automated build process

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
3841
价值分
2165
活跃状态
活跃

语言占比

AppleScript
JavaScript
Just
Rust

Release

README

ImageOptim-CLI

Automates ImageOptim, ImageAlpha, and JPEGmini for Mac to make batch optimisation of images part of your automated build process.

Installation

npm install --global imageoptim-cli

Usage

Usage: imageoptim [OPTIONS] [PATTERNS]...

Arguments:
  [PATTERNS]...  Glob patterns of images or directories to optimise

Options:
  -a, --imagealpha            Enable ImageAlpha
  -j, --jpegmini              Enable JPEGmini
  -I, --no-imageoptim         Disable ImageOptim
      --quality <MIN-MAX>     ImageAlpha quality range from 0-100 [default: 65-80]
      --speed <N>             ImageAlpha speed from 1 (brute-force) to 10 (fastest) [default: 1]
      --number-of-colors <N>  ImageAlpha palette size from 2-256 [default: 256]
      --batch-size <N>        How many images to process at a time [default: 3000]
      --dry-run               List images which would be optimised, without optimising them
      --json                  Output newline-delimited JSON instead of human-readable text
      --verbose               Output debug logging
  -S, --no-stats              Do not display file size savings and quality loss information
  -C, --no-color              Output to the terminal without colors
  -h, --help                  Print help
  -V, --version               Print version

Examples

# Run ImageOptim.app over every image in current directory
imageoptim

# Run ImageAlpha.app and ImageOptim.app over every PNG in current directory
imageoptim --imagealpha '**/*.png'

# Run JPEGmini.app and ImageOptim.app over every JPG in current directory
imageoptim --jpegmini '**/*.jpg' '**/*.jpeg'

# Run JPEGmini.app over every JPG in current directory
imageoptim --jpegmini --no-imageoptim '**/*.jpg' '**/*.jpeg'

# Run ImageOptim.app over every image in a specific directory
imageoptim '~/Desktop'

Requirements

macOS only. Each app is optional and must be installed separately:

⚠️ JPEGmini and support for assistive devices

JPEGmini has no API or command line interface, so this tool automates its GUI. For that to work, the program running imageoptim-cli (such as your terminal) needs permission to control your computer under System Settings → Privacy & Security → Accessibility.

Development

This is a Rust rewrite of the original TypeScript + AppleScript implementation, distributed on npm as platform-specific binaries. See the justfile for available commands:

just test        # run all tests
just lint        # cargo check, fmt, clippy
just build-local # build and install the npm packages for this machine
just test-local  # smoke test the locally built npm package

评论

暂无评论