#NEWLINE# def load_pages( self , dir , ignore = [ ] , create_only = [ ] , replace = False ) : #NEWLINE# #INDENT# with self . env . db_transaction : #NEWLINE# #INDENT# for page in os . listdir ( dir ) : #NEWLINE# #INDENT# if ( page in ignore ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# filename = os . path . join ( dir , filename ) #NEWLINE# page = unicode_unquote ( page . encode ( 'utf-8' ) ) #NEWLINE# if os . path . isfile ( filename ) : #NEWLINE# #INDENT# if self . import_page ( filename , page , create_only , replace ) : #NEWLINE# #INDENT# printout ( _ ( '  %(page)s imported from %(filename)s' , filename = path_to_unicode ( filename ) , page = page ) )