#NEWLINE# def run( self , args , opts ) : #NEWLINE# #INDENT# if ( len ( args ) != 1 ) : #NEWLINE# #INDENT# raise UsageError ( ) #NEWLINE# #UNINDENT# project_name = args [ 0 ] #NEWLINE# if ( not self . _is_valid_name ( project_name ) ) : #NEWLINE# #INDENT# self . exitcode = 1 #NEWLINE# return #NEWLINE# #UNINDENT# copytree ( self . templates_dir , project_name , ignore = IGNORE ) #NEWLINE# move ( join ( project_name , 'module' ) , join ( project_name , project_name ) ) #NEWLINE# for paths in TEMPLATES_TO_RENDER : #NEWLINE# #INDENT# path = join ( * paths ) #NEWLINE# tplfile = join ( project_name , string . Template ( path ) . substitute ( project_name = project_name ) ) #NEWLINE# render_templatefile ( tplfile , project_name = project_name , ProjectName = string_camelcase ( project_name ) ) #NEWLINE# #UNINDENT# print ( ( 'New Scrapy project %r, using template directory %r, created in:' % ( project_name , self . templates_dir ) ) ) #NEWLINE# print ( ( '    %s\n' % abspath ( project_name ) ) ) #NEWLINE# print ( 'You can start your first spider with:' ) #NEWLINE# print ( ( '    cd %s' % project_name ) ) #NEWLINE# print ( '    scrapy genspider example example.com' )