Skip to content

Commit 3ce6bde

Browse files
authored
Merge pull request e1ven#15 from singingwolfboy/improve-setup-py
Project improvements!
2 parents 87cc1bd + b679800 commit 3ce6bde

File tree

3 files changed

+85
-34
lines changed

3 files changed

+85
-34
lines changed

README.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# RoboHash
2+
3+
The source code for [RoboHash.org](https://robohash.org/).
4+
5+
It basically copy/pastes various robot pictures together, using bits from
6+
the SHA hash. It's not perfect, and not entirely secure, but it gives
7+
a good gut-check to "Hey, this SHA is wrong."
8+
9+
## Install
10+
11+
Just the library:
12+
13+
```bash
14+
$ pip install robohash
15+
```
16+
17+
Or if you also want the web frontend:
18+
19+
```bash
20+
$ pip install robohash[web]
21+
```
22+
23+
## Usage
24+
25+
```python
26+
from robohash import Robohash
27+
28+
hash = "whatever-hash-you-want"
29+
rh = Robohash(hash)
30+
rh.assemble(roboset='any')
31+
with open("path/to/new/file.png", "w") as f:
32+
rh.img.save(f, format="png")
33+
```
34+
35+
## Robosets
36+
37+
RoboHash comes with three image sets, named "set1", "set2", and "set3". Specify
38+
which set you want in the `assemble()` method. Alternatively, specify the string
39+
"any", and RoboHash will pick an image set for you, based on the provided hash.
40+
41+
The "set1" artwork was created by Zikri Kader. The "set2" artwork was created by
42+
Hrvoje Novakovic. The "set3" artwork was created by Julian Peter Arias.
43+
44+
## License
45+
46+
The Python Code is available under the MIT/Expat license. See the `LICENSE.txt`
47+
file for the full text of this license. Copyright (c) 2011, Colin Davis.
48+
49+
The RoboHash images are available under the CC-BY-3.0 license.
50+
51+
## Disclaimer
52+
53+
OK, I'll admit I'm a crappy programmer. Compounding this, I wrote this code
54+
initially to be internal-only. It's ugly, and could be a LOT nicer.
55+
56+
Sorry about that.

README.txt

-23
This file was deleted.

setup.py

+29-11
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,33 @@
44
long_description = file.read()
55

66
setup(
7-
name = 'robohash',
8-
packages = ['robohash'],
9-
version = '1.0',
10-
description = 'One of the leading robot-based hashing tools on the web',
7+
name='robohash',
8+
packages=['robohash'],
9+
version='1.0',
10+
description='One of the leading robot-based hashing tools on the web',
1111
long_description=long_description,
12-
author = 'Colin Davis',
13-
author_email = '[email protected]',
14-
url = 'https://github.com/e1ven/Robohash',
15-
download_url = 'https://github.com/e1ven/Robohash/tarball/1.0',
16-
keywords = ['robots'], # arbitrary keywords
17-
classifiers = [],
18-
)
12+
author='Colin Davis',
13+
author_email='[email protected]',
14+
url='https://github.com/e1ven/Robohash',
15+
download_url='https://github.com/e1ven/Robohash/tarball/1.0',
16+
keywords=['robots'], # arbitrary keywords
17+
license='MIT',
18+
classifiers=[
19+
"License :: OSI Approved :: MIT License",
20+
"Programming Language :: Python :: 2",
21+
"Programming Language :: Python :: 3",
22+
"Topic :: Security",
23+
],
24+
package_data={
25+
'robohash': [
26+
'sets/set1/*/*/*',
27+
'sets/set2/*/*',
28+
'sets/set3/*/*',
29+
'backgrounds/*/*',
30+
]
31+
},
32+
install_requires=['pillow', 'natsort'],
33+
extras_require={
34+
'web': ['tornado'],
35+
},
36+
)

0 commit comments

Comments
 (0)