Skip to content

Commit

Permalink
Update README.md and README.rst
Browse files Browse the repository at this point in the history
Update README.md and README.rst (Description, examples, badges,
installation process etc). Also updated setup.cfg for build wheels.
  • Loading branch information
LuqueDaniel committed Dec 7, 2016
1 parent a3d1655 commit 462b72c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 40 deletions.
68 changes: 41 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,83 @@
# Pybooru - Library for Danbooru/Moebooru API.
[![Build Status](https://travis-ci.org/LuqueDaniel/pybooru.svg?branch=master)](https://travis-ci.org/LuqueDaniel/pybooru)
# Pybooru - Package for Danbooru/Moebooru API.
[![Build Status](https://travis-ci.org/LuqueDaniel/pybooru.svg?branch=master)](https://travis-ci.org/LuqueDaniel/pybooru) [![PyPI](https://img.shields.io/pypi/status/Pybooru.svg?style=flat-square)](https://pypi.python.org/pypi/Pybooru/) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/LuqueDaniel/pybooru/master/LICENSE)

**Pybooru** is a Python library to access API of Danbooru/Moebooru based sites.
**Pybooru** is a Python package to access to the API of Danbooru/Moebooru based sites.

- Version: **3.0.1**
- Version: **4.0.0**
- Licensed under: **MIT License**

## Dependencies.
- Python: >= 2.6 or Python: >= 3.3
- [requests.](http://docs.python-requests.org/en/latest/)
- [requests](http://docs.python-requests.org/en/latest/)

## Installation
### from Python Package Index (Pypi)
Pypi - Python Package Index:
[Pybooru on Pypi.](https://pypi.python.org/pypi/Pybooru/)

```bash
sudo pip install Pybooru
```
or
```bash
sudo easy_install Pybooru
pip install --user Pybooru
```

### Manual installation
```bash
git clone git://github.com/luquedaniel/pybooru.git
cd pybooru
pip install --user -r requirements.txt
sudo python setup.py build
sudo python setup.py install
python setup.py install
```

## Examples of use
```python
from pybooru import Pybooru
See [More examples.](https://github.com/LuqueDaniel/pybooru/tree/master/examples)

client = Pybooru('Konachan')
### Danbooru
```python
from pybooru import Danbooru

artists = client.artists('ma')
client = Danbooru('danbooru')
artists = client.artist_list('ma')

for artist in artists:
print("Name: {0}".format(artist['name']))
```

### Login example
#### Default sites
#### Login example
```python
from pybooru import Pybooru
from pybooru import Danbooru

client = Pybooru('Konachan', username='your-username', password='your-password')

client.comments_create(post_id=id, comment_body='Comment content')
client = Danbooru('danbooru', username='your-username', api_key='your-apikey')
client.comment_create(post_id=id, body='Comment content')
```

#### Other sites
### Moebooru
```python
from pybooru import Pybooru
from pybooru import Moebooru

client = Moebooru('konachan')
artists = client.artist_list(name='neko')

for artist in artists:
print("Name: {0}".format(artist['name']))
```

client = Pybooru('konachan.com', username='your-username', password='your-password',
hashString='So-I-Heard-You-Like-Mupkids-?--{0}--')
#### Login example
##### Default sites
```python
from pybooru import Moebooru

client.comments_create(post_id=id, comment_body='Comment content')
client = Moebooru('konachan', username='your-username', password='your-password')
client.comment_create(post_id=id, comment_body='Comment content')
```

[More examples.](https://github.com/LuqueDaniel/pybooru/tree/master/examples)
##### Not default sites
```python
from pybooru import Moebooru

client = Moebooru('konachan.com', username='your-username', password='your-password',
hash_string='So-I-Heard-You-Like-Mupkids-?--{0}--')
client.comment_create(post_id=id, comment_body='Comment content')
```

## CI Report
- https://travis-ci.org/LuqueDaniel/pybooru
Expand Down
23 changes: 11 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
Pybooru - Library for Danbooru/Moebooru API.
Pybooru - Package for Danbooru/Moebooru API.
============================================
.. image:: https://travis-ci.org/LuqueDaniel/pybooru.svg?branch=master
:target: https://travis-ci.org/LuqueDaniel/pybooru

Pybooru is a Python library to access API of Danbooru/Moebooru based sites.
.. image:: https://img.shields.io/pypi/v/Pybooru.svg?style=flat-square :target:
.. image:: https://img.shields.io/pypi/status/Pybooru.svg?style=flat-square :target:
.. image:: https://img.shields.io/pypi/l/Pybooru.svg?style=flat-square :target: https://raw.githubusercontent.com/LuqueDaniel/pybooru/master/LICENSE
.. image:: https://img.shields.io/pypi/wheel/Pybooru.svg?style=flat-square :target:
.. image:: https://img.shields.io/pypi/format/Pybooru.svg?style=flat-square :target:

Licensed under: **MIT License**.

Examples of use
---------------
.. code-block:: python
from pybooru import Danbooru
from pybooru import Pybooru
client = Pybooru('Konachan')
artists = client.artists('ma')
client = Danbooru('danbooru')
artists = client.artist_list('ma')
for artist in artists:
print("Name: {0}".format(artist['name']))
..
..
See more examples: https://github.com/LuqueDaniel/pybooru/tree/develop/examples
See more examples of Danbooru and Moebooru: https://github.com/LuqueDaniel/pybooru/tree/develop/examples

Changelog
---------
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[wheel]
[bdist_wheel]
universal = 1

0 comments on commit 462b72c

Please sign in to comment.