Metadata-Version: 2.1
Name: images-upload-cli
Version: 0.3.0a0
Summary: Upload images via APIs
Home-page: https://github.com/DeadNews/images-upload-cli
License: MIT
Keywords: cli,gyazo,imgur,upload-images,upload-pictures
Author: DeadNews
Author-email: uhjnnn@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: click (>=8.0.2,<9.0.0)
Requires-Dist: pillow (>=9.1.1,<10.0.0)
Requires-Dist: pyperclip (>=1.8.2,<2.0.0)
Requires-Dist: python-dotenv (>=0.20.0,<0.21.0)
Requires-Dist: requests (>=2.25.1,<3.0.0)
Project-URL: Repository, https://github.com/DeadNews/images-upload-cli
Description-Content-Type: text/markdown

# images-upload-cli

> Upload images via APIs

[![PyPI version](https://img.shields.io/pypi/v/images-upload-cli)](https://pypi.org/project/images-upload-cli)
[![CI/CD](https://github.com/DeadNews/images-upload-cli/actions/workflows/python-app.yml/badge.svg)](https://github.com/DeadNews/images-upload-cli/actions/workflows/python-app.yml)
[![pre-commit.ci](https://results.pre-commit.ci/badge/github/DeadNews/images-upload-cli/main.svg)](https://results.pre-commit.ci/latest/github/DeadNews/images-upload-cli/main)
[![codecov](https://codecov.io/gh/DeadNews/images-upload-cli/branch/main/graph/badge.svg?token=OCZDZIYPMC)](https://codecov.io/gh/DeadNews/images-upload-cli)

## Installation

```sh
pip install images-upload-cli
```

or

```sh
pipx install images-upload-cli
```

## Hostings

| host                                           | key required | return example                                       |
| :--------------------------------------------- | :----------: | :--------------------------------------------------- |
| [catbox](https://catbox.moe/)                  |      -       | `https://files.catbox.moe/{id}`                      |
| [fastpic](https://fastpic.org/)                |      -       | `https://i120.fastpic.org/big/2022/0730/d9/{id}.png` |
| [filecoffee](https://file.coffee/)             |      -       | `https://file.coffee/u/{id}.png`                     |
| [freeimage](https://freeimage.host/)           |      -       | `https://iili.io/{id}.png`                           |
| [geekpic](https://geekpic.net/)                |      -       | `https://s01.geekpic.net/{id}.png`                   |
| [gyazo](https://gyazo.com/)                    |      +       | `https://i.gyazo.com/{id}.png`                       |
| [imageban](https://imageban.ru/)               |      +       | `https://i2.imageban.ru/out/2022/07/30/{id}.png`     |
| [imgbb](https://imgbb.com/)                    |      +       | `https://i.ibb.co/{id}/image.png`                    |
| [imgchest](https://imgchest.com/)              |      +       | `https://cdn.imgchest.com/files/{id}.png`            |
| [imgur](https://imgur.com/)                    |      -       | `https://i.imgur.com/{id}.png`                       |
| [pictshare](https://pictshare.net/)            |      -       | `https://pictshare.net/{id}.png`                     |
| [pixeldrain](https://pixeldrain.com/)          |      -       | `https://pixeldrain.com/api/file/{id}`               |
| [pixhost](https://pixhost.to/)                 |      -       | `https://img75.pixhost.to/images/69/{id}_img.png`    |
| [ptpimg](https://ptpimg.me/)                   |      +       | `https://ptpimg.me/{id}.png`                         |
| [screenshotting](https://screenshotting.site/) |      -       | `https://screenshotting.site/i/{id}.png`             |
| [smms](https://sm.ms/)                         |      +       | `https://s2.loli.net/2022/07/30/{id}.png`            |
| [sxcu](https://sxcu.net/)                      |      -       | `https://sxcu.net/{id}.png`                          |
| [telegraph](https://telegra.ph/)               |      -       | `https://telegra.ph/file/{id}.png`                   |
| [up2sha](https://up2sha.re/)                   |      +       | `https://up2sha.re/media/raw/{id}.png`               |
| [uplio](https://upl.io/)                       |      +       | `https://upl.io/i/{id}.png`                          |
| [uploadcare](https://uploadcare.com/)          |      +       | `https://ucarecdn.com/{id}/img.png`                  |

## Usage

```sh
Usage: images-upload-cli [OPTIONS] IMAGES...

  Upload images via APIs.

Options:
  -h, --hosting [catbox|fastpic|filecoffee|freeimage|geekpic|gyazo|imageban|imgbb|imgchest|imgur|pictshare|pixeldrain|pixhost|ptpimg|screenshotting|smms|sxcu|telegraph|up2sha|uplio|uploadcare]
                                  [default: imgur]
  -b, --bbcode                    Add bbcode tags.
  -t, --thumbnail                 Add thumbnails and bbcode tags.
  -c, --clipboard / -C, --no-clipboard
                                  Copy result to clipboard.  [default: c]
  --version                       Show the version and exit.
  --help                          Show this message and exit.
```

## Env variables

```ini
CAPTION_FONT= # The default font is system dependent.

BEEIMG_KEY=
FREEIMAGE_KEY=
GYAZO_TOKEN=
IMAGEBAN_TOKEN=
IMGBB_KEY=
IMGCHEST_KEY=
IMGUR_CLIENT_ID=
PTPIMG_KEY=
SMMS_KEY=
UP2SHA_KEY=
UPLIO_KEY=
UPLOADCARE_KEY=
```

You can set these in environment variables, or in `.env` file:

- Unix: `~/.config/images-upload-cli/.env`
- MacOS: `~/Library/Application Support/images-upload-cli/.env`
- Windows: `C:\Users\<user>\AppData\Roaming\images-upload-cli\.env`

