Skip to main content

Make any image ready for the web.

Project description

Make any image ready for the web. Fast.

ProperJPG is a super fast, lightweight CLI app that converts images to jpg. It also resizes them!


Actively soliciting contributors!

Feel free to open a pull request in case you find an issue or a way to improve the app. New features are also welcome, considering they don’t add unecessary complexity to the user experience.

Installation

Regular

Pipx (recommended)

pipx install properjpg

Pip

pip install properjpg

Developer

Poetry

poetry add properjpg

Git

git clone https://github.com/vitorrloureiro/properjpg

Features

Smart resize

In either modes, it has a super cool ‘smart resize’ functionality. It allows you to set a max width and height, and you can be sure that every image compressed by it will be no larger or taller than what you specify. This ‘smart resize’ mode makes sure to don’t resize images that doesn’t need to, and also takes in account if it’s best for an image to be resized based on it’s width or height.

Multiprocessing

This app uses the multiprocessing module to leverage all the power on your computer. It’ll work faster if you have multiple cores.

How it works?

This app works in two modes:

“Single file” mode

Input an image path and the desired output path.

Usage:

properjpg [input_path] [output_path] -wi=[max_width] -he=[max_height]

“Directory” mode

This is where this app really shines. Input a directory path and a desired destination path and the app will clone the folder struct of the original directory on the output path. Then it will look for all images in the input folder and will try to convert (and resize, if you setted it to) them.

ProperJPG uses multiprocessing to speed up the process.

Usage:

properjpg [input_path] [output_path] -d -wi=[max_width] -he=[max_height]

Notes

This software is in Alpha stage. A lot of things may change, including syntax and dependencies. I’m looking for help to improve this tool in terms of speed, features and code readability. Feel free to make suggestions and appoint improvements!. Also feel free to help me improve the tests 😅

The goal is to always keep the code with 100% test coverage.

Contributing

Requirements

This repository automatically lints code with flake8 and black, and also runs mypy and pytest. Pull requests must pass in all those tests.

Roadmap

  • Improve testing.

  • Improve Docs.

  • Improve UI (maybe switch to Click?).

  • Improve Performance.

License

MIT

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

properjpg-0.1.0.tar.gz (6.5 kB view hashes)

Uploaded Source

Built Distribution

properjpg-0.1.0-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

Supported by

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