Skip to main content

Python wrapper around invoking jpegoptim (https://github.com/tjko/jpegoptim)

Project description

build status

jpegoptim-py

A python wrapper to provide a pip-installable jpegoptim binary.

Internally this package provides a convenient way to download the pre-built jpegoptim binary for your particular platform.

Installation

pip install jpegoptim-py

Usage

After installation, the jpegoptim binary should be available in your environment (or jpegoptim.exe on windows).

As a pre-commit hook

See pre-commit for instructions

Sample .pre-commit-config.yaml:

-   repo: https://github.com/UnknownPlatypus/jpegoptim-py
    rev: v1.5.5.2
    hooks:
    -   id: jpegoptim

Lossy compression is not idempotent. In that case, consider adding a threshold, otherwise you might block the commit for too long.

Sample .pre-commit-config.yaml with lossy compression enabled:

-   repo: https://github.com/UnknownPlatypus/jpegoptim-py
    rev: v1.5.5.2
    hooks:
    -   id: jpegoptim
        args: [--strip-all, --all-progressive, --max=85, --threshold=3]

References

This is an adaptation of shellcheck-py following the exact same strategy. This aims at making it easier to use as a pre-commit hook.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jpegoptim_py-1.5.5.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

jpegoptim_py-1.5.5.2-py2.py3-none-win_amd64.whl (280.5 kB view details)

Uploaded Python 2Python 3Windows x86-64

jpegoptim_py-1.5.5.2-py2.py3-none-macosx_12_0_x86_64.whl (221.1 kB view details)

Uploaded Python 2Python 3macOS 12.0+ x86-64

File details

Details for the file jpegoptim_py-1.5.5.2.tar.gz.

File metadata

  • Download URL: jpegoptim_py-1.5.5.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0rc2

File hashes

Hashes for jpegoptim_py-1.5.5.2.tar.gz
Algorithm Hash digest
SHA256 0cefc8465ad15afb6f0d2c811539812cf3134cdb2582c5f7a3bebf0a73dbbced
MD5 c335322ce3ad60cb7471c4f7e335c1e7
BLAKE2b-256 880fd2f6169d8600d8b98c0006d5f790d27b1371121cec6e5eed6be0990c300e

See more details on using hashes here.

File details

Details for the file jpegoptim_py-1.5.5.2-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for jpegoptim_py-1.5.5.2-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 679f2c8a6af402878d38ee543b52e5b1afe152b344b36b2f82c12ee595d763f4
MD5 ee5669f01847ae473ce422793d5fcf54
BLAKE2b-256 1447c7f1cdd4f62183450edd1efb81bbe9de953ad6f7e43d6dc9d500c3ae0573

See more details on using hashes here.

File details

Details for the file jpegoptim_py-1.5.5.2-py2.py3-none-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for jpegoptim_py-1.5.5.2-py2.py3-none-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 3e6aa8ea2cbb65e959a421b6c7ccbc6bef4c44f614e956f1e7245f96ea629880
MD5 2cfb9e535038a32a1cee4c3d4c24f3f1
BLAKE2b-256 ed25340f2e8cd1097f1ed9e99e29d888ad26df4a260f68b9b420c4aa9d09afd8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page