mirror of https://github.com/scrapy/scrapy.git
make 'basic' the default template spider in genspider, and added info with next steps to startproject. closes #488
This commit is contained in:
parent
c928eef585
commit
e31fb49320
|
|
@ -40,7 +40,7 @@ class Command(ScrapyCommand):
|
|||
help="Edit spider after creating it")
|
||||
parser.add_option("-d", "--dump", dest="dump", metavar="TEMPLATE",
|
||||
help="Dump template to standard output")
|
||||
parser.add_option("-t", "--template", dest="template", default="crawl",
|
||||
parser.add_option("-t", "--template", dest="template", default="basic",
|
||||
help="Uses a custom template.")
|
||||
parser.add_option("--force", dest="force", action="store_true",
|
||||
help="If the spider already exists, overwrite it with the template")
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import sys
|
|||
import string
|
||||
import re
|
||||
import shutil
|
||||
from os.path import join, exists
|
||||
from os.path import join, exists, abspath
|
||||
from shutil import copytree, ignore_patterns
|
||||
|
||||
import scrapy
|
||||
|
|
@ -53,3 +53,8 @@ class Command(ScrapyCommand):
|
|||
string.Template(path).substitute(project_name=project_name))
|
||||
render_templatefile(tplfile, project_name=project_name,
|
||||
ProjectName=string_camelcase(project_name))
|
||||
print("New Scrapy project %r created in:" % project_name)
|
||||
print(" %s\n" % abspath(project_name))
|
||||
print("You can start your first spider with:")
|
||||
print(" cd %s" % project_name)
|
||||
print(" scrapy genspider example example.com")
|
||||
|
|
|
|||
Loading…
Reference in New Issue