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 all currently supported Python versions. 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: python -m colorframe [OPTIONS] [PATH]                                                 
                                                                                              
 Add a colored frame on pictures, easily.                                                     
                                                                                              
╭─ Arguments ────────────────────────────────────────────────────────────────────────────────╮
│   path      [PATH]  Location, relative or absolute, to the file or directory of files to   │
│                     add a colored border to.                                               │
│                     [default: None]                                                        │
╰────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ 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.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: colorframe-0.2.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for colorframe-0.2.2.tar.gz
Algorithm Hash digest
SHA256 558f6db6fc7cee889d1d9b728cb10ebf350ea277bdd389e784b3f750dcf550c3
MD5 10cba59a2558806fb32356a6eaf74672
BLAKE2b-256 21ae66cab931576a3e9a2b9c938939cfa35f17fded95bd895f1ea11480ebb04b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: colorframe-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for colorframe-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c602bcb0e453961be07d5be7028a1d7e688317801be4b169ae04035f83cfba38
MD5 e33e66db86e97f4b30838bf94ac25da4
BLAKE2b-256 e4c2d2e7952508b5df8bfaaae50b165338be67f7dbddfad769810f63dec1de8a

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