Removed GetTaskArgumentsForDayHelper20240623
This commit is contained in:
parent
9f4286e3e9
commit
3070fee04c
@ -1177,36 +1177,6 @@ internal static partial class HelperMarkdown
|
||||
return new(result?.MarkdownFile, result?.Lines, result?.MarkdownFile.H1, result is null ? null : Path.GetRelativePath(markdownFile.Directory, Path.GetFullPath(result.MarkdownFile.File)));
|
||||
}
|
||||
|
||||
private static List<string> GetTaskArgumentsForDayHelper20240623(Input input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input.Destination))
|
||||
throw new NotSupportedException();
|
||||
List<string> results = [];
|
||||
string? vscodeDirectory = Path.GetDirectoryName(input.Destination);
|
||||
string? taskFile = vscodeDirectory is null ? null : Path.Combine(vscodeDirectory, "tasks.json");
|
||||
if (!string.IsNullOrEmpty(taskFile) && File.Exists(taskFile))
|
||||
{
|
||||
string json = File.ReadAllText(taskFile);
|
||||
VSCodeTasks? vsCodeTasks = JsonSerializer.Deserialize(json, VSCodeTasksSourceGenerationContext.Default.VSCodeTasks);
|
||||
if (vsCodeTasks is not null && vsCodeTasks.TaskCollection is not null)
|
||||
{
|
||||
foreach (VSCodeTask vsCodeTask in vsCodeTasks.TaskCollection)
|
||||
{
|
||||
if (vsCodeTask.Arguments is null || vsCodeTask.Arguments.Count < 4 || vsCodeTask.Arguments[3] != "Day-Helper-2024-06-23")
|
||||
continue;
|
||||
if (results.Count > 0)
|
||||
{
|
||||
results.Clear();
|
||||
break;
|
||||
}
|
||||
results.AddRange(vsCodeTask.Arguments.Skip(2));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static void MarkdownWikiLinkVerification(AppSettings appSettings, ILogger<Worker> logger, List<string> args, CancellationToken cancellationToken)
|
||||
{
|
||||
int updated;
|
||||
@ -1251,12 +1221,7 @@ internal static partial class HelperMarkdown
|
||||
logger.LogInformation("{updated} Markdown file(s) were updated", updated);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(input.Destination))
|
||||
{
|
||||
SaveColumnToCards(input, relativeToCollection);
|
||||
List<string> taskArgumentsForDayHelper20240623 = GetTaskArgumentsForDayHelper20240623(input);
|
||||
if (taskArgumentsForDayHelper20240623.Count > 0)
|
||||
HelperDay.Select(appSettings, logger, taskArgumentsForDayHelper20240623, cancellationToken: CancellationToken.None);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user