diff --git a/README.md b/README.md index d741331..5a453a2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Magnificent app which corrects your previous console command, inspired by a [@liamosaur](https://twitter.com/liamosaur/) [tweet](https://twitter.com/liamosaur/status/506975850596536320). -![gif with examples](https://raw.githubusercontent.com/nvbn/thefuck/master/example.gif) +[![gif with examples](https://raw.githubusercontent.com/nvbn/thefuck/master/example.gif)](https://raw.githubusercontent.com/nvbn/thefuck/master/example.gif) Few more examples: @@ -208,14 +208,14 @@ Bundled, but not enabled by default: For adding your own rule you should create `your-rule-name.py` in `~/.thefuck/rules`. The rule should contain two functions: + ```python match(command: Command, settings: Settings) -> bool get_new_command(command: Command, settings: Settings) -> str ``` -Also the rule can contain an optional function -`side_effect(command: Command, settings: Settings) -> None` and -optional `enabled_by_default`, `requires_output` and `priority` variables. +Also the rule can contain an optional function `side_effect(command: Command, settings: Settings) -> None` +and optional `enabled_by_default`, `requires_output` and `priority` variables. `Command` has three attributes: `script`, `stdout` and `stderr`. diff --git a/requirements.txt b/requirements.txt index 40ce716..92ed391 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ pytest-mock wheel setuptools>=17.1 pexpect +pypandoc diff --git a/setup.py b/setup.py index 6a01853..92a2d97 100755 --- a/setup.py +++ b/setup.py @@ -2,6 +2,13 @@ from setuptools import setup, find_packages import sys +try: + import pypandoc + + long_description = pypandoc.convert('README.md', 'rst') +except: + long_description = open('README.md').read() + version = sys.version_info[:2] if version < (2, 7): print('thefuck requires Python version 2.7 or later' + @@ -12,7 +19,7 @@ elif (3, 0) < version < (3, 3): ' ({}.{} detected).'.format(*version)) sys.exit(-1) -VERSION = '2.5' +VERSION = '2.5.4' install_requires = ['psutil', 'colorama', 'six'] extras_require = {':python_version<"3.4"': ['pathlib']} @@ -20,14 +27,13 @@ extras_require = {':python_version<"3.4"': ['pathlib']} setup(name='thefuck', version=VERSION, description="Magnificent app which corrects your previous console command", + long_description=long_description, author='Vladimir Iakovlev', author_email='nvbn.rm@gmail.com', url='https://github.com/nvbn/thefuck', license='MIT', packages=find_packages(exclude=['ez_setup', 'examples', 'tests', 'release']), - setup_requires=['setuptools-markdown'], - long_description_markdown_filename='README.md', include_package_data=True, zip_safe=False, install_requires=install_requires,