Skip to main content

Command line interface for sharing images on imgbox.com

Project description

CLI tool for uploading images to https://imgbox.com/.

Usage

$ imgbox foo.jpg bar.png --title "My Gallery" --thumb-width 500
$ imgbox --thumb-width 123 < list_of_file_paths.txt
$ generate_file_paths | imgbox --json | jq -r ".[].image_url"

BBcode

while read image; do
    success=$(jq -r '.success' <<< "$image")
    if [ "$success" != 'true' ]; then
        error="$(jq -r '.error' <<< "$image")"
        filename="$(jq -r '.filename' <<< "$image")"
        echo "$filename: $error" >&2
    else
        image_url=$(jq -r '.image_url' <<< "$image")
        thumbnail_url=$(jq -r '.thumbnail_url' <<< "$image")
        echo "[url=$image_url][img]$thumbnail_url[/img][/url]"
    fi
done <<< $(imgbox --json "$@" | jq -c '.[]')

Installation

$ sudo apt install pipx
$ pipx install --upgrade imgbox-cli

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

imgbox-cli-0.0.3.tar.gz (19.6 kB view hashes)

Uploaded Source

Built Distribution

imgbox_cli-0.0.3-py3-none-any.whl (21.1 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