Metadata-Version: 2.1
Name: clickgen
Version: 1.2.0
Summary: The hassle-free cursor building toolbox.
Home-page: https://github.com/ful1e5/clickgen
Author: Kaiz Khatri
Author-email: kaizmandhu@gmail.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/ful1e5/clickgen/issues
Project-URL: Source, https://github.com/ful1e5/clickgen
Project-URL: Funding, https://liberapay.com/ful1e5
Project-URL: Changelog, https://github.com/ful1e5/clickgen/blob/main/CHANGELOG.md
Keywords: cursor,xcursor,windows,linux,anicursorgen,xcursorgen
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: C
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: System :: Operating System
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Operating System :: OS Independent
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Pillow (>=8.1.1)
Provides-Extra: doc
Requires-Dist: sphinx (>=4.4.0) ; extra == 'doc'
Requires-Dist: sphinx-rtd-theme (>=1.0.0) ; extra == 'doc'
Provides-Extra: test
Requires-Dist: flake8 (>=4.0.1) ; extra == 'test'
Requires-Dist: tox (>=3.24.5) ; extra == 'test'
Requires-Dist: mypy (>=0.940) ; extra == 'test'
Requires-Dist: pytest (>=7.0.1) ; extra == 'test'
Requires-Dist: pytest-cov (>=3.0.0) ; extra == 'test'
Requires-Dist: coverage (==6.3.2) ; extra == 'test'

[![CI](https://github.com/ful1e5/clickgen/workflows/CI/badge.svg)](https://github.com/ful1e5/clickgen/actions)
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/pytype)](https://pypi.org/project/clickgen/#files)
[![Docs](https://readthedocs.org/projects/clickgen/badge/?version=latest)](https://clickgen.readthedocs.io/en/latest/)
[![Code Coverage](https://codecov.io/gh/ful1e5/clickgen/branch/main/graph/badge.svg)](https://codecov.io/gh/ful1e5/clickgen)
[![CodeFactor](https://www.codefactor.io/repository/github/ful1e5/clickgen/badge/main)](https://www.codefactor.io/repository/github/ful1e5/clickgen/overview/main)

# Clickgen

The hassle-free cursor building toolbox.

**clickgen** is _API_ for building **X11** and **Windows** Cursors from `.png` files. clickgen is using `anicursorgen` and `xcursorgen` _under the hood_.

## Install

### using pip

```bash
pip3 install clickgen
```

### ArchLinux

```bash
yay -S python-clickgen
```

### Manjaro

```bash
pamac build python-clickgen
```

## CLI

```
clickgen -h
```

## PyPi Dependencies

- Pillow/python-pillow

## Build Dependencies

- gcc

## External Libraries

- libxcursor-dev
- libx11-dev
- libpng-dev (<=1.6)

#### Install Dependencies

##### macOS

```bash
brew install --cask xquartz
brew install libpng gcc
```

##### Debain/ubuntu

```bash
sudo apt install libx11-dev libxcursor-dev libpng-dev
```

##### ArchLinux/Manjaro

```bash
sudo pacman -S libx11 libxcursor libpng
```

##### Fedora/Fedora Silverblue/CentOS/RHEL

```bash
sudo dnf install libx11-devel libxcursor-devel libpng-devel
```

## Examples

Check [**examples**](https://github.com/ful1e5/clickgen/tree/main/examples) directory for building entire theme from `.png` files.

### create a static `XCursor`

```python
from pathlib import Path
from clickgen.builders import XCursor
from clickgen.core import CursorAlias

with CursorAlias.from_bitmap(png="all-scroll.png", hotspot=(5, 2)) as alias:
    x_cfg = alias.create(sizes=[(22, 22),(24, 24)])
    XCursor.create(alias_file=x_cfg, out_dir=Path("."))

```

### create an animated `XCursor`

```python
from pathlib import Path
from clickgen.builders import XCursor
from clickgen.core import CursorAlias

with CursorAlias.from_bitmap(png=["all-scroll-01.png", "all-scroll-02.png"], hotspot=(5, 2)) as alias:
    x_cfg = alias.create(sizes=[(22, 22),(24, 24)])
    XCursor.create(alias_file=x_cfg, out_dir=Path("."))

```

### create a static `Windows Cursor` (.cur)

```python
from pathlib import Path
from clickgen.builders import WindowsCursor
from clickgen.core import CursorAlias

with CursorAlias.from_bitmap(png="all-scroll.png", hotspot=(5, 2)) as alias:
    win_cfg = alias.create(sizes=(24, 24))
    WindowsCursor.create(alias_file=win_cfg, out_dir=Path("."))

```

### create an animated `Windows Cursor` (.ani)

```python
from pathlib import Path
from clickgen.builders import WindowsCursor
from clickgen.core import CursorAlias

with CursorAlias.from_bitmap(png=["all-scroll-01.png", "all-scroll-02.png"], hotspot=(5, 2)) as alias:
    win_cfg = alias.create(sizes=(24, 24))
    WindowsCursor.create(alias_file=win_cfg, out_dir=Path("."))

```


