def load_and_save(src_path, out_path=None, use_cache=True): mkdir_if_not(out_path) data = load(src_path, use_cache) data.save(join(src_path, '_cache.json')) copy_images(data, join(out_path, cfg.img_dir)) data.remove_keys_startswith('_') data.save(join(out_path, cfg.sturct_filename), 'var full_data= ')
def get(self): self.set_header('Content-Type', 'application/json') self.write(dumps(load(cfg.img_dir, True)))
def render_POST(self, request): tmpl = loader.load('index.html') self.log.setLevel( getattr(logging, str(request.args["logLevel"][0]).upper()) ); stream = tmpl.generate(log=self.log.currentLog, counts=self.counter.getCounts(), currentLevel=logging.getLevelName(self.log.level)) return stream.render('html', doctype='html').encode('utf-8')
def render_GET(self, request): tmpl = loader.load('config.html') stream = tmpl.generate(config=_config) return stream.render('html', doctype='html').encode('utf-8')
def render_GET(self, request): tmpl = loader.load('index.html') stream = tmpl.generate(log=self.log.currentLog, counts=self.counter.getCounts(), currentLevel=logging.getLevelName(self.log.level)) return stream.render('html', doctype='html').encode('utf-8')