mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-20 20:09:07 +00:00
#311 Manually convert md to rst
This commit is contained in:
parent
af40ad84d8
commit
dc16600871
@ -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).
|
||||
|
||||

|
||||
[](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`.
|
||||
|
||||
|
@ -4,3 +4,4 @@ pytest-mock
|
||||
wheel
|
||||
setuptools>=17.1
|
||||
pexpect
|
||||
pypandoc
|
||||
|
12
setup.py
12
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user