This commit is contained in:
Chris Bell 2025-07-15 20:29:24 -05:00
parent 0d1e09ce3b
commit 42628581a9
8 changed files with 125 additions and 0 deletions

7
.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
.idea
SessionZero.SzfCli/bin
SessionZero.SzfCli/obj
SessionZero.SzfLib/bin
SessionZero.SzfLib/obj

View File

@ -0,0 +1,29 @@
// See https://aka.ms/new-console-template for more information
using Spectre.Console;
AnsiConsole.MarkupLine("[deepskyblue4_1]\n\n" +
" █████████ ███████████ ███████████ █████████ █████ █████\n" +
" ███░░░░░███░█░░░░░░███ ░░███░░░░░░█ ███░░░░░███░░███ ░░███ \n" +
"░███ ░░░ ░ ███░ ░███ █ ░ ███ ░░░ ░███ ░███ \n" +
"░░█████████ ███ ░███████ ░███ ░███ ░███ \n" +
" ░░░░░░░░███ ███ ░███░░░█ ░███ ░███ ░███ \n" +
" ███ ░███ ████ █ ░███ ░ ░░███ ███ ░███ █ ░███ \n" +
"░░█████████ ███████████ █████ ░░█████████ ███████████ █████\n" +
" ░░░░░░░░░ ░░░░░░░░░░░ ░░░░░ ░░░░░░░░░ ░░░░░░░░░░░ ░░░░░ \n\n[/]"
);
AnsiConsole.MarkupLine("[deepskyblue4_2]A tool for testing the SessionZero SZF Parser[/]");
AnsiConsole.MarkupLine("See [blue][link]https://sessionzero.app/szf-docs.html[/][/] for SZF documentation.");
struct SZColors
{
public static readonly Color BackgroundColor = Color.Grey19;
public static readonly Color PrimaryColor = Color.SteelBlue;
public static readonly Color PrimaryColorLight = Color.SlateBlue1;
public static readonly Color SecondaryColor = Color.NavyBlue;
public static readonly Color AccentColor = Color.DeepSkyBlue4_2;
public static readonly Color TextColor = Color.White;
public static readonly Color HeadingColor = Color.LightSteelBlue;
}

View File

@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\SessionZero.SzfLib\SessionZero.SzfLib.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Spectre.Console" Version="0.50.0" />
<PackageReference Include="Spectre.Console.Cli" Version="0.50.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,6 @@
namespace SessionZero.SzfLib.Objects;
public interface ISzfObject
{
}

View File

@ -0,0 +1,6 @@
namespace SessionZero.SzfLib.Objects;
public class SzfObject : ISzfObject
{
}

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Folder Include="File\" />
<Folder Include="Generator\" />
<Folder Include="Parser\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,21 @@
namespace SessionZero.SzfLib;
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public class SzfObjectAttribute : Attribute
{
/// <summary>
/// The unique identifier for the SzfObject type (e.g., "dataset", "character_template", "character").
/// This is used in the `!tpye` header of the SZF file to identify the type of SzfObject.
/// </summary>
public required string TypeIdentifier { get; set; }
public SzfObjectAttribute(string typeIdentifier)
{
if (string.IsNullOrWhiteSpace(typeIdentifier))
{
throw new ArgumentException("Type identifier cannot be null or whitespace.", nameof(typeIdentifier));
}
TypeIdentifier = typeIdentifier;
}
}

View File

@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SessionZero.SzfLib", "SessionZero.SzfLib\SessionZero.SzfLib.csproj", "{5BBC117D-F751-41AE-BA6D-4F99A9D2459D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SessionZero.SzfCli", "SessionZero.SzfCli\SessionZero.SzfCli.csproj", "{8540219D-5605-4E8A-83A5-7E38245458A5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5BBC117D-F751-41AE-BA6D-4F99A9D2459D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BBC117D-F751-41AE-BA6D-4F99A9D2459D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BBC117D-F751-41AE-BA6D-4F99A9D2459D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BBC117D-F751-41AE-BA6D-4F99A9D2459D}.Release|Any CPU.Build.0 = Release|Any CPU
{8540219D-5605-4E8A-83A5-7E38245458A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8540219D-5605-4E8A-83A5-7E38245458A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8540219D-5605-4E8A-83A5-7E38245458A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8540219D-5605-4E8A-83A5-7E38245458A5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal