From 2294c5d3c0022d85560b18e0d68c717ffabebc02 Mon Sep 17 00:00:00 2001 From: lemon73 Date: Mon, 11 May 2026 22:31:00 +0900 Subject: [PATCH] feat: add novelil exporter related files --- CommonNovel.sln | 30 +++++++++++++++++++ .../CommonNovel.Export.csproj | 13 ++++++++ .../NovelIL/NovelILExporter.cs | 16 ++++++++++ src/CommonNovel.Export/Shared.cs | 6 ++++ .../CommonNovel.Export.Tests.csproj | 26 ++++++++++++++++ .../Exporter.cs | 30 +++++++++++++++++++ 6 files changed, 121 insertions(+) create mode 100644 src/CommonNovel.Export/CommonNovel.Export.csproj create mode 100644 src/CommonNovel.Export/NovelIL/NovelILExporter.cs create mode 100644 src/CommonNovel.Export/Shared.cs create mode 100644 tests/CommonNovel.Export.NovelIL.Tests/CommonNovel.Export.Tests.csproj create mode 100644 tests/CommonNovel.Export.NovelIL.Tests/Exporter.cs diff --git a/CommonNovel.sln b/CommonNovel.sln index c5445bf..cf13ee0 100644 --- a/CommonNovel.sln +++ b/CommonNovel.sln @@ -13,6 +13,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonNovel.Tests", "tests\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonNovel.Benchmarks", "src\CommonNovel.Benchmarks\CommonNovel.Benchmarks.csproj", "{C782F417-5DCF-4482-8EFB-D54570ABC040}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonNovel.Export", "src\CommonNovel.Export\CommonNovel.Export.csproj", "{EBD19745-C5BF-4A95-8C53-819096512D9F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonNovel.Export.Tests", "tests\CommonNovel.Export.NovelIL.Tests\CommonNovel.Export.Tests.csproj", "{EDD52A13-666D-4EE6-95B8-37E59F40BAA0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -59,6 +63,30 @@ Global {C782F417-5DCF-4482-8EFB-D54570ABC040}.Release|x64.Build.0 = Release|Any CPU {C782F417-5DCF-4482-8EFB-D54570ABC040}.Release|x86.ActiveCfg = Release|Any CPU {C782F417-5DCF-4482-8EFB-D54570ABC040}.Release|x86.Build.0 = Release|Any CPU + {EBD19745-C5BF-4A95-8C53-819096512D9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EBD19745-C5BF-4A95-8C53-819096512D9F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EBD19745-C5BF-4A95-8C53-819096512D9F}.Debug|x64.ActiveCfg = Debug|Any CPU + {EBD19745-C5BF-4A95-8C53-819096512D9F}.Debug|x64.Build.0 = Debug|Any CPU + {EBD19745-C5BF-4A95-8C53-819096512D9F}.Debug|x86.ActiveCfg = Debug|Any CPU + {EBD19745-C5BF-4A95-8C53-819096512D9F}.Debug|x86.Build.0 = Debug|Any CPU + {EBD19745-C5BF-4A95-8C53-819096512D9F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EBD19745-C5BF-4A95-8C53-819096512D9F}.Release|Any CPU.Build.0 = Release|Any CPU + {EBD19745-C5BF-4A95-8C53-819096512D9F}.Release|x64.ActiveCfg = Release|Any CPU + {EBD19745-C5BF-4A95-8C53-819096512D9F}.Release|x64.Build.0 = Release|Any CPU + {EBD19745-C5BF-4A95-8C53-819096512D9F}.Release|x86.ActiveCfg = Release|Any CPU + {EBD19745-C5BF-4A95-8C53-819096512D9F}.Release|x86.Build.0 = Release|Any CPU + {EDD52A13-666D-4EE6-95B8-37E59F40BAA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EDD52A13-666D-4EE6-95B8-37E59F40BAA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EDD52A13-666D-4EE6-95B8-37E59F40BAA0}.Debug|x64.ActiveCfg = Debug|Any CPU + {EDD52A13-666D-4EE6-95B8-37E59F40BAA0}.Debug|x64.Build.0 = Debug|Any CPU + {EDD52A13-666D-4EE6-95B8-37E59F40BAA0}.Debug|x86.ActiveCfg = Debug|Any CPU + {EDD52A13-666D-4EE6-95B8-37E59F40BAA0}.Debug|x86.Build.0 = Debug|Any CPU + {EDD52A13-666D-4EE6-95B8-37E59F40BAA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EDD52A13-666D-4EE6-95B8-37E59F40BAA0}.Release|Any CPU.Build.0 = Release|Any CPU + {EDD52A13-666D-4EE6-95B8-37E59F40BAA0}.Release|x64.ActiveCfg = Release|Any CPU + {EDD52A13-666D-4EE6-95B8-37E59F40BAA0}.Release|x64.Build.0 = Release|Any CPU + {EDD52A13-666D-4EE6-95B8-37E59F40BAA0}.Release|x86.ActiveCfg = Release|Any CPU + {EDD52A13-666D-4EE6-95B8-37E59F40BAA0}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -67,6 +95,8 @@ Global {5717E758-2B46-461F-27F5-9724EAA2920E} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} {AF5365B4-F207-40E4-B1B6-298374455C93} = {0AB3BF05-4346-4AA6-1389-037BE0695223} {C782F417-5DCF-4482-8EFB-D54570ABC040} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {EBD19745-C5BF-4A95-8C53-819096512D9F} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {EDD52A13-666D-4EE6-95B8-37E59F40BAA0} = {0AB3BF05-4346-4AA6-1389-037BE0695223} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {1FBD48FA-C758-455E-8E2F-D41EBD6A3754} diff --git a/src/CommonNovel.Export/CommonNovel.Export.csproj b/src/CommonNovel.Export/CommonNovel.Export.csproj new file mode 100644 index 0000000..e580572 --- /dev/null +++ b/src/CommonNovel.Export/CommonNovel.Export.csproj @@ -0,0 +1,13 @@ + + + + net10.0 + enable + enable + + + + + + + diff --git a/src/CommonNovel.Export/NovelIL/NovelILExporter.cs b/src/CommonNovel.Export/NovelIL/NovelILExporter.cs new file mode 100644 index 0000000..952a491 --- /dev/null +++ b/src/CommonNovel.Export/NovelIL/NovelILExporter.cs @@ -0,0 +1,16 @@ +using NovelIL; + +namespace CommonNovel.Export.NovelIL; + +public class NovelILExporter +{ + public static string Export(string input) + { + return ""; + } + + // public static Program.NovelILDocument Builder(string input) + // { + + // } +} diff --git a/src/CommonNovel.Export/Shared.cs b/src/CommonNovel.Export/Shared.cs new file mode 100644 index 0000000..b269b4b --- /dev/null +++ b/src/CommonNovel.Export/Shared.cs @@ -0,0 +1,6 @@ +namespace CommonNovel.Export; + +// public class Program +// { + +// } diff --git a/tests/CommonNovel.Export.NovelIL.Tests/CommonNovel.Export.Tests.csproj b/tests/CommonNovel.Export.NovelIL.Tests/CommonNovel.Export.Tests.csproj new file mode 100644 index 0000000..b277cea --- /dev/null +++ b/tests/CommonNovel.Export.NovelIL.Tests/CommonNovel.Export.Tests.csproj @@ -0,0 +1,26 @@ + + + + net10.0 + enable + enable + false + + + + + + + + + + + + + + + + + + + diff --git a/tests/CommonNovel.Export.NovelIL.Tests/Exporter.cs b/tests/CommonNovel.Export.NovelIL.Tests/Exporter.cs new file mode 100644 index 0000000..5cf5db0 --- /dev/null +++ b/tests/CommonNovel.Export.NovelIL.Tests/Exporter.cs @@ -0,0 +1,30 @@ +using System.Diagnostics.CodeAnalysis; + +namespace CommonNovel.Export.NovelIL.Tests; + +public class ExporterTest +{ + [Fact] + public void NIL_Validation() + { + } + + [ExcludeFromCodeCoverage] + public static IEnumerable ExporterTestData => + new List + { + new object[] // Ex4.1 + { + "[Hi!]", + """ + { + "cells": [ + { + "messages": "text" + } + ] + } + """ + }, + }; +}