Upload images to imgbox.com
Project description
-
CLI tool
$ 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 ".images[].image_url"
-
Shell script to generate BBCode
imgbox --json --thumb-width 350 "$@" > upload.json echo "[url=$(jq -r '.gallery_url' < upload.json)]Gallery[/url]" echo "[url=$(jq -r '.edit_url' < upload.json)]Edit Gallery[/url]" while read image; do image_url=$(jq -r '.image_url' <<< "$image") thumbnail_url=$(jq -r '.thumbnail_url' <<< "$image") echo "[url=$image_url][img]$thumbnail_url[/img][/url]" done <<< $(jq -c '.images[]' upload.json)
-
Python
import pyimgbox import pprint files = ("this.jpg", "and/that.png") gallery = pyimgbox.Gallery(title="Hello, World!") try: gallery.create() except ConnectionError as e: print('Oh no!', str(e)) else: print('Gallery URL:', gallery.url) print(' Edit URL:', gallery.edit_url) for submission in gallery.add(*files): pprint.pprint(submission)
Installation
$ sudo apt install pipx
$ pipx install --upgrade pyimgbox
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyimgbox-0.3.0.tar.gz
(8.0 kB
view details)
Built Distribution
pyimgbox-0.3.0-py3-none-any.whl
(22.6 kB
view details)
File details
Details for the file pyimgbox-0.3.0.tar.gz
.
File metadata
- Download URL: pyimgbox-0.3.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 361f2f2205270f3cf6945a511f93cac97b8c62dda4edcba7e721842d74d78254 |
|
MD5 | 9cb9749dfec2ca9f31297198f665d745 |
|
BLAKE2b-256 | dcc916f356da3ecda17100b2a1c8f1daeabb720d13c9355c967b35afd3fc72cf |
File details
Details for the file pyimgbox-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: pyimgbox-0.3.0-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 592f0f3996f81a91d1df0e1aeb22d5d5ac77a068e9257194d0b288cad07a38bf |
|
MD5 | 76cb6af1be2419f1aa35b1faf0e802d2 |
|
BLAKE2b-256 | 869b18a1623af2c985425c61e9a999d9a5f0de1e6433c6c4550c10f6699e396c |