mirror of https://github.com/scrapy/scrapy.git
move documentation about registering commands via setup.py to commands doc
This commit is contained in:
parent
9ee17fd537
commit
a5a8f82b06
|
|
@ -100,7 +100,7 @@ pygments_style = 'sphinx'
|
|||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
#html_theme = 'sphinx_rtd_theme'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
|
|
|
|||
|
|
@ -15,20 +15,3 @@ it's properly merged) . Use at your own risk.
|
|||
.. warning::
|
||||
|
||||
This documentation is a work in progress. Use at your own risk.
|
||||
|
||||
Add commands using external libraries
|
||||
-------------------------------------
|
||||
|
||||
You can also add Scrapy commands from an external library by adding `scrapy.commands` section into entry_points in the `setup.py`.
|
||||
|
||||
The following example adds `my_command` command::
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
setup(name='scrapy-mymodule',
|
||||
entry_points={
|
||||
'scrapy.commands': [
|
||||
'my_command=my_scrapy_module.commands:MyCommand',
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -511,3 +511,24 @@ Example::
|
|||
COMMANDS_MODULE = 'mybot.commands'
|
||||
|
||||
.. _Deploying your project: http://scrapyd.readthedocs.org/en/latest/deploy.html
|
||||
|
||||
Register commands via setup.py entry points
|
||||
-------------------------------------------
|
||||
|
||||
.. note:: This is an experimental feature, use with caution.
|
||||
|
||||
You can also add Scrapy commands from an external library by adding a
|
||||
``scrapy.commands`` section in the entry points of the library ``setup.py``
|
||||
file.
|
||||
|
||||
The following example adds ``my_command`` command::
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
setup(name='scrapy-mymodule',
|
||||
entry_points={
|
||||
'scrapy.commands': [
|
||||
'my_command=my_scrapy_module.commands:MyCommand',
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue