Merge pull request #15 from singingwolfboy/improve-setup-py

Project improvements!
This commit is contained in:
Robohash 2017-04-05 09:24:12 -04:00 committed by GitHub
commit d56f52a958
3 changed files with 85 additions and 34 deletions

56
README.md Normal file
View File

@ -0,0 +1,56 @@
# RoboHash
The source code for [RoboHash.org](https://robohash.org/).
It basically copy/pastes various robot pictures together, using bits from
the SHA hash. It's not perfect, and not entirely secure, but it gives
a good gut-check to "Hey, this SHA is wrong."
## Install
Just the library:
```bash
$ pip install robohash
```
Or if you also want the web frontend:
```bash
$ pip install robohash[web]
```
## Usage
```python
from robohash import Robohash
hash = "whatever-hash-you-want"
rh = Robohash(hash)
rh.assemble(roboset='any')
with open("path/to/new/file.png", "w") as f:
rh.img.save(f, format="png")
```
## Robosets
RoboHash comes with three image sets, named "set1", "set2", and "set3". Specify
which set you want in the `assemble()` method. Alternatively, specify the string
"any", and RoboHash will pick an image set for you, based on the provided hash.
The "set1" artwork was created by Zikri Kader. The "set2" artwork was created by
Hrvoje Novakovic. The "set3" artwork was created by Julian Peter Arias.
## License
The Python Code is available under the MIT/Expat license. See the `LICENSE.txt`
file for the full text of this license. Copyright (c) 2011, Colin Davis.
The RoboHash images are available under the CC-BY-3.0 license.
## Disclaimer
OK, I'll admit I'm a crappy programmer. Compounding this, I wrote this code
initially to be internal-only. It's ugly, and could be a LOT nicer.
Sorry about that.

View File

@ -1,23 +0,0 @@
RoboHash, the source code for the site RoboHash.org
OK, I'll admit I'm a crappy programmer.
Compounding this, I wrote this code initially to be internal-only. It's ugly, and could be a LOT nicer.
Sorry about that.
What it basically does is copy/paste the various robot pictures, using bits from the SHA hash.
It's not perfect, and not entirely secure, but it gives a good gut-check to "Hey, this sha is wrong"
The RoboHash images are available under the CC-BY-3.0 license.
Set 1 artwork created by Zikri Kader
Set 2 artwork created by Hrvoje Novakovic.
Set 3 artwork created by Julian Peter Arias.
The Python Code is available under the MIT/Expat license
Copyright (c) 2011, Colin Davis
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -4,15 +4,33 @@ with open('README.txt') as file:
long_description = file.read()
setup(
name = 'robohash',
packages = ['robohash'],
version = '1.0',
description = 'One of the leading robot-based hashing tools on the web',
name='robohash',
packages=['robohash'],
version='1.0',
description='One of the leading robot-based hashing tools on the web',
long_description=long_description,
author = 'Colin Davis',
author_email = 'cdavis@tavern.is',
url = 'https://github.com/e1ven/Robohash',
download_url = 'https://github.com/e1ven/Robohash/tarball/1.0',
keywords = ['robots'], # arbitrary keywords
classifiers = [],
)
author='Colin Davis',
author_email='cdavis@tavern.is',
url='https://github.com/e1ven/Robohash',
download_url='https://github.com/e1ven/Robohash/tarball/1.0',
keywords=['robots'], # arbitrary keywords
license='MIT',
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Topic :: Security",
],
package_data={
'robohash': [
'sets/set1/*/*/*',
'sets/set2/*/*',
'sets/set3/*/*',
'backgrounds/*/*',
]
},
install_requires=['pillow', 'natsort'],
extras_require={
'web': ['tornado'],
},
)