This commit is contained in:
adam 2024-08-07 20:04:28 -04:00
parent ba86337756
commit 5b3315d812
2 changed files with 21 additions and 5 deletions

View File

@ -148,13 +148,16 @@ namespace placeholdervo
var lines = File.ReadAllLines(scriptPath)
.Append("\n").Append("\n");
var primaryVOLines = new List<string>();
var titlecardUnprocessed = new List<string>();
var titlecardLines = new List<string>();
var directiveLines = new List<string>();
var altVOLines = new List<string>();
var noteLines = new List<string>();
foreach(var l in lines)
{
if(l.StartsWith('#'))
{
titlecardLines.Add(l);
titlecardUnprocessed.Add(l);
}
else if (l.StartsWith('['))
{
@ -172,7 +175,7 @@ namespace placeholdervo
File.WriteAllLines(scriptStripped, primaryVOLines);
var titleLevels = new List<int>(){0};
var titleIncrementDepth = 0;
foreach(var l in titlecardLines)
foreach(var l in titlecardUnprocessed)
{
titleIncrementDepth = 1;
var thisString = l;
@ -196,6 +199,7 @@ namespace placeholdervo
TitleCardText = string.Join('.', titleLevels[1..]) + ": " + TitleCardText;
}
Console.WriteLine($"title card: {TitleCardText}");
titlecardLines.Add(TitleCardText);
//tc command
}
else
@ -221,7 +225,7 @@ namespace placeholdervo
if (Uri.TryCreate(thisLine, UriKind.Absolute, out Uri asUri)
&& (asUri.Scheme == Uri.UriSchemeHttp || asUri.Scheme == Uri.UriSchemeHttps))
{
Console.WriteLine($"uri: {asUri}. ship off to yt-dlp or project Ose");
Console.WriteLine($"uri: {asUri}. ship off to yt-dlp or project Ose?");
}
else
{
@ -237,15 +241,23 @@ namespace placeholdervo
if(directiveName == "note")
{
//note command
noteLines.Add(parameterText);
Console.WriteLine($"on screen note: {parameterText}");
}
else
{
//alt va command
altVOLines.Add(parameterText);
Console.WriteLine($"alt VA: {parameterText}");
}
}
}
//alt va command with altVOLines
File.WriteAllLines($"{scriptBasename}-altVO.txt", altVOLines);
// execute them all
Task.Run(OfflineStuff);
Task.Run(ApiCalls);
Task.Run(FilePickups);
// cancelSource.Cancel();
// Console.WriteLine("http client \"cancelled\".");

View File

@ -1,4 +1,8 @@
{
"speech_service": "http://eligos.lan:5400",
"sync_dropoff": "/home/adam/Sync/eligos documents/"
"sync_dropoff": "/home/adam/Sync/eligos documents/",
"titlecard_command": "/home/adam/Desktop/beefhaving/_meta/title card/titlecard.sh",
"note_command": "/home/adam/Desktop/beefhaving/_meta/on screen note/note.sh",
"titlecards_dest": "./notes",
"notes_dest": "./notes"
}