Metadata-Version: 2.1
Name: imgbox-cli
Version: 0.0.3
Summary: Command line interface for sharing images on imgbox.com
Author-email: plotski <plotski@example.org>
License: GPL-3.0-or-later
Project-URL: Repository, https://codeberg.org/plotski/imgbox-cli
Project-URL: Bug Tracker, https://codeberg.org/plotski/imgbox-cli/issues
Project-URL: Changelog, https://codeberg.org/plotski/imgbox-cli/raw/branch/master/NEWS
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyimgbox==1.*
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Requires-Dist: pytest-mock; extra == "dev"
Requires-Dist: pytest-httpserver; extra == "dev"
Requires-Dist: tox; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: isort; extra == "dev"

CLI tool for uploading images to [https://imgbox.com/](imgbox.com).

### Usage

```sh
$ 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

```sh
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

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