Metadata-Version: 2.4
Name: tepracli
Version: 1.1.1
Summary: An example of tepra-lite-esp32 client / CLI
Home-page: https://github.com/puhitaku/tepra-lite-esp32/tree/master/client
Author: Takumi Sueda
Author-email: puhitaku@gmail.com
License: MIT License
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
Requires-Dist: click
Requires-Dist: pillow
Requires-Dist: qrcode[pil]
Requires-Dist: requests
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: requires-dist
Dynamic: summary

tepracli - reference impl. of tepra-lite-esp32 client
=====================================================

## Install with pip

```
$ pip install tepracli
$ tepracli
```

## Install with uvx

```
$ uvx tepracli
```

## Install from source

It's recommended to enable editable mode `-e`; pull this repository from remote and tepracli will be updated automatically.

```
$ cd tepra-lite-esp32/client
$ pip install -e .
$ python -m tepracli
```

## Usage

Subcommands:

 - print: print strings and QR code
 - battery: get remaining battery

### Print

```
Usage: tepracli print [OPTIONS]

Options:
  -a, --address TEXT            The IP address or the URL of TEPRA Lite LR30. (default = tepra.local)
  --preview                     Generate preview.png without printing.
  -f, --font TEXT               Path or name of font. (default = bundled Adobe
                                Source Sans)
  -S, --fontsize INTEGER RANGE  Font size. [px] (default = 30)  [x>=0]
  -d, --depth INTEGER RANGE     Depth of color. (default = 0)  [-3<=x<=3]
  -m, --message TEXT            Print a text.
  -s, --space TEXT              Leave space between parts. [px]
  -q, --qr TEXT                 Draw a QR code.
  --help                        Show this message and exit.
```

### Print examples

|Options|Output|
|:-|:-:|
|`-m Hello`|<img src="example1.png" height=80px>|
|`-S 15 -m Hello`|<img src="example2.png" height=80px>|
|`-S 50 -m Hello`|<img src="example3.png" height=80px>|
|`-m Hello -m World`|<img src="example4.png" height=80px>|
|`-m Hello -s 10 -m World`|<img src="example5.png" height=80px>|
|`-q "http://example.com" -s 20 -m "http://example.com"`|<img src="example6.png" height=80px>|

### Get Remaining Battery

It's not really useful: LR30 replies 99% as the percentage of remaining battery every time.

```
Usage: tepracli battery [OPTIONS]

Options:
  -a, --address TEXT  The IP address or the URL of TEPRA Lite LR30. (default = tepra.local)
  --help              Show this message and exit.

```

```
$ tepracli battery -a ${TEPRA_ADDRESS}
99%
```
