def resources(self): resources = [] for file_path in utils.find_by_mask(self.FILE_MASK): res = utils.yaml_load(file_path) res['parent_path'] = file_path resources.append(res) return resources
def _get_resources_list(): result = [] for path in utils.find_by_mask(utils.read_config()['resources-files-mask']): resource = utils.yaml_load(path) resource['path'] = path resource['dir_path'] = os.path.dirname(path) result.append(resource) return result
def compile_all(): from solar.core.resource import compiler destination_path = utils.read_config()['resources-compiled-file'] if os.path.exists(destination_path): os.remove(destination_path) for path in utils.find_by_mask(utils.read_config()['resources-files-mask']): meta = utils.yaml_load(path) meta['base_path'] = os.path.dirname(path) compiler.compile(meta)
def compile_all(): from solar.core.resource import compiler destination_path = utils.read_config()['resources-compiled-file'] if os.path.exists(destination_path): os.remove(destination_path) for path in utils.find_by_mask( utils.read_config()['resources-files-mask']): meta = utils.yaml_load(path) meta['base_path'] = os.path.dirname(path) compiler.compile(meta)