Skip to content
Converter PNG/JPG to Webp and scan all changes
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea refactor: convert to pip package Sep 5, 2017
arts
webpc feat: handle the case of interrupt by user Sep 6, 2017
.gitignore refactor: convert to pip package Sep 5, 2017
CHANGELOG.md
LICENSE.txt docs: update readme doc Sep 5, 2017
MANIFEST.in
README-zh.md
README.md docs: fix typo on readme doc May 17, 2018
debug.sh chore: add debug script Sep 5, 2017
setup.py feat: handle the case of interrupt by user Sep 6, 2017

README.md

Webp Converter and Analytics

An powerful webp batch converter and differ analytics tool.

You can use this tool to converter batch images(png/jpg) to webp and output size changes.

Purpose

  1. Convert batch images from PNG/JPG format to Webp format
  2. WILL NOT convert images if its webp one is larger than origin one automatically(the origin one will be copied to [output-directory]/origin/ directory)
  3. WILL NOT convert images if it is failed to convert to webp one automatically(the origin image of failed one will be copied to [output-directory]/failed directory)
  4. You can ignore all images which has transparency pixel if you want with --ignore-transparency-image config(the origin image of has-transparency-image will be copied to /webp-converted/transparency directory)
  5. Output convert result, like how much size reduces, how many files skip convert, etc...
  6. You can replace the images with converted-webp image automatically if you want with replace: true config

Install

brew install webp
pip install webp-converter

Use

Example

If you just want to convert all images on the current files when it can be smaller after converted and replace the origin one:

webpc --r

If you just want to convert all images on the current folder and with quality-ratio to 70 and output to ~/Downloads/test-converted when it can be smaller after converted:

webpc -q=70 -o=~/Downloads/test-converted/

If you just want to convert all images on the current folder and with clean the webp-converted folder if it exist and with quality-ratio to 95 and output to ./webp-converted and ignore images when it has transparency on it when it can be smaller after converted:

webpc --c --ignore-transparency-image -q=95

If you want to convert all images on ~/Downloads/img/test folder and output converted result to ~/Downloads/test-converted folder and only converted origin images when it isn't has same name .webp file on ~/Downloads/test-converted folder(just not with --c argument) when it can be smaller after converted:

webpc -o=~/Downloads/test-converted/ ~/Downloads/img/test

My Terminal Config

If you want to adapter the same theme like screenshot above, it's very easy:

  • Firstly, please use powerlevel9k theme(Install the Powerlevel9k Theme and Powerline Fonts as the powerlevel9k repo readme doc said).
  • Secondly, please config the iTerm2-Neutron color scheme.
  • Thirdly, please config your shell(If you are using zsh, just add following code to the ~/.zshrc file):
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status time)
POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S}"
POWERLEVEL9K_NODE_VERSION_BACKGROUND='022'
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2

License

Copyright 2017, JacksGong(https://jacksgong.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You can’t perform that action at this time.