Metadata-Version: 2.1
Name: rule34Py
Version: 1.4.11
Summary: API wraper for rule34.xxx
Home-page: https://github.com/b3yc0d3/rule34Py
Author: b3yc0d3
Author-email: b3yc0d3@gmail.com
Project-URL: Issue tracker, https://github.com/b3yc0d3/rule34Py/issues
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE.txt

<div align="center">

# rule34py

![GPL-3.0](https://img.shields.io/github/license/b3yc0d3/rule34Py) [![](https://img.shields.io/pypi/v/rule34Py)](https://pypi.org/project/rule34Py/) [![](https://img.shields.io/pypi/dm/rule34py?color=blue)](https://pypi.org/project/rule34Py/)

Python api wrapper for [rule34.xxx](https://rule34.xxx/).
</div>

## Getting Started

#### Install it using pip
```
pip install rule34py
```

#### Install it from Source
```
git clone https://github.com/b3yc0d3/rule34Py.git
cd rule34Py
python setup.py sdist
pip install -e .
```

## Documentation
You can find the documentation [here](https://github.com/b3yc0d3/rule34Py/tree/master/docs).

> [!NOTE]
> The documentation might move in the future.

## Code Snippet
```py
from rule34Py import rule34Py
r34Py = rule34Py()

# get comments of an post
r34Py.get_comments(4153825)

# get post by its id
r34Py.get_post(4153825)

# get top 100 icame
r34Py.icame()

# search for posts by tag(s)
r34Py.search(["neko"], page_id=2, limit=50)

# get pool by id
r34Py.get_pool(17509)

# get a random post (in this case with tag(s))
random = r34Py.random_post(["neko"])

# get general site stats
r34Py.stats.top_taggers()
r34Py.stats.top_commenters()
r34Py.stats.top_forum_posters()
r34Py.stats.top_image_posters()
r34Py.stats.top_note_editors()
r34Py.stats.top_favorites()
```

## Development
Follow these steps to setup everything needed to develop on rule34Py.

Currently this setup guide only shows how it is done on unix-like systems.

### Clone This Repository
```
git clone https://github.com/b3yc0d3/rule34Py.git

cd rule34Py

git checkout develop
```

### Setting Up Virtual Python Environment
```
python -m venv venv

source venv/bin/activate
```

To deactivate the virtual environment type the following in your terminal
```
deactivate
```

### Install and Build rule34Py in the Virtual Environment
```
python3 -m build -s -w -n

pip install -e .
```

### Committing your Changes
- Branch name should be prefixed with
    - `fix-` when fixing an bug/error
    - `feat-` when a feature got added
    - `chore-` everything else that doesn't fall in the above categories
- The title must be descriptive, what your pull request changes/does.
- Write a breve description of what the pull request does/solves in the commit.
- If your pull request fixes an issue, please mention that issue in the commit title.

Example structure of a commit message
```
here goes the title of the commit

Here goes the description
```

The title shall not be longer then 50 characters.
**Select the `develop` branch for pull requests.**
