<s> import os <EOL> _assets = { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : "<STR_LIT>" <EOL> } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : "<STR_LIT>" <EOL> } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : "<STR_LIT>" <EOL> } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : "<STR_LIT>" <EOL> } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : '<STR_LIT>' <EOL> } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : "<STR_LIT>" <EOL> } , <EOL> "<STR_LIT>" : "<STR_LIT>" <EOL> } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : "<STR_LIT>" <EOL> } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : "<STR_LIT>" <EOL> } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : "<STR_LIT>" <EOL> } , <EOL> "<STR_LIT>" : "<STR_LIT>" <EOL> } <EOL> } <EOL> } <EOL> def _touch ( fname ) : <EOL> try : <EOL> os . utime ( fname , None ) <EOL> except Exception : <EOL> open ( fname , '<STR_LIT:a>' ) . close ( ) <EOL> def _build ( assets , pwd ) : <EOL> for child in assets : <EOL> if type ( assets [ child ] ) is str : <EOL> _touch ( pwd + os . sep + assets [ child ] ) <EOL> else : <EOL> if not os . path . exists ( child ) : <EOL> os . makedirs ( pwd + os . sep + child ) <EOL> _build ( assets [ child ] , pwd + os . sep + child ) <EOL> def generate_assets ( directory , app_name = None ) : <EOL> if not os . path . exists ( os . path . join ( directory , '<STR_LIT>' ) ) : <EOL> os . makedirs ( os . path . join ( directory , '<STR_LIT>' ) ) <EOL> _build ( _assets , os . path . join ( directory , '<STR_LIT>' ) ) <EOL> if not app_name : <EOL> app_name = raw_input ( "<STR_LIT>" ) <EOL> with open ( os . path . join ( directory , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , '<STR_LIT:w>' ) as app : <EOL> app . write ( '<STR_LIT>' % app_name ) <EOL> with open ( os . path . join ( directory , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , '<STR_LIT:w>' ) as styles : <EOL> styles . write ( '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT:\n>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT:\n>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) </s>
