From 33839930e8a24778455b8b448bdb0b9c8c369861 Mon Sep 17 00:00:00 2001 From: jim Date: Thu, 16 Jul 2026 10:20:50 -0500 Subject: [PATCH] Parse Reblog root url in default .txt ingest mode TraverseDirectory (the no-args ingest path) never read the "Reblog root url:" line, so RootURL stayed unset even though AddPost/UpdatePost already support it via the API-based --likes flow. New scraper output now includes this field; wire it through both AddPost call sites. --- URLNotesGrabberCORE/DataAccess.cs | 2 ++ URLNotesGrabberCORE/Program.cs | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/URLNotesGrabberCORE/DataAccess.cs b/URLNotesGrabberCORE/DataAccess.cs index 99e9490..b288d05 100644 --- a/URLNotesGrabberCORE/DataAccess.cs +++ b/URLNotesGrabberCORE/DataAccess.cs @@ -37,6 +37,7 @@ namespace URLNotesGrabberCORE public string reblogKey; public string reblogName; public string reblogURL; + public string rootURL; public string slug; public string summary; public string tags; @@ -60,6 +61,7 @@ namespace URLNotesGrabberCORE reblogKey = "."; reblogName = "."; reblogURL = "."; + rootURL = "."; slug = "."; summary = "."; tags = "."; diff --git a/URLNotesGrabberCORE/Program.cs b/URLNotesGrabberCORE/Program.cs index 1604dd8..3367d41 100644 --- a/URLNotesGrabberCORE/Program.cs +++ b/URLNotesGrabberCORE/Program.cs @@ -1410,7 +1410,7 @@ if (shouldInsert) DataAccess.AddPost(curDir, long.Parse(reblog.postID), reblog.reblogURL, reblog.date, reblog.postURL, reblog.slug, reblog.reblogKey, reblog.reblogName, reblog.summary, reblog.quote, reblog.body, reblog.tags, reblog.link, reblog.photoURL, reblog.photoCaption, reblog.downloadedFiles, reblog.audioCaption, reblog.question, reblog.answer, - reblog.title, false); + reblog.title, false, rootURL: reblog.rootURL); recordImportStopwatch.Stop(); postsAdded++; @@ -1435,6 +1435,10 @@ if (shouldInsert) { reblog.reblogName = line.Substring(13).Trim(); } + if (line.StartsWith(@"Reblog root url:", StringComparison.OrdinalIgnoreCase)) + { + reblog.rootURL = line.Substring(16).Trim(); + } if (line.StartsWith(@"Downloaded files:", StringComparison.OrdinalIgnoreCase)) { reblog.downloadedFiles = line.Substring(17).Trim(); @@ -1538,7 +1542,7 @@ if (shouldInsert) DataAccess.AddPost(curDir, long.Parse(reblog.postID), reblog.reblogURL, reblog.date, reblog.postURL, reblog.slug, reblog.reblogKey, reblog.reblogName, reblog.summary, reblog.quote, reblog.body, reblog.tags, reblog.link, reblog.photoURL, reblog.photoCaption, reblog.downloadedFiles, reblog.audioCaption, reblog.question, reblog.answer, - reblog.title, true); + reblog.title, true, rootURL: reblog.rootURL); recordImportStopwatch.Stop(); postsAdded++;