출력 파일명을 {분석폴더명}_DependencyMetrix 로 변경

- dependency_matrix.html/csv → <폴더명>_DependencyMetrix.html/csv
  (예: D:\ZOO → ZOO_DependencyMetrix.html)
- 파일명 불가 문자는 '_' 로 치환
- build-single-exe.bat: exe 회수 경로를 exe/ 폴더로 수정
- README 갱신

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-08 11:13:03 +09:00
co-authored by Claude Opus 4.8
parent 8250efbe57
commit 50922d8973
4 changed files with 13 additions and 5 deletions
BIN
View File
Binary file not shown.
+8 -2
View File
@@ -257,6 +257,12 @@ public static class DsmEngine
Directory.CreateDirectory(outDir);
// 출력 파일명: {분석폴더명}_DependencyMetrix
var folder = new DirectoryInfo(root).Name;
if (string.IsNullOrWhiteSpace(folder)) folder = "root";
foreach (var ch in Path.GetInvalidFileNameChars()) folder = folder.Replace(ch, '_');
var stem = folder + "_DependencyMetrix";
// CSV
var sb = new StringBuilder();
sb.Append("idx,node,group,").Append(string.Join(",", Enumerable.Range(1, N))).Append('\n');
@@ -267,10 +273,10 @@ public static class DsmEngine
for (int j = 0; j < N; j++) { sb.Append(','); sb.Append(i == j ? "\\" : (edges[n].Contains(order[j]) ? "1" : "")); }
sb.Append('\n');
}
var csvPath = Path.Combine(outDir, "dependency_matrix.csv");
var csvPath = Path.Combine(outDir, stem + ".csv");
File.WriteAllText(csvPath, sb.ToString(), new UTF8Encoding(false));
var htmlPath = Path.Combine(outDir, "dependency_matrix.html");
var htmlPath = Path.Combine(outDir, stem + ".html");
File.WriteAllText(htmlPath, BuildHtml(order, edges, group, gcol, gnames, fin, fout, root, N, upper), new UTF8Encoding(false));
string maxFi = N > 0 ? order.OrderByDescending(n => fin[n]).First() : "";
+2 -1
View File
@@ -21,7 +21,8 @@
1. `DsmTool.exe` 실행 → **대상 폴더** 선택(필요 시 **출력 폴더**).
2. 옵션: *Sample 제외*, *내부 NuGet 자동 감지*, **그룹 모드**(auto/topfolder/prefix/none).
*고급 설정* 에서 제외 경로·수동 패키지 매핑 조정.
3. **생성**`dependency_matrix.html`, `dependency_matrix.csv`.
3. **생성**`{분석폴더명}_DependencyMetrix.html`, `{분석폴더명}_DependencyMetrix.csv`
(예: `D:\ZOO` 분석 시 `ZOO_DependencyMetrix.html`).
4. **HTML 브라우저로 열기**(내장 웹뷰 없음 — 기본 브라우저).
## 사용법 (CLI)
+3 -2
View File
@@ -40,6 +40,7 @@ popd
if not "%ERR%"=="0" ( echo [ERROR] publish failed %ERR% & exit /b %ERR% )
echo [4/4] copy exe back
copy /y "%WORK%\bin\x64\Release\net9.0\win-x64\publish\DsmTool.exe" "%PROJ%..\DsmTool.exe" >nul
echo DONE: "%PROJ%..\DsmTool.exe"
if not exist "%PROJ%..\..\exe" mkdir "%PROJ%..\..\exe"
copy /y "%WORK%\bin\x64\Release\net9.0\win-x64\publish\DsmTool.exe" "%PROJ%..\..\exe\DsmTool.exe" >nul
echo DONE: "%PROJ%..\..\exe\DsmTool.exe"
endlocal