Better support for yaml within Markdown Helper

Stratus merge
This commit is contained in:
2025-11-27 20:35:09 -07:00
parent a33436bc4e
commit 74341fa5eb
6 changed files with 851 additions and 734 deletions

11
.vscode/launch.json vendored
View File

@ -11,6 +11,15 @@
"preLaunchTask": "Build",
"program": "${workspaceFolder}/bin/Debug/net10.0/win-x64/File-Folder-Helper.dll",
"args": [
"s",
"M",
"J:/5-Other-Small/Notes/Infineon",
"-d",
"J:/5-Other-Small/Notes/Infineon/.vscode/helper",
"-t",
"fcrespo82.markdown-table-formatter",
"-e",
"J:/5-Other-Small/Notes/Infineon/.User",
"s",
"X",
"\\\\mesfs.infineon.com\\EC_EAFLog\\Production\\Logs\\EAF-Info-Warn-002-059-000",
@ -19,7 +28,7 @@
"yyyy-MM-dd~HH:mm:ss,fff",
"13",
"EAF Version~Shutdown triggered~Lost connection~EAF Backbone terminating~Publishing Connection Lost Transaction",
"2025-05-25 00:00:00,232",
"2025-11-18 13:59:59,999",
"256",
"\\\\mesfs.infineon.com\\EC_EAFLog\\Production\\Logs\\EAF-Info-Warn-002-059-000-Trace",
".trc",

8
.vscode/mklink.md vendored
View File

@ -7,11 +7,11 @@ updated: "2023-10-20T04:00:37.259Z"
# mklink
```bash
mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.kanbn" "D:\5-Other-Small\Kanban\File-Folder-Helper"
mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.kanbn" "J:\5-Other-Small\Kanban\File-Folder-Helper"
```
```bash
mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.kanbn" "D:\5-Other-Small\Kanban\File-Folder-Helper"
mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.kanbn" "J:\5-Other-Small\Kanban\File-Folder-Helper"
```
```bash Thu Jul 18 2024 13:47:40 GMT-0700 (Mountain Standard Time)
@ -33,9 +33,9 @@ mklink /J "C:\Users\phares\.vscode-insiders\extensions\infineon-technologies-ag-
```bash 1749957317559 = 638855541175590000 = 2025-2.Spring = Sat Jun 14 2025 20:15:17 GMT-0700 (Mountain Standard Time)
mkdir "L:\DevOps\MESA_FI\file-folder-helper\bin\Release\net8.0\win-x64"
mklink /J "L:\DevOps\MESA_FI\file-folder-helper\bin\Release\net8.0\win-x64\publish" "D:\5-Other-Small\Proxmox\publish"
mklink /J "L:\DevOps\MESA_FI\file-folder-helper\bin\Release\net8.0\win-x64\publish" "J:\5-Other-Small\Proxmox\publish"
```
```bash 1750459968132 = 638860567681320000 = 2025-3.Summer = Fri Jun 20 2025 15:52:47 GMT-0700 (Mountain Standard Time)
mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.vscode\.helper" "D:\5-Other-Small\Notes\Infineon\.vscode\helper"
mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.vscode\.helper" "J:\5-Other-Small\Notes\Infineon\.vscode\helper"
```

20
.vscode/tasks.json vendored
View File

@ -184,11 +184,27 @@
"args": [
"build",
"-r",
"linux-x64",
"win-x64",
"-c",
"Release",
"${workspaceFolder}/File-Folder-Helper.csproj"
],
"command": "dotnet",
"label": "Build Linux",
"label": "Build Release",
"problemMatcher": "$msCompile",
"type": "process"
},
{
"args": [
"build",
"-r",
"linux-x64",
"-c",
"Release",
"${workspaceFolder}/File-Folder-Helper.csproj"
],
"command": "dotnet",
"label": "Build Linux Release",
"problemMatcher": "$msCompile",
"type": "process"
},

View File

@ -12,8 +12,32 @@ internal static partial class Helper20251118 {
logger.LogInformation(args[4]);
string split = args[3];
string fileName = args[4];
string searchPattern = args[2];
string sourceDirectory = Path.GetFullPath(args[0].Split('~')[0]);
string checkFile = Path.Combine(sourceDirectory, args[2]);
if (searchPattern.Contains('*')) {
ReadFiles(logger, sourceDirectory, searchPattern);
} else {
StratusSplit(logger, split, fileName, sourceDirectory, searchPattern);
}
}
private static void ReadFiles(ILogger<Worker> logger, string sourceDirectory, string searchPattern) {
List<byte> bytes = [];
string[] files = Directory.GetFiles(sourceDirectory, searchPattern, SearchOption.TopDirectoryOnly);
logger.LogInformation($"Read {files.Length} files");
foreach (string file in files) {
foreach (byte @byte in File.ReadAllBytes(file)) {
bytes.Add(@byte);
}
}
if (bytes.Count > 0) {
string bytesFile = Path.Combine(sourceDirectory, $"{DateTime.Now.Ticks}{searchPattern.Replace('*', '_')}");
File.WriteAllBytes(bytesFile, bytes.ToArray());
}
}
private static void StratusSplit(ILogger<Worker> logger, string split, string fileName, string sourceDirectory, string searchPattern) {
string checkFile = Path.Combine(sourceDirectory, searchPattern);
if (!File.Exists(checkFile)) {
logger.LogWarning("File does not exist: {checkFile}", checkFile);
} else {

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
// import data from './oi-metrology-viewer-0-Line-yaml.json' with { type: 'json' };
// import data from '../.vscode/oi-metrology-viewer-0-Line-yaml.json' with { type: 'json' };
import data from '../.vscode/.helper/hosts-legend-table.json' with { type: 'json' };
data.forEach(element => {
console.log(element.Concat);
});