def handle(self, options, global_options, *args): from uliweb.utils.common import copy_dir_with_check self.get_application(global_options) if not args: print >> sys.stderr, "Error: outputdir should be a directory and existed" sys.exit(0) else: outputdir = os.path.abspath(args[0]) if global_options.verbose: print "Export direcotry is %s ..." % outputdir if not args[1:]: apps = self.get_apps(global_options) else: apps = args[1:] dirs = [ os.path.join(SimpleFrame.get_app_dir(appname), 'static') for appname in apps ] self.options = options self.global_options = global_options copy_dir_with_check(dirs, outputdir, False, options.check, processor=self.process_file) self.process_combine(outputdir, global_options.verbose)
def handle(self, options, global_options, *args): from uliweb.utils.common import copy_dir_with_check if not args: print >>sys.stderr, "Error: outputdir should be a directory and existed" sys.exit(0) else: outputdir = args[0] application = SimpleFrame.Dispatcher(project_dir=global_options.project, start=False) apps = application.apps dirs = [os.path.join(SimpleFrame.get_app_dir(appname), 'static') for appname in apps] self.options = options self.global_options = global_options copy_dir_with_check(dirs, outputdir, global_options.verbose, options.check, processor=self.process_file)
def handle(self, options, global_options, *args): from uliweb.utils.common import copy_dir_with_check from uliweb import get_apps if not args: print >>sys.stderr, "Error: outputdir should be a directory and existed" sys.exit(0) else: outputdir = args[0] apps = get_apps(global_options.apps_dir, settings_file=global_options.settings, local_settings_file=global_options.local_settings) dirs = [os.path.join(SimpleFrame.get_app_dir(appname), 'static') for appname in reversed(apps)] self.options = options self.global_options = global_options copy_dir_with_check(dirs, outputdir, False, options.check, processor=self.process_file)
def handle(self, options, global_options, *args): from uliweb.utils.common import copy_dir_with_check if not args: print >> sys.stderr, "Error: outputdir should be a directory and existed" sys.exit(0) else: outputdir = args[0] if not args[1:]: apps = self.get_apps(global_options) else: apps = args[1:] dirs = [os.path.join(SimpleFrame.get_app_dir(appname), "static") for appname in apps] self.options = options self.global_options = global_options copy_dir_with_check(dirs, outputdir, False, options.check, processor=self.process_file)
def handle(self, options, global_options, *args): from uliweb.utils.common import copy_dir_with_check self.get_application(global_options) if not args: print >>sys.stderr, "Error: outputdir should be a directory and existed" sys.exit(0) else: outputdir = os.path.abspath(args[0]) if global_options.verbose: print "Export direcotry is %s ..." % outputdir if not args[1:]: apps = self.get_apps(global_options) else: apps = args[1:] dirs = [os.path.join(SimpleFrame.get_app_dir(appname), 'static') for appname in apps] self.options = options self.global_options = global_options copy_dir_with_check(dirs, outputdir, False, options.check, processor=self.process_file) self.process_combine(outputdir, global_options.verbose)