Giter VIP home page Giter VIP logo

tinifier's Introduction

Logo

CLI tool for images compressing

Release version Project language Build Status Coverage Go Report Image size License

This tool uses tinypng.com API endpoint for compressing your local jpg/png images (it supports parallel jobs):

API key can be passed in environment variable named TINYPNG_API_KEY

Recursive (deep) directories walking is not supported

๐Ÿ”ฅ Usage example

tinypng.com API key is required. You get own API key by pressing link "login" on service main page.

Compress single image:

$ tinifier -k 'YOUR-API-KEY-GOES-HERE' ./image.png

Compress all png images in some directory and 2 another images:

$ tinifier -k 'YOUR-API-KEY-GOES-HERE' -e png ./images-directory ./image-1.png ./image-2.png

Compress all images in some directory using 20 threads:

$ tinifier -k 'YOUR-API-KEY-GOES-HERE' -e png -e jpg -e PNG,JPG -t 20 ./images-directory

๐Ÿณ Using docker

Compress all images in current directory:

$ docker run --rm \
    -v "$(pwd):/rootfs:rw" \
    -w /rootfs \
    tarampampam/tinifier -k 'YOUR-API-KEY-GOES-HERE' .

or

$ docker run --rm \
    -v "$(pwd):/rootfs:rw" \
    -w /rootfs \
    -e 'TINYPNG_API_KEY=YOUR-API-KEY-GOES-HERE' \
    tarampampam/tinifier .

Testing

For application testing we use built-in golang testing feature and docker-ce + docker-compose as develop environment. So, just write into your terminal after repository cloning:

$ make test

Or build binary file:

$ make build

Changes log

Release date Commits since latest release

Changes log can be found here.

Support

Issues Issues

If you will find any package errors, please, make an issue in current repository.

License

This is open-sourced software licensed under the MIT License.

tinifier's People

Contributors

tarampampam avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.