mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 09:15:33 +00:00
Stuff
This commit is contained in:
3
HaWeb/.vscode/settings.json
vendored
Normal file
3
HaWeb/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"dotnet.defaultSolution": "HaWeb.sln"
|
||||||
|
}
|
||||||
25
HaWeb/HaWeb.sln
Normal file
25
HaWeb/HaWeb.sln
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.5.001.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HaWeb", "HaWeb.csproj", "{3FDCF678-C8B9-410D-8229-BEB69195D27C}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{3FDCF678-C8B9-410D-8229-BEB69195D27C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{3FDCF678-C8B9-410D-8229-BEB69195D27C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{3FDCF678-C8B9-410D-8229-BEB69195D27C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{3FDCF678-C8B9-410D-8229-BEB69195D27C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {7ED50D02-358C-467B-AB41-CF0F0D6D1627}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
24
HamannPrinter/.vscode/launch.json
vendored
24
HamannPrinter/.vscode/launch.json
vendored
@@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": ".NET Core Launch (console)",
|
|
||||||
"type": "coreclr",
|
|
||||||
"request": "launch",
|
|
||||||
"preLaunchTask": "build",
|
|
||||||
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.0/HamannPrinter.dll",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"console": "internalConsole",
|
|
||||||
"stopAtEntry": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": ".NET Core Attach",
|
|
||||||
"type": "coreclr",
|
|
||||||
"request": "attach"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
3
HamannPrinter/.vscode/settings.json
vendored
Normal file
3
HamannPrinter/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"dotnet.defaultSolution": "HamannPrinter.sln"
|
||||||
|
}
|
||||||
5
HamannPrinter/.vscode/tasks.json
vendored
5
HamannPrinter/.vscode/tasks.json
vendored
@@ -32,9 +32,8 @@
|
|||||||
"args": [
|
"args": [
|
||||||
"watch",
|
"watch",
|
||||||
"run",
|
"run",
|
||||||
"${workspaceFolder}/HamannPrinter.csproj",
|
"--project",
|
||||||
"/property:GenerateFullPaths=true",
|
"${workspaceFolder}/HamannPrinter.csproj"
|
||||||
"/consoleloggerparameters:NoSummary"
|
|
||||||
],
|
],
|
||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -450,14 +450,14 @@ namespace HamannPrinter
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (comment.Entry.Length > 0)
|
if (comment.Element.Length > 0)
|
||||||
{
|
{
|
||||||
counter++;
|
counter++;
|
||||||
if (counter < 1)
|
if (counter < 1)
|
||||||
{
|
{
|
||||||
var xLemma = StringToXElement(comment.Lemma + " ");
|
var xLemma = StringToXElement(comment.Lemma + " ");
|
||||||
ParseComment(xLemma, para, counter);
|
ParseComment(xLemma, para, counter);
|
||||||
var xComment = StringToXElement(comment.Entry);
|
var xComment = StringToXElement(comment.Element);
|
||||||
ParseComment(xComment, para, counter);
|
ParseComment(xComment, para, counter);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -469,7 +469,7 @@ namespace HamannPrinter
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logger.Out("der Comment:\n" + comment.Entry + "\n für \n" + xelem + "\n ist leer");
|
Logger.Out("der Comment:\n" + comment.Element + "\n für \n" + xelem + "\n ist leer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1414,7 +1414,7 @@ namespace HamannPrinter
|
|||||||
Paragraph lemmaDescription = lemmaPara.InsertAfterSelf(new Paragraph());
|
Paragraph lemmaDescription = lemmaPara.InsertAfterSelf(new Paragraph());
|
||||||
ApplyParaStyle(lemmaDescription, "doppeleinzug");
|
ApplyParaStyle(lemmaDescription, "doppeleinzug");
|
||||||
lemmaDescription.ParagraphProperties.AppendChild(new SpacingBetweenLines() { After = SmallDistance });
|
lemmaDescription.ParagraphProperties.AppendChild(new SpacingBetweenLines() { After = SmallDistance });
|
||||||
ParseComment(XElement.Parse(metaComm.Entry), lemmaDescription);
|
ParseComment(XElement.Parse(metaComm.Element), lemmaDescription);
|
||||||
if (commReferences.ContainsKey(metaComm.Index))
|
if (commReferences.ContainsKey(metaComm.Index))
|
||||||
{
|
{
|
||||||
var commReference = commReferences[metaComm.Index];
|
var commReference = commReferences[metaComm.Index];
|
||||||
@@ -1436,7 +1436,7 @@ namespace HamannPrinter
|
|||||||
{
|
{
|
||||||
foreach (var comm in metaComm.Kommentare)
|
foreach (var comm in metaComm.Kommentare)
|
||||||
{
|
{
|
||||||
if (!String.IsNullOrWhiteSpace(comm.Value.Entry)) {
|
if (!String.IsNullOrWhiteSpace(comm.Value.Element)) {
|
||||||
var subLemmaPara = GetLastPara(commDoc).InsertAfterSelf(new Paragraph());
|
var subLemmaPara = GetLastPara(commDoc).InsertAfterSelf(new Paragraph());
|
||||||
ApplyParaStyle(subLemmaPara, "doppeleinzug");
|
ApplyParaStyle(subLemmaPara, "doppeleinzug");
|
||||||
ParseComment(XElement.Parse(comm.Value.Lemma), subLemmaPara);
|
ParseComment(XElement.Parse(comm.Value.Lemma), subLemmaPara);
|
||||||
@@ -1444,7 +1444,7 @@ namespace HamannPrinter
|
|||||||
var subEintragPara = subLemmaPara.InsertAfterSelf(new Paragraph());
|
var subEintragPara = subLemmaPara.InsertAfterSelf(new Paragraph());
|
||||||
ApplyParaStyle(subEintragPara, "doppeleinzug");
|
ApplyParaStyle(subEintragPara, "doppeleinzug");
|
||||||
subEintragPara.ParagraphProperties.AppendChild(new SpacingBetweenLines() { After = SmallDistance });
|
subEintragPara.ParagraphProperties.AppendChild(new SpacingBetweenLines() { After = SmallDistance });
|
||||||
ParseComment(XElement.Parse(RemoveWhiteSpaceLinebreak(comm.Value.Entry)), subEintragPara);
|
ParseComment(XElement.Parse(RemoveWhiteSpaceLinebreak(comm.Value.Element)), subEintragPara);
|
||||||
if (commReferences.ContainsKey(metaComm.Index) && commReferences[metaComm.Index].ContainsKey(comm.Key))
|
if (commReferences.ContainsKey(metaComm.Index) && commReferences[metaComm.Index].ContainsKey(comm.Key))
|
||||||
{
|
{
|
||||||
subEintragPara.ParagraphProperties.AppendChild(new SpacingBetweenLines() { After = SmallDistance });
|
subEintragPara.ParagraphProperties.AppendChild(new SpacingBetweenLines() { After = SmallDistance });
|
||||||
@@ -1680,7 +1680,7 @@ namespace HamannPrinter
|
|||||||
volume = Int32.Parse(Letters.Metas[marg.Letter].ZH.Volume);
|
volume = Int32.Parse(Letters.Metas[marg.Letter].ZH.Volume);
|
||||||
var place = new Place(volume, marg.Letter, ConvertNumber(marg.Page), Int32.Parse(marg.Line), marg.Page);
|
var place = new Place(volume, marg.Letter, ConvertNumber(marg.Page), Int32.Parse(marg.Line), marg.Page);
|
||||||
XElement comm = XElement.Parse(marg.Element);
|
XElement comm = XElement.Parse(marg.Element);
|
||||||
foreach (var link in comm.Elements().Where(x => x.Name.LocalName == "link"))
|
foreach (var link in comm.Elements().Where(x => x.Name.LocalName == "link" && (x.HasAttributes && (x.Attribute("ref") != null || x.Attribute("subref") != null))))
|
||||||
{
|
{
|
||||||
string refer = link.Attribute("ref").Value;
|
string refer = link.Attribute("ref").Value;
|
||||||
string subref = "0";
|
string subref = "0";
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>net6.0-windows</TargetFramework>
|
||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\HaDocument\HaDocument.csproj" />
|
<ProjectReference Include="..\HaDocumentV6\HaDocumentV6.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
25
HamannPrinter/HamannPrinter.sln
Normal file
25
HamannPrinter/HamannPrinter.sln
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.5.001.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HamannPrinter", "HamannPrinter.csproj", "{F6C929A3-B041-4F42-AF25-00D1E49B55ED}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{F6C929A3-B041-4F42-AF25-00D1E49B55ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{F6C929A3-B041-4F42-AF25-00D1E49B55ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{F6C929A3-B041-4F42-AF25-00D1E49B55ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{F6C929A3-B041-4F42-AF25-00D1E49B55ED}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {807CF64C-09D5-4447-9592-EE27ACC24590}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -277,6 +277,7 @@ namespace HamannPrinter
|
|||||||
static public Comment GetComment(XElement xelem)
|
static public Comment GetComment(XElement xelem)
|
||||||
{
|
{
|
||||||
//ref und subref id beziehen
|
//ref und subref id beziehen
|
||||||
|
if (!xelem.HasAttributes || xelem.Attribute("ref") == null) return null;
|
||||||
string refer = xelem.Attribute("ref").Value;
|
string refer = xelem.Attribute("ref").Value;
|
||||||
string subref = xelem?.Attribute("subref")?.Value;
|
string subref = xelem?.Attribute("subref")?.Value;
|
||||||
Comment comm;
|
Comment comm;
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
<TextBox x:Name="OutputDirBox" HorizontalAlignment="Left" Margin="267,95,0,0" Text="" TextWrapping="NoWrap" VerticalAlignment="Top" Width="342"/>
|
<TextBox x:Name="OutputDirBox" HorizontalAlignment="Left" Margin="267,95,0,0" Text="" TextWrapping="NoWrap" VerticalAlignment="Top" Width="342"/>
|
||||||
<Button x:Name="OutputDirButton" Content="suchen" HorizontalAlignment="Left" Margin="627,95,0,0" VerticalAlignment="Top" Click="OutputDirButton_Click"/>
|
<Button x:Name="OutputDirButton" Content="suchen" HorizontalAlignment="Left" Margin="627,95,0,0" VerticalAlignment="Top" Click="OutputDirButton_Click"/>
|
||||||
<Button Content="Dokumente erzeugen" HorizontalAlignment="Left" Margin="550,0,0,19" VerticalAlignment="Bottom" Click="Button_Click"/>
|
<Button Content="Dokumente erzeugen" HorizontalAlignment="Left" Margin="550,0,0,19" VerticalAlignment="Bottom" Click="Button_Click"/>
|
||||||
<TextBox x:Name="StartYearTextBox" HorizontalAlignment="Left" Margin="106,105,0,0" Text="1751" TextWrapping="Wrap" VerticalAlignment="Top" Width="56" RenderTransformOrigin="0.474,0.709" TextInput="TextBox_TextInput"/>
|
<TextBox x:Name="StartYearTextBox" HorizontalAlignment="Left" Margin="106,105,0,0" Text="1700" TextWrapping="Wrap" VerticalAlignment="Top" Width="56" RenderTransformOrigin="0.474,0.709" TextInput="TextBox_TextInput"/>
|
||||||
<TextBox x:Name="EndYearTextBox" HorizontalAlignment="Left" Margin="106,128,0,0" Text="1788" TextWrapping="Wrap" VerticalAlignment="Top" Width="56" RenderTransformOrigin="0.474,0.709" MaxLength="6" TextInput="EndYearTextBox_TextInput"/>
|
<TextBox x:Name="EndYearTextBox" HorizontalAlignment="Left" Margin="106,128,0,0" Text="1800" TextWrapping="Wrap" VerticalAlignment="Top" Width="56" RenderTransformOrigin="0.474,0.709" MaxLength="6" TextInput="EndYearTextBox_TextInput"/>
|
||||||
<Label Content="und" HorizontalAlignment="Left" Margin="44,124,0,0" VerticalAlignment="Top" HorizontalContentAlignment="Left"/>
|
<Label Content="und" HorizontalAlignment="Left" Margin="44,124,0,0" VerticalAlignment="Top" HorizontalContentAlignment="Left"/>
|
||||||
<Label Content="zwischen" HorizontalAlignment="Left" Margin="44,102,0,0" VerticalAlignment="Top" HorizontalContentAlignment="Left" RenderTransformOrigin="0.418,1.293"/>
|
<Label Content="zwischen" HorizontalAlignment="Left" Margin="44,102,0,0" VerticalAlignment="Top" HorizontalContentAlignment="Left" RenderTransformOrigin="0.418,1.293"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ namespace HamannPrinter
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
RegisterDocs.IsChecked = true;
|
RegisterDocs.IsChecked = true;
|
||||||
VolumeDocs.IsChecked = false;
|
VolumeDocs.IsChecked = true;
|
||||||
StartYearTextBox.Text = "1751";
|
StartYearTextBox.Text = "1700";
|
||||||
EndYearTextBox.Text = "1762"; // DEV
|
EndYearTextBox.Text = "1800"; // DEV
|
||||||
XmlFileBox.Text = @"D:\dev\source\hamann-ausgabe-core\XML\XML"; // DEV
|
XmlFileBox.Text = @"D:\Simon\source\inp"; // DEV
|
||||||
OutputDirBox.Text = @"D:\dev\source\hamann-ausgabe-core\XML\Ausg"; // DEV
|
OutputDirBox.Text = @"D:\Simon\source\ausg"; // DEV
|
||||||
//Act(); // DEV
|
Act(); // DEV
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SingleDocChanged(object sender, RoutedEventArgs e)
|
private void SingleDocChanged(object sender, RoutedEventArgs e)
|
||||||
@@ -214,11 +214,11 @@ namespace HamannPrinter
|
|||||||
if (File.Exists(file))
|
if (File.Exists(file))
|
||||||
{
|
{
|
||||||
// DEV
|
// DEV
|
||||||
// var answer = System.Windows.MessageBox.Show("HAMANN.xml gefunden. \nZuletzt bearbeitet: " + File.GetLastWriteTime(file) + "\n\nSoll diese Datei verwendet werden, ohne eine neue aus den Einzeldokumenten zusammenzusetzen?",
|
var answer = System.Windows.MessageBox.Show("HAMANN.xml gefunden. \nZuletzt bearbeitet: " + File.GetLastWriteTime(file) + "\n\nSoll diese Datei verwendet werden, ohne eine neue aus den Einzeldokumenten zusammenzusetzen?",
|
||||||
// "Confirmation",
|
"Confirmation",
|
||||||
// MessageBoxButton.YesNo,
|
MessageBoxButton.YesNo,
|
||||||
// MessageBoxImage.Question);
|
MessageBoxImage.Question);
|
||||||
// if (answer == MessageBoxResult.Yes) return file;
|
if (answer == MessageBoxResult.Yes) return file;
|
||||||
File.Delete(file);
|
File.Delete(file);
|
||||||
}
|
}
|
||||||
return new Concatinator(MakePath(XmlFileBox.Text)).HamannXmlFile;
|
return new Concatinator(MakePath(XmlFileBox.Text)).HamannXmlFile;
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ namespace HamannPrinter
|
|||||||
class Options : IHaDocumentOptions
|
class Options : IHaDocumentOptions
|
||||||
{
|
{
|
||||||
public string HamannXMLFilePath { get; set; }
|
public string HamannXMLFilePath { get; set; }
|
||||||
public string[] AvailableVolumes { get; set; } = { "1", "2", "3", "4", "5", "6", "7" };
|
public string[] AvailableVolumes { get; set; } = { };
|
||||||
public bool NormalizeWhitespace { get; set; } = true;
|
public bool NormalizeWhitespace { get; set; } = true;
|
||||||
|
|
||||||
public (int, int) AvailableYearRange {get; set; } = (1751, 1788);
|
public (int, int) AvailableYearRange {get; set; } = (1700, 1800);
|
||||||
|
|
||||||
public Options(string HamannXmlPath)
|
public Options(string HamannXmlPath)
|
||||||
{
|
{
|
||||||
@@ -75,11 +75,19 @@ namespace HamannPrinter
|
|||||||
|
|
||||||
public void MakeDocuments(Confix confix)
|
public void MakeDocuments(Confix confix)
|
||||||
{
|
{
|
||||||
|
// try {
|
||||||
var hamannDoc = Document.Create(new Options(confix.HamannXmlPath));
|
var hamannDoc = Document.Create(new Options(confix.HamannXmlPath));
|
||||||
DocOptions docOpt = new DocOptions(confix.Years, confix.OutputPath, confix.Editionsrichtlinien);
|
DocOptions docOpt = new DocOptions(confix.Years, confix.OutputPath, confix.Editionsrichtlinien);
|
||||||
CheckXML(confix, docOpt, hamannDoc);
|
CheckXML(confix, docOpt, hamannDoc);
|
||||||
Coordinator(docOpt, hamannDoc, hamannDoc, docOpt.Years, confix.VolumeDocx, confix.RegisterDocx);
|
Coordinator(docOpt, hamannDoc, hamannDoc, docOpt.Years, confix.VolumeDocx, confix.RegisterDocx);
|
||||||
// DEV Helper.Ok("Fertig!");
|
// DEV Helper.Ok("Fertig!");
|
||||||
|
// } catch (Exception ex) {
|
||||||
|
// Console.WriteLine("Quelle: " + ex.Source);
|
||||||
|
// Console.WriteLine("Msg: " + ex.Message);
|
||||||
|
// Console.WriteLine("Trace: " + ex.StackTrace);
|
||||||
|
// Console.ReadKey();
|
||||||
|
// }
|
||||||
|
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
HamannPrinter/inp/Editionsrichtlinien.docx
Normal file
BIN
HamannPrinter/inp/Editionsrichtlinien.docx
Normal file
Binary file not shown.
220127
HamannPrinter/inp/HAMANN.xml
Normal file
220127
HamannPrinter/inp/HAMANN.xml
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user