ranyalbegwein / tinypng Goto Github PK
View Code? Open in Web Editor NEWA Bash script for shrinking PNG files, using tinypng.com
A Bash script for shrinking PNG files, using tinypng.com
A very cool script that just works and does its job.
I would suggest adding some functions for finding files.
In the current version, it is necessary to specify the file names and paths for loading. This is cool, but in my example there are 3,500 files and they are all in different folders.
An additional solution for me was the use of the "find" command, which searches for files by extension along a given path. In the event that the file was found it is sent to "tinypng", with information about the name and path of the location.
find /path -type f \( -name "*.png" -or -name "*.jpg" -or -name "*.jpeg" \) -print -exec bash -c '/path/tinypng --file {} --download $(dirname {}) --overwrite --print --key "00000000000000000"' \;
It is very simple, it allowed me to convert my 3,500 without having to do the "tinypng" configuration for each directory.
Perhaps this example can be useful to someone else, if possible, add it to README.md
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.