From 0756bf12d10cf1b7f78c571de0a9ad69cbaeb7ca Mon Sep 17 00:00:00 2001
From: curtis <curtis@i-mps.com>
Date: 星期一, 30 三月 2026 14:24:17 +0800
Subject: [PATCH] fix: 更新內部引用方法參照
---
scripts/list_image_dependencies.js | 128 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 128 insertions(+), 0 deletions(-)
diff --git a/scripts/list_image_dependencies.js b/scripts/list_image_dependencies.js
new file mode 100644
index 0000000..afcdfa9
--- /dev/null
+++ b/scripts/list_image_dependencies.js
@@ -0,0 +1,128 @@
+/**
+ *
+ * IMAGE 模組列表輸出至 CSV scripts/dist/*.image.csv
+ *
+ *
+ * */
+const fs = require('fs');
+const readline = require('readline');
+const path = require('path');
+const {findImageKeywords} = require('./list_dependencies')
+const baseDir = path.join(process.cwd(), 'scripts/dist');
+const exclusions = Array.from(new Set([
+ 'ScanRotate',
+ 'ImageFormat <> ifBlackWhite',
+
+])).join('|')
+// 您提供的關鍵字 (以 | 分隔)
+const keywordsStr = Array.from(new Set([
+ 'BWTif2Jpg',
+ 'BmpConverJpg',
+ 'BrightnessImg', // iis_image_process
+ 'CheckNeedCrop',
+ 'CheckSize',
+ 'CleanupBorder',
+ 'ClearLine',
+ 'Color2BW_RTS', // iis_image_process
+ 'Color2tif',
+ 'ConvertTo256Gray',
+ 'ConvertToBW',
+ 'ConvertToGray',
+ 'CreateDraft',
+ 'CreateNote',
+ 'CreateReportImg',
+ 'CreateReportImg_JSON', // iis_image_process
+ 'CreateStamp', // iis_image_process
+ 'CropImg',
+ 'DeskewImg',
+ 'DpiResize',
+ 'DrawPointLine',
+ 'Emboss',
+ 'FieldMask',
+ 'FilterColor', // iis_image_process
+ 'FindBlackPoint', // iis_image_process
+ 'FindPoint',
+ 'GetBlackSpots', // iis_image_process
+ 'GetExif_CaptureDateTime',
+ 'GetPixBW',
+ 'GetPosAngle',
+ 'GetSelectRect',
+ 'GetSelectRect2String', // iis_image_process
+ 'GetSelectRect_Back',
+ 'GetSelectRect_Black2String',
+ 'GetSiteOMR',
+ 'GetTag', //
+ 'Get_OMR',
+ 'Gray2BW_RTS', // iis_image_process
+ 'ImageProcessor.anchorAnalyzer',
+ 'ImageProcessor.barcodeRecognizer',
+ 'ImageProcessor.converter',
+ 'ImageProcessor.transformer',
+ 'ImageReSize_FormID',
+ 'ImageReSize_tmp',
+ 'ImageResize',
+ 'ImageResize', // iis_image_process
+ 'Image_Smooth',
+ 'JpgReSize_Exif',
+ 'JpgReSize_Exif', // iis
+ 'MpsGetBarcode',
+ 'NegativeImg',
+ 'NegativeImg',
+ 'PrintBarcode', // iis
+ 'Rotate',
+ 'SaveAnnotation',
+ 'SetSelectRect',
+ 'SetSelectRect_Original',
+ 'SetTag', // iis
+ 'ShowKeyinRect', // iis
+ 'TDibGraphic',
+ 'TJpegGraphic',
+ 'TNBCleanupBorderTransform', // iis
+ 'TTiffGraphic',
+ 'TWatermarkTransform', // iis
+ 'Watermark',
+ 'Watermark1',
+ 'Watermark1_Hong', // iis
+ 'Watermark1_Hong_New',
+ 'Watermark2',
+
+ // 以下可省
+ 'CleanupBorder',
+ 'ConvertToBW',
+ 'ConvertToGray',
+ 'FJpgCompression',
+ 'Image_Smooth',
+ 'NegativeImg',
+ 'SaveQuality',
+ 'ifBlackWhite',
+ 'ifColor25',
+ 'ifGray256',
+ 'ifTrueColor',
+ 'tcGroup4',
+ 'tcJpeg',
+ 'tcPackBits',
+])).join('|')
+// 執行腳本 (請確認您的目標檔案名稱,預設為 CB_IMGPSScanImp.pas)
+const targetFiles = [
+ 'CB_IMGPSScanImp.pas.bk',
+ 'DocCopy.pas',
+ 'DocList.pas',
+ 'DocPrt.pas',
+ 'ErrList.pas',
+ 'InputMask.pas',
+ 'OldCaseImg.pas',
+ 'OldCaseInfo.pas',
+ 'PatchFom.pas',
+ 'ScanMemo.pas'
+]
+
+async function listDependencies() {
+ console.log(`${'方法名'.padEnd(30)} | ${'所在檔名'.padEnd(20)} | ${'行號'.padEnd(5)} | ${'引用了什麼相依 (關鍵字)'}`);
+ console.log(`--- | --- | --- | --- |`);
+ return await Promise.all(targetFiles.map((_) => findImageKeywords(_, keywordsStr, exclusions, path.join(baseDir, `${_}.image.csv`))))
+}
+
+module.exports = {
+ listDependencies
+}
+
--
Gitblit v1.8.0