chore: log folder transitions during -ingest

The every-50-file progress line wasn't enough to know which blog was
currently being processed on a long run. Now -ingest prints a
"entering folder: <name>" line whenever the source folder changes, and
the every-50 progress line also prefixes the folder name.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
jim
2026-05-18 15:40:27 -05:00
co-authored by Claude Opus 4.7
parent cf3f97ddc4
commit c55569eadf
+11 -2
View File
@@ -72,6 +72,7 @@ namespace URLNotesGrabberCORE
int filesProcessed = 0; int filesProcessed = 0;
int filesSkipped = 0; int filesSkipped = 0;
int postsTouched = 0; int postsTouched = 0;
string? lastBlogFolder = null;
try try
{ {
@@ -93,8 +94,16 @@ namespace URLNotesGrabberCORE
} }
filesProcessed++; filesProcessed++;
if (filesProcessed % 50 == 0 || filesProcessed == 1)
Console.WriteLine($"[{filesProcessed}/{txtFiles.Count}] {Path.GetFileName(file)}"); if (lastBlogFolder != rawBlogName)
{
Console.WriteLine($"[{filesProcessed}/{txtFiles.Count}] >> entering folder: {rawBlogName}");
lastBlogFolder = rawBlogName;
}
else if (filesProcessed % 50 == 0)
{
Console.WriteLine($"[{filesProcessed}/{txtFiles.Count}] {rawBlogName}/{Path.GetFileName(file)}");
}
string currentPostId = ""; string currentPostId = "";
var currentPostData = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); var currentPostData = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);