<s> """<STR_LIT>""" <EOL> from __future__ import print_function <EOL> from jinja2 import Template <EOL> import os <EOL> from colorama import init , Fore , Back <EOL> import scrapple <EOL> from scrapple . commands import command <EOL> class GenconfigCommand ( command . Command ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , args ) : <EOL> super ( GenconfigCommand , self ) . __init__ ( args ) <EOL> init ( ) <EOL> def execute_command ( self ) : <EOL> """<STR_LIT>""" <EOL> print ( Back . GREEN + Fore . BLACK + "<STR_LIT>" ) <EOL> print ( Back . RESET + Fore . RESET ) <EOL> directory = os . path . join ( scrapple . __path__ [ <NUM_LIT:0> ] , '<STR_LIT>' , '<STR_LIT>' ) <EOL> with open ( os . path . join ( directory , self . args [ '<STR_LIT>' ] + '<STR_LIT>' ) , '<STR_LIT:r>' ) as f : <EOL> template_content = f . read ( ) <EOL> print ( "<STR_LIT>" , self . args [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> template = Template ( template_content ) <EOL> settings = { <EOL> '<STR_LIT>' : self . args [ '<STR_LIT>' ] , <EOL> '<STR_LIT>' : self . args [ '<STR_LIT>' ] , <EOL> '<STR_LIT:url>' : self . args [ '<STR_LIT>' ] , <EOL> '<STR_LIT>' : int ( self . args [ '<STR_LIT>' ] ) <EOL> } <EOL> rendered = template . render ( settings = settings ) <EOL> with open ( self . args [ '<STR_LIT>' ] + '<STR_LIT>' , '<STR_LIT:w>' ) as f : <EOL> f . write ( rendered ) <EOL> print ( Back . WHITE + Fore . RED + self . args [ '<STR_LIT>' ] , "<STR_LIT>" + Back . RESET + Fore . RESET , sep = "<STR_LIT>" ) </s>
