Initial commit.. covfefe 0.1a0
7 files changed, 188 insertions(+), 0 deletions(-)

A => .hgignore
A => BSD-LICENSE
A => README.rst
A => covfefe/__init__.py
A => covfefe/covfefe.py
A => setup.py
A => tests.py
A => .hgignore +11 -0
@@ 0,0 1,11 @@ 
+syntax:glob
+.svn
+.hgsvn
+.*.swp
+**.pyc
+*.*~
+.coverage
+.coveragerc
+dist/
+*.egg-info/
+*.egg

          
A => BSD-LICENSE +29 -0
@@ 0,0 1,29 @@ 
+BSD 3-Clause License
+
+Copyright (c) 2017, Peter Sanchez <petersanchez@gmail.com>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

          
A => README.rst +58 -0
@@ 0,0 1,58 @@ 
+==============================
+covfefe
+==============================
+:Info: Simple module to convert content to "covfefe" quality
+:Version: 0.1a0
+:Author: Peter Sanchez (http://www.petersanchez.com)
+
+Credit
+============
+
+Now any Python developer can take their content and improve it to "covfefe" quality with ease.
+
+`End tweets with style <https://archive.is/f7UL3>`_
+
+`It's a framework <https://twitter.com/OngEmil/status/869779870682935296>`_
+
+Nod to Kyle Kelley for his JS library - https://github.com/rgbkrk/covfefe
+
+Installation
+============
+
+PIP::
+
+    pip install pycovfefe
+
+Basic Manual Install::
+
+    $ python setup.py build
+    $ sudo python setup.py install
+
+
+Usage
+=====
+
+Usage -- Python ::
+
+   >>> from confefe import convert
+   >>> convert('Despite the constant negative press')
+   u'Despite the constant negative press covfefe'
+
+Usage -- CLI ::
+
+   $ covfefe Despite the constant negative press
+   Despite the constant negative press covfefe
+
+Testing
+=======
+
+To test the library run ::
+
+    $ python tests.py
+
+Copyright & Warranty
+====================
+All documentation, libraries, and sample code are
+Copyright 2017 Peter Sanchez <petersanchez@gmail.com>. The library
+and sample code are made available to you under the terms of the BSD license
+which is contained in the included file, BSD-LICENSE.

          
A => covfefe/__init__.py +28 -0
@@ 0,0 1,28 @@ 
+# -*- coding: utf-8 -*-
+from .covfefe import convert
+
+VERSION = (0, 1, 0, 'alpha', 0)
+
+
+def get_version():
+    "Returns a PEP 386-compliant version number from VERSION."
+    assert len(VERSION) == 5
+    assert VERSION[3] in ('alpha', 'beta', 'rc', 'final')
+
+    # Now build the two parts of the version number:
+    # main = X.Y[.Z]
+    # sub = .devN - for pre-alpha releases
+    #     | {a|b|c}N - for alpha, beta and rc releases
+
+    parts = 2 if VERSION[2] == 0 else 3
+    main = '.'.join(str(x) for x in VERSION[:parts])
+
+    sub = ''
+    if VERSION[3] != 'final':
+        mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
+        sub = mapping[VERSION[3]] + str(VERSION[4])
+
+    return str(main + sub)
+
+
+__all__ = ['VERSION', 'convert', 'get_version']

          
A => covfefe/covfefe.py +13 -0
@@ 0,0 1,13 @@ 
+import os
+import sys
+
+
+def convert(value):
+    return u'{0} covfefe'.format(value)
+
+
+def main():
+    if len(sys.argv) > 1:
+        print(convert(' '.join(sys.argv[1:])))
+    else:
+        print('Usage: covfefe <message you want to use>')

          
A => setup.py +35 -0
@@ 0,0 1,35 @@ 
+import os
+from setuptools import setup, find_packages
+
+
+if os.path.exists('README.rst'):
+    long_description = open('README.rst', 'r').read()
+else:
+    long_description = 'See https://bitbucket.org/petersanchez/pycovfefe/'
+
+
+setup(
+    name='pycovfefe',
+    version=__import__('covfefe').get_version(),
+    packages=find_packages(),
+    description='Python Interface for covfefe caliber content generation.',
+    author='Peter Sanchez',
+    author_email='petersanchez@gmail.com',
+    url='https://bitbucket.org/petersanchez/pycovfefe/',
+    long_description=long_description,
+    platforms=['any'],
+    entry_points={
+        'console_scripts': [
+            'covfefe = covfefe.covfefe:main',
+        ],
+    },
+    classifiers=[
+        'Development Status :: 4 - Beta',
+        'Intended Audience :: Developers',
+        'Natural Language :: English',
+        'Operating System :: OS Independent',
+        'Programming Language :: Python',
+        'Programming Language :: Python :: 2.7',
+    ],
+    include_package_data=True,
+)

          
A => tests.py +14 -0
@@ 0,0 1,14 @@ 
+import unittest
+from covfefe import convert
+
+
+class CovfefeTest(unittest.TestCase):
+    def test_convert(self):
+        self.assertEqual(
+            convert(u'Despite the constant negative press'),
+            u'Despite the constant negative press covfefe',
+        )
+
+
+if __name__ == '__main__':
+    unittest.main()