mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-29 22:45:44 +00:00
Parsing
This commit is contained in:
parent
42812a0341
commit
dbefb187c3
1 changed files with 34 additions and 23 deletions
|
|
@ -506,9 +506,33 @@ namespace AideDeJeuCmd
|
||||||
output.Write($"{keySpan.Text}");
|
output.Write($"{keySpan.Text}");
|
||||||
output.WriteLine($" {value}");
|
output.WriteLine($" {value}");
|
||||||
|
|
||||||
if (keySpan.Style.Contains("font-size:11px"))
|
if(keySpan.Style.Contains("font-size:48px;vertical-align:baseline;color:rgba(0,0,0,1);"))
|
||||||
|
{ // titre de page
|
||||||
|
Console.ForegroundColor = ConsoleColor.Red;
|
||||||
|
output.Write($"{keySpan.Text}");
|
||||||
|
output.WriteLine($" {value}");
|
||||||
|
}
|
||||||
|
else if (keySpan.Style.Contains("color:rgba(203,0,0,1)"))
|
||||||
|
{ // bloodmark
|
||||||
|
Console.ForegroundColor = ConsoleColor.Red;
|
||||||
|
output.Write($"{keySpan.Text}");
|
||||||
|
output.WriteLine($" {value}");
|
||||||
|
}
|
||||||
|
else if (keySpan.Style.Contains("font-size:16px;vertical-align:baseline;color:rgba(255,207,52,1);"))
|
||||||
|
{ // page
|
||||||
|
Console.ForegroundColor = ConsoleColor.Red;
|
||||||
|
output.Write($"{keySpan.Text}");
|
||||||
|
output.WriteLine($" {value}");
|
||||||
|
}
|
||||||
|
else if (keySpan.Style.Contains("font-size:8px;vertical-align:baseline;color:rgba(0,0,0,1)") && keySpan.IdStyle.Contains("font-family:serif; font-weight:normal; font-style:normal;"))
|
||||||
|
{ // encadré
|
||||||
|
Console.ForegroundColor = ConsoleColor.Red;
|
||||||
|
output.Write($"{keySpan.Text}");
|
||||||
|
output.WriteLine($" {value}");
|
||||||
|
}
|
||||||
|
else if (keySpan.Style.Contains("font-size:11px;vertical-align:baseline;color:rgba(255,207,52,1);"))
|
||||||
{ // nom
|
{ // nom
|
||||||
Console.ForegroundColor = ConsoleColor.Cyan;
|
Console.ForegroundColor = ConsoleColor.White;
|
||||||
output.WriteLine($"# <!--Name-->{keySpan.Text}<!--/Name-->");
|
output.WriteLine($"# <!--Name-->{keySpan.Text}<!--/Name-->");
|
||||||
output.WriteLine($"");
|
output.WriteLine($"");
|
||||||
output.WriteLine($"- Source: <!--Source-->(LDM p{page})<!--/Source-->");
|
output.WriteLine($"- Source: <!--Source-->(LDM p{page})<!--/Source-->");
|
||||||
|
|
@ -529,13 +553,14 @@ namespace AideDeJeuCmd
|
||||||
{
|
{
|
||||||
tag = KeyTags[keySpan.Text.Trim()];
|
tag = KeyTags[keySpan.Text.Trim()];
|
||||||
|
|
||||||
Console.ForegroundColor = ConsoleColor.Blue;
|
|
||||||
output.Write($"- **{keySpan.Text.Trim()}**");
|
|
||||||
Console.ForegroundColor = ConsoleColor.White;
|
Console.ForegroundColor = ConsoleColor.White;
|
||||||
|
output.Write($"- **{keySpan.Text.Trim()}**");
|
||||||
output.WriteLine($" <!--{tag}-->{value}<!--/{tag}-->");
|
output.WriteLine($" <!--{tag}-->{value}<!--/{tag}-->");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Console.ForegroundColor = ConsoleColor.Red;
|
||||||
|
output.WriteLine($"ABILITIES");
|
||||||
if (abilities == null)
|
if (abilities == null)
|
||||||
{
|
{
|
||||||
abilities = "";
|
abilities = "";
|
||||||
|
|
@ -557,36 +582,21 @@ namespace AideDeJeuCmd
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.ForegroundColor = ConsoleColor.Green;
|
|
||||||
output.Write($"{keySpan.Text}");
|
|
||||||
Console.ForegroundColor = ConsoleColor.White;
|
Console.ForegroundColor = ConsoleColor.White;
|
||||||
|
output.Write($"{keySpan.Text}");
|
||||||
output.WriteLine($" {value}");
|
output.WriteLine($" {value}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(keySpan.Style.Contains("font-size:14px;vertical-align:baseline;color:rgba(137,23,26,1);"))
|
else if(keySpan.Style.Contains("font-size:14px;vertical-align:baseline;color:rgba(137,23,26,1);"))
|
||||||
{ // actions / réactions
|
{ // actions / réactions
|
||||||
Console.ForegroundColor = ConsoleColor.Green;
|
|
||||||
output.Write($"\n## {keySpan.Text}\n");
|
|
||||||
Console.ForegroundColor = ConsoleColor.White;
|
Console.ForegroundColor = ConsoleColor.White;
|
||||||
output.WriteLine($" {value}");
|
output.Write($"\n## {keySpan.Text}\n");
|
||||||
}
|
|
||||||
else if (keySpan.Style.Contains("color:rgba(203,0,0,1)"))
|
|
||||||
{ // bloodmark
|
|
||||||
Console.ForegroundColor = ConsoleColor.Red;
|
|
||||||
output.Write($"{keySpan.Text}");
|
|
||||||
output.WriteLine($" {value}");
|
|
||||||
}
|
|
||||||
else if (keySpan.Style.Contains("font-size:16px;vertical-align:baseline;color:rgba(255,207,52,1);"))
|
|
||||||
{ // page
|
|
||||||
Console.ForegroundColor = ConsoleColor.Red;
|
|
||||||
output.Write($"{keySpan.Text}");
|
|
||||||
output.WriteLine($" {value}");
|
output.WriteLine($" {value}");
|
||||||
}
|
}
|
||||||
else if (keySpan.IdStyle.Contains("font-family:sans-serif; font-weight:normal; font-style:normal;"))
|
else if (keySpan.IdStyle.Contains("font-family:sans-serif; font-weight:normal; font-style:normal;"))
|
||||||
{
|
{
|
||||||
Console.ForegroundColor = ConsoleColor.Green;
|
|
||||||
output.Write($"{keySpan.Text}");
|
|
||||||
Console.ForegroundColor = ConsoleColor.White;
|
Console.ForegroundColor = ConsoleColor.White;
|
||||||
|
output.Write($"{keySpan.Text}");
|
||||||
output.WriteLine($" {value}");
|
output.WriteLine($" {value}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -597,6 +607,7 @@ namespace AideDeJeuCmd
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Console.ReadKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StripLine()
|
void StripLine()
|
||||||
|
|
@ -606,10 +617,10 @@ namespace AideDeJeuCmd
|
||||||
|
|
||||||
Dictionary<string, string> KeyTags = new Dictionary<string, string>()
|
Dictionary<string, string> KeyTags = new Dictionary<string, string>()
|
||||||
{
|
{
|
||||||
|
{ "Jets de sauvegarde", "SavingThrows" },
|
||||||
{ "Classe d’armure" , "ArmorClass" },
|
{ "Classe d’armure" , "ArmorClass" },
|
||||||
{ "Points de vie", "HitPoints" },
|
{ "Points de vie", "HitPoints" },
|
||||||
{ "Vitesse", "Speed" },
|
{ "Vitesse", "Speed" },
|
||||||
{ "", "SavingThrows" },
|
|
||||||
{ "Compétences", "Skills" },
|
{ "Compétences", "Skills" },
|
||||||
{ "Sens", "Senses" },
|
{ "Sens", "Senses" },
|
||||||
{ "Langues", "Languages" },
|
{ "Langues", "Languages" },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue