From 921ba0e5ff42894b1581d3a6b27981d9380ee440 Mon Sep 17 00:00:00 2001 From: lichaojun Date: Tue, 15 Oct 2024 23:05:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/index.js | 2 +- py-src/config.py | 2 +- src/water_market.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/index.js b/config/index.js index f636b17..5ac1ced 100644 --- a/config/index.js +++ b/config/index.js @@ -12,7 +12,7 @@ const config = { inputDir: '', // inputDir: 'E:/商品资料汇总/商品资料(1051-1100)/ppt1056-研究生复试', // 指定要查找的目录 - directoryPath: 'E:/商品资料汇总/商品资料(1151-1200)', + directoryPath: 'E:/商品资料汇总/商品资料(1201-1250)', // 要转换的文件个数, 0表示全部转换 rangeNum: 0, // rangeNum: 3, diff --git a/py-src/config.py b/py-src/config.py index 2fc4395..7ee19db 100644 --- a/py-src/config.py +++ b/py-src/config.py @@ -31,7 +31,7 @@ class Config: if directory_path_match: Config.WORK_PATH = directory_path_match.group(1) if range_num_match: - Config.RANGE_NUM = range_num_match.group(1) + Config.RANGE_NUM = int(range_num_match.group(1)) @staticmethod def get_latest_folder(base_directory): diff --git a/src/water_market.js b/src/water_market.js index dc80ae4..94a3e74 100644 --- a/src/water_market.js +++ b/src/water_market.js @@ -27,7 +27,7 @@ async function nodeGenWatermark({ img, text, filepath }) { * @param {string} color 字体颜色 * @return {Buffer} */ - function text2SVG({ text, fontSize = 24, color = 'rgba(204, 204, 204, 0.2)' }) { + function text2SVG({ text, fontSize = 24, color = 'rgba(204, 204, 204, 0.3)' }) { const fontPath = path.join(__dirname, '../assets/STHUPO.TTF'); // 加载字体文件 const text2SVG = Text2SVG.loadSync(fontPath);