1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-24 18:04:15 +00:00

Made command-line too output more concise

This commit is contained in:
Pablo Hoffman 2010-08-21 03:37:59 -03:00
parent 0d9e75c684
commit 0da6132136
2 changed files with 10 additions and 21 deletions

View File

@ -19,18 +19,12 @@ some usage help and the available commands::
Scrapy X.Y - no active project
Usage
=====
To run a command:
Usage:
scrapy <command> [options] [args]
To get help:
scrapy <command> -h
Available commands
==================
Available commands:
crawl Start crawling a spider or URL
fetch Fetch a URL using the Scrapy downloader
[...]
The first line will print the currently active project, if you're inside a
@ -39,8 +33,8 @@ a project it would have printed something like this::
Scrapy X.Y - project: myproject
Usage
=====
Usage:
scrapy <command> [options] [args]
[...]

View File

@ -48,20 +48,15 @@ def _print_usage(inside_project):
settings['BOT_NAME'])
else:
print "Scrapy %s - no active project\n" % scrapy.__version__
print "Usage"
print "=====\n"
print "To run a command:"
print "Usage:"
print " scrapy <command> [options] [args]\n"
print "To get help:"
print " scrapy <command> -h\n"
print "Available commands"
print "==================\n"
print "Available commands:"
cmds = _get_commands_dict()
for cmdname, cmdclass in sorted(cmds.iteritems()):
if inside_project or not cmdclass.requires_project:
print "%s %s" % (cmdname, cmdclass.syntax())
print " %s" % cmdclass.short_desc()
print " %-13s %s" % (cmdname, cmdclass.short_desc())
print
print 'Use "scrapy <command> -h" for more info about a command'
def check_deprecated_scrapy_ctl(argv):
"""Check if Scrapy was called using the deprecated scrapy-ctl command and