Skip to content

lidppp/zippng-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zippng

中文
A simple Node.js script for compressing PNG format images using the TinyPNG API.

Installation

  1. Clone the repository:

    git clone https://github.com/lidppp/zippng-node.git
    cd zippng
    yarn install
  2. Install dependencies:

    npm install -g zippng

Usage

zippng [-r|-v|-h|-s key]
  • -r: Recursively search for PNG files.
  • -v: View version.
  • -h: Help documentation.
  • -s key: Set TinyPNG API Key.

Configuration

The script requires a TinyPNG API key. You can refer to the TinyPNG documentation for the application process.
Configure using zippng -s YOUR_API_KEY

Example

# Compress PNG files in the current directory
zippng

# Recursively compress PNG files
zippng -r

# Set TinyPNG API Key
zippng -s YOUR_API_KEY

Version

Check the version of the script:

zippng -v

Help

View help documentation:

zippng -h

Notes

  • If an API key is not provided or an incorrect API key is provided, the script will not run as expected.
  • For more details on TinyPNG API, refer to TinyPNG Developers.

License

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

About

A Node.js script for compressing PNG images using the TinyPNG API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published