구두점 적용 로직 개선: ▼d/▼e 필드 세미콜론 적용 규칙 수정
This commit is contained in:
4
unimarc/.vscode/settings.json
vendored
Normal file
4
unimarc/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"dotnet.preferCSharpExtension": true,
|
||||
"dotnet.defaultSolution": "unimarc.sln"
|
||||
}
|
||||
19
unimarc/NuGet.Config
Normal file
19
unimarc/NuGet.Config
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="grapecity" value="https://nuget.grapecity.com/nuget" />
|
||||
</packageSources>
|
||||
<packageSourceCredentials />
|
||||
<packageRestore>
|
||||
<add key="enabled" value="True" />
|
||||
<add key="automatic" value="True" />
|
||||
</packageRestore>
|
||||
<bindingRedirects>
|
||||
<add key="skip" value="False" />
|
||||
</bindingRedirects>
|
||||
<packageManagement>
|
||||
<add key="format" value="0" />
|
||||
<add key="disabled" value="False" />
|
||||
</packageManagement>
|
||||
</configuration>
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
// 기본값으로 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2025.08.14.2300")]
|
||||
[assembly: AssemblyFileVersion("2025.08.14.2300")]
|
||||
[assembly: AssemblyVersion("2025.08.19.2250")]
|
||||
[assembly: AssemblyFileVersion("2025.08.19.2250")]
|
||||
|
||||
24
unimarc/unimarc/UniMarc.sln
Normal file
24
unimarc/unimarc/UniMarc.sln
Normal file
@@ -0,0 +1,24 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.5.2.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniMarc", "UniMarc.csproj", "{4FCAFD58-3A8E-4E08-85E2-05329866193A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4FCAFD58-3A8E-4E08-85E2-05329866193A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4FCAFD58-3A8E-4E08-85E2-05329866193A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4FCAFD58-3A8E-4E08-85E2-05329866193A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4FCAFD58-3A8E-4E08-85E2-05329866193A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FA0A3E60-8B04-4285-947B-DE3CCCCDEB3B}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -33,6 +33,10 @@ namespace UniMarc.개발자용
|
||||
var sql = $"select * from {cmbTables.Text}";
|
||||
var cn = db.CreateConnection();
|
||||
var da = new MySql.Data.MySqlClient.MySqlDataAdapter(sql, cn);
|
||||
var cb = new MySql.Data.MySqlClient.MySqlCommandBuilder(da);
|
||||
da.UpdateCommand = cb.GetUpdateCommand();
|
||||
da.InsertCommand = cb.GetInsertCommand();
|
||||
da.DeleteCommand = cb.GetDeleteCommand();
|
||||
var cnt = da.Update(dt);
|
||||
UTIL.MsgI($"P{cnt}");
|
||||
cn.Dispose();
|
||||
|
||||
@@ -591,12 +591,34 @@ namespace UniMarc.마크
|
||||
//아래 1보다 작다로 인해 a가 미처리되는 현상이 있어 위에다가 붙인다 2508014
|
||||
if (idx == "113" && (TMP[a].StartsWith("d") || TMP[a].StartsWith("e")))
|
||||
{
|
||||
// 새로운 구두점 적용 로직 (2024년 수정)
|
||||
var subfieldata = TMP[a].Trim();
|
||||
var endsignal = subfieldata.EndsWith("▲");
|
||||
if (endsignal) subfieldata = subfieldata.Substring(0, subfieldata.Length - 1);
|
||||
if (subfieldata.EndsWith(",") == false && subfieldata.EndsWith(";") == false)
|
||||
subfieldata += ";";
|
||||
subfieldata = subfieldata.Replace(",;", ";"); //두개붙은건 세미쿨론으로
|
||||
|
||||
// 현재 필드가 ,로 끝나지 않는 경우에만 ; 적용 검토
|
||||
if (!subfieldata.EndsWith(",") && !subfieldata.EndsWith(";"))
|
||||
{
|
||||
// 다음 필드가 d나 e인지 확인
|
||||
bool hasNextDE = false;
|
||||
for (int nextIdx = a + 1; nextIdx < TMP.Count; nextIdx++)
|
||||
{
|
||||
if (!TMP[nextIdx].isEmpty() && (TMP[nextIdx].StartsWith("d") || TMP[nextIdx].StartsWith("e")))
|
||||
{
|
||||
hasNextDE = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 다음에 d나 e 필드가 있으면 ; 적용
|
||||
if (hasNextDE)
|
||||
{
|
||||
subfieldata += ";";
|
||||
}
|
||||
}
|
||||
|
||||
// ,; 문자가 있다면 ;로 변경
|
||||
subfieldata = subfieldata.Replace(",;", ";");
|
||||
if (endsignal) subfieldata += "▲";
|
||||
TMP[a] = subfieldata;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user