def scan(self):
log.info('Cronos extract: %s', self.path_name)
target_dir = os.environ.get('CRONOS_OUTDIR')
if target_dir is None:
log.warning('No CRONOS_OUTDIR is set.')
return
sub_dir = slugify(unidecode(self.path_name), '_')
target_dir = os.path.join(target_dir, sub_dir)
try:
os.makedirs(target_dir)
except:
pass
try:
parse(self.real_path, target_dir)
except Exception as ex:
log.exception(ex)
评论列表
文章目录