Commits

Tuk Bredsdorff committed 555657d

Added --verbose flag. Only printing function info if this is set.

Comments (0)

Files changed (1)

Support/moai_helper.py

 	VERSION = '0.1'
 	DESCRIPTION = 'Generates completions in .tmPreferences format for TextMate.'
 	
+	verbose = cli.Flag(['--verbose', '-v'], default=False)
+	
 	def main(self, html_docs_dir):
 		classes_file = 'classes.html'
 		classes_path = '{0}/{1}'.format(html_docs_dir, classes_file)
 		class_names = find_class_names(classes_path)
 		function_info = find_members(functions_path)
 		tmpreferences = generate_tmpreferences(class_names)
+		
 		print tmpreferences
-		from pprint import pprint
-		pprint(function_info)
+		
+		if self.verbose:
+			from pprint import pprint
+			pprint(function_info)
 
 
 if __name__ == '__main__':