Metadata-Version: 2.1
Name: camshell
Version: 0.1.6
Summary: A simple tool to stream camera in shell.
License: MIT
Author: Aref Mehr
Author-email: aref.moqadam@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: click (>=8.1.7,<9.0.0)
Requires-Dist: loguru (>=0.7.3,<0.8.0)
Requires-Dist: pygobject (>=3.50.0,<4.0.0)
Description-Content-Type: text/markdown

# CamShell

CamShell, A simple way to stream a camera as ASCII art directly in a terminal.

## Installation

Using pip:

```bash
pip install camshell
```

## How to Use

CLI Usage:

After installation, you can run the `camshell` command-line tool or by providing
the device id.

```bash
# Run the default device
camshell

# Or run by device-id
camshell 1

# Or a device path specifically
camshell /dev/video3

# Or stream from a file
camshell -f ./my_video.mp4
```

## Python API Usage

If you’d like to use CamShell in your Python code, here’s how:

```python
from camshell import CamShell

# simply call:
device_id = "/dev/video0"
CamShell.start(device_index=device_id)

# or in case of MacOS
CamShell.start(avf_source=True)
```

Run on a custom screen

```python
from camshell import CamShell
from camshell.display import Display
from camshell.vision.camera import GenericCamera

# Create a GStream-based camera object
camera = GenericCamera(device_index=cap_id, avf_source=True)

# Create a Curses display
display = Display()

# Create and run the CamShell
cs = CamShell(camera, display)
cs.initialize()
cs.run()
```

## Output Example

![Example Output](https://github.com/ArefMq/camshell/blob/main/docs/screenshot_shrek.png)

