mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 09:15:33 +00:00
Initial replacement of old repository.
This commit is contained in:
8
HaEdits/HaEdits.csproj
Normal file
8
HaEdits/HaEdits.csproj
Normal file
@@ -0,0 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
43
HaEdits/Program.cs
Normal file
43
HaEdits/Program.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace HaEdits
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var doc = XDocument.Load("../../../briefe.xml", LoadOptions.PreserveWhitespace);
|
||||
var document = doc.Root.Element("document");
|
||||
string pg = "";
|
||||
foreach (var elem in document.Descendants())
|
||||
{
|
||||
if (elem.Name == "page")
|
||||
pg = elem.Attribute("index").Value;
|
||||
if (elem.Name == "structure" && elem.Attribute("ref").Value == "2")
|
||||
{
|
||||
if (elem.Descendants().First().Name != "page" )
|
||||
{
|
||||
var ne = new XElement("page");
|
||||
ne.Add(new XAttribute("index", pg.ToString())); ;
|
||||
ne.Add(new XAttribute("autopsic", pg.ToString()));
|
||||
|
||||
elem.AddFirst(ne);
|
||||
elem.AddFirst("\r\n\t\t\t\t");
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var bd in document.Elements("structure"))
|
||||
{
|
||||
var l = bd.Elements();
|
||||
foreach (var lt in l) { lt.Name = "letterText"; lt.Attribute("ref").Remove(); }
|
||||
document.Add(l);
|
||||
}
|
||||
document.Elements("structure").Remove();
|
||||
foreach (var e in document.Elements("letterText")) e.AddAfterSelf("\r\n\t\t\t");
|
||||
doc.Save("briefeedit.xml", SaveOptions.DisableFormatting);
|
||||
}
|
||||
}
|
||||
}
|
||||
128022
HaEdits/briefe.xml
Normal file
128022
HaEdits/briefe.xml
Normal file
File diff suppressed because it is too large
Load Diff
128302
HaEdits/briefeedit.xml
Normal file
128302
HaEdits/briefeedit.xml
Normal file
File diff suppressed because it is too large
Load Diff
25056
HaEdits/meta.xml
Normal file
25056
HaEdits/meta.xml
Normal file
File diff suppressed because it is too large
Load Diff
25056
HaEdits/metaedit.xml
Normal file
25056
HaEdits/metaedit.xml
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user