mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-30 22:54:14 +00:00 
			
		
		
		
	#311 Manually convert md to rst
This commit is contained in:
		| @@ -4,7 +4,7 @@ Magnificent app which corrects your previous console command, | |||||||
| inspired by a [@liamosaur](https://twitter.com/liamosaur/) | inspired by a [@liamosaur](https://twitter.com/liamosaur/) | ||||||
| [tweet](https://twitter.com/liamosaur/status/506975850596536320). | [tweet](https://twitter.com/liamosaur/status/506975850596536320). | ||||||
|  |  | ||||||
|  | [](https://raw.githubusercontent.com/nvbn/thefuck/master/example.gif) | ||||||
|  |  | ||||||
| Few more examples: | 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` | For adding your own rule you should create `your-rule-name.py` | ||||||
| in `~/.thefuck/rules`. The rule should contain two functions: | in `~/.thefuck/rules`. The rule should contain two functions: | ||||||
|  |  | ||||||
| ```python | ```python | ||||||
| match(command: Command, settings: Settings) -> bool | match(command: Command, settings: Settings) -> bool | ||||||
| get_new_command(command: Command, settings: Settings) -> str | get_new_command(command: Command, settings: Settings) -> str | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| Also the rule can contain an optional function | Also the rule can contain an optional function `side_effect(command: Command, settings: Settings) -> None` | ||||||
| `side_effect(command: Command, settings: Settings) -> None` and | and optional `enabled_by_default`, `requires_output` and `priority` variables. | ||||||
| optional `enabled_by_default`, `requires_output` and `priority` variables. |  | ||||||
|  |  | ||||||
| `Command` has three attributes: `script`, `stdout` and `stderr`. | `Command` has three attributes: `script`, `stdout` and `stderr`. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -4,3 +4,4 @@ pytest-mock | |||||||
| wheel | wheel | ||||||
| setuptools>=17.1 | setuptools>=17.1 | ||||||
| pexpect | pexpect | ||||||
|  | pypandoc | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								setup.py
									
									
									
									
									
								
							| @@ -2,6 +2,13 @@ | |||||||
| from setuptools import setup, find_packages | from setuptools import setup, find_packages | ||||||
| import sys | import sys | ||||||
|  |  | ||||||
|  | try: | ||||||
|  |     import pypandoc | ||||||
|  |  | ||||||
|  |     long_description = pypandoc.convert('README.md', 'rst') | ||||||
|  | except: | ||||||
|  |     long_description = open('README.md').read() | ||||||
|  |  | ||||||
| version = sys.version_info[:2] | version = sys.version_info[:2] | ||||||
| if version < (2, 7): | if version < (2, 7): | ||||||
|     print('thefuck requires Python version 2.7 or later' + |     print('thefuck requires Python version 2.7 or later' + | ||||||
| @@ -12,7 +19,7 @@ elif (3, 0) < version < (3, 3): | |||||||
|           ' ({}.{} detected).'.format(*version)) |           ' ({}.{} detected).'.format(*version)) | ||||||
|     sys.exit(-1) |     sys.exit(-1) | ||||||
|  |  | ||||||
| VERSION = '2.5' | VERSION = '2.5.4' | ||||||
|  |  | ||||||
| install_requires = ['psutil', 'colorama', 'six'] | install_requires = ['psutil', 'colorama', 'six'] | ||||||
| extras_require = {':python_version<"3.4"': ['pathlib']} | extras_require = {':python_version<"3.4"': ['pathlib']} | ||||||
| @@ -20,14 +27,13 @@ extras_require = {':python_version<"3.4"': ['pathlib']} | |||||||
| setup(name='thefuck', | setup(name='thefuck', | ||||||
|       version=VERSION, |       version=VERSION, | ||||||
|       description="Magnificent app which corrects your previous console command", |       description="Magnificent app which corrects your previous console command", | ||||||
|  |       long_description=long_description, | ||||||
|       author='Vladimir Iakovlev', |       author='Vladimir Iakovlev', | ||||||
|       author_email='nvbn.rm@gmail.com', |       author_email='nvbn.rm@gmail.com', | ||||||
|       url='https://github.com/nvbn/thefuck', |       url='https://github.com/nvbn/thefuck', | ||||||
|       license='MIT', |       license='MIT', | ||||||
|       packages=find_packages(exclude=['ez_setup', 'examples', |       packages=find_packages(exclude=['ez_setup', 'examples', | ||||||
|                                       'tests', 'release']), |                                       'tests', 'release']), | ||||||
|       setup_requires=['setuptools-markdown'], |  | ||||||
|       long_description_markdown_filename='README.md', |  | ||||||
|       include_package_data=True, |       include_package_data=True, | ||||||
|       zip_safe=False, |       zip_safe=False, | ||||||
|       install_requires=install_requires, |       install_requires=install_requires, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user