<s> import os <EOL> import sys <EOL> import glob <EOL> sys . path . append ( os . path . join ( os . path . split ( __file__ ) [ <NUM_LIT:0> ] , '<STR_LIT:..>' ) ) <EOL> from gluon . html import CODE <EOL> def main ( path ) : <EOL> models = glob . glob ( os . path . join ( path , '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> controllers = glob . glob ( os . path . join ( path , '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> views = glob . glob ( os . path . join ( path , '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> modules = glob . glob ( os . path . join ( path , '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> models . sort ( ) <EOL> controllers . sort ( ) <EOL> views . sort ( ) <EOL> modules . sort ( ) <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> for filename in models : <EOL> print '<STR_LIT>' % filename [ len ( path ) : ] <EOL> print CODE ( open ( filename ) . read ( ) , language = '<STR_LIT>' ) . xml ( ) <EOL> print '<STR_LIT>' <EOL> for filename in views : <EOL> print '<STR_LIT>' % filename [ len ( path ) : ] <EOL> print CODE ( open ( filename ) . read ( ) , language = '<STR_LIT:html>' ) . xml ( ) <EOL> print '<STR_LIT>' <EOL> for filename in controllers : <EOL> print '<STR_LIT>' % filename [ len ( path ) : ] <EOL> print CODE ( open ( filename ) . read ( ) , language = '<STR_LIT>' ) <EOL> views = glob . glob ( os . path . join ( path , '<STR_LIT>' , '<STR_LIT:*>' , '<STR_LIT>' ) ) <EOL> views . sort ( ) <EOL> for filename in views : <EOL> print '<STR_LIT>' % filename [ len ( path ) : ] <EOL> print CODE ( open ( filename ) . read ( ) , language = '<STR_LIT:html>' ) . xml ( ) <EOL> print '<STR_LIT>' <EOL> for filename in modules : <EOL> print '<STR_LIT>' % filename [ len ( path ) : ] <EOL> print CODE ( open ( filename ) . read ( ) , language = '<STR_LIT>' ) . xml ( ) <EOL> print '<STR_LIT>' <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( sys . argv [ <NUM_LIT:1> ] ) </s>
