From d76ffc37521633789ce297a12c09a197cdff9099 Mon Sep 17 00:00:00 2001 From: Robohash <401330+e1ven@users.noreply.github.com> Date: Thu, 13 Jul 2017 13:49:58 -0400 Subject: [PATCH] Update packaging information --- README.md | 56 --------------------------------------------- README.rst | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 2 +- setup.py | 9 +++++--- 4 files changed, 74 insertions(+), 60 deletions(-) delete mode 100644 README.md create mode 100644 README.rst diff --git a/README.md b/README.md deleted file mode 100644 index 3655df9..0000000 --- a/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# 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. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..125e90b --- /dev/null +++ b/README.rst @@ -0,0 +1,67 @@ +RoboHash +======== + +The source code for `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: + +.. code:: bash + + $ pip install robohash + +Or if you also want the web frontend: + +.. code:: bash + + $ pip install robohash[web] + +Usage +----- + +.. code:: 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. + +.. _RoboHash.org: https://robohash.org/ diff --git a/setup.cfg b/setup.cfg index 578ede1..5aef279 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,2 @@ [metadata] -description-file = README +description-file = README.rst diff --git a/setup.py b/setup.py index 9fbad9b..5026412 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,9 @@ -from distutils.core import setup +try: + from setuptools import setup +except ImportError: + from distutils.core import setup -with open('README.txt') as file: +with open('README.rst') as file: long_description = file.read() setup( @@ -10,7 +13,7 @@ setup( description='One of the leading robot-based hashing tools on the web', long_description=long_description, author='Colin Davis', - author_email='cdavis@tavern.is', + author_email='colin@robohash.org', url='https://github.com/e1ven/Robohash', download_url='https://github.com/e1ven/Robohash/tarball/1.0', keywords=['robots'], # arbitrary keywords