Skip to main content

Python utility to add borders to my photography pictures

Project description

colorframe

A simple package to add a colored frame on pictures.

Install

This code is compatible with Python 3.6+. Install it in your virtual enrivonment with:

pip install colorframe

Usage

With this package is installed in the activated enrivonment, it can be called through python -m colorframe or through a newly created colorframe command.

Detailed usage goes as follows:

Usage: colorframe [OPTIONS] [PATH]

  Add a colored frame on pictures, easily.

Arguments:
  [PATH]  Location, relative or absolute, to the file or directory of files to
          add a colored border to.


Options:
  --vertical INTEGER    Size (width) of the whiteframe to add on the vertical
                        image edges.  [default: 150]

  --horizontal INTEGER  Size (height) of the whiteframe to add on the
                        horizontal image edges.  [default: 150]

  --color TEXT          The desired color of the added border. Should be a
                        keyword recognized by Pillow.  [default: white]

  --log-level TEXT      The base console logging level. Can be 'debug',
                        'info', 'warning' and 'error'.  [default: info]

  --install-completion  Install completion for the current shell.
  --show-completion     Show completion for the current shell, to copy it or
                        customize the installation.

  --help                Show this message and exit.

The script will crawl files, add borders and export the results in a newly created outputs folder.

You can otherwise import the high-level object from the package, and use at your convenience:

from colorframe import BorderCreator

border_api = BorderCreator(
    commandline_pathp="path_to_your_images", vertical_border=150, horizontal_border=100, color="blue"
)
border_api.execute_target()

Made with ♥︎ by fsoubelet
MIT © 2020 Felix Soubelet

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

colorframe-0.2.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

colorframe-0.2.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file colorframe-0.2.1.tar.gz.

File metadata

  • Download URL: colorframe-0.2.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.5 Darwin/20.6.0

File hashes

Hashes for colorframe-0.2.1.tar.gz
Algorithm Hash digest
SHA256 dbc1a8d23c07e8c6b945f40287f84f60d18dc597dd62731fd25582fa145fc05c
MD5 53367d875a3932e0fdd715d128f3b782
BLAKE2b-256 b39b0bde9b97b3cc06afcbe7f238c1a50e86adc26503e5b7365c1297d77de9e9

See more details on using hashes here.

File details

Details for the file colorframe-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: colorframe-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.5 Darwin/20.6.0

File hashes

Hashes for colorframe-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f43cb9dfc6a971f914a8a3f19a6af50662e757f3e6aaf179e89864de5b51e68
MD5 c352677008ab48b4a9772582bbab5d00
BLAKE2b-256 a340f29ab2b8bd521533f9d46e896bf8c759637519ff34f0c84fde3286014e8d

See more details on using hashes here.

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