mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-29 22:45:44 +00:00
Parsing
This commit is contained in:
parent
7064f78cbc
commit
c71474ab93
1 changed files with 47 additions and 12 deletions
|
|
@ -486,6 +486,7 @@ namespace AideDeJeuCmd
|
||||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||||
Console.WriteLine($"Page : {page}");
|
Console.WriteLine($"Page : {page}");
|
||||||
Console.ForegroundColor = ConsoleColor.White;
|
Console.ForegroundColor = ConsoleColor.White;
|
||||||
|
string abilities = null;
|
||||||
foreach (var line in fullText)
|
foreach (var line in fullText)
|
||||||
{
|
{
|
||||||
var keySpan = line.FirstOrDefault();
|
var keySpan = line.FirstOrDefault();
|
||||||
|
|
@ -508,9 +509,9 @@ namespace AideDeJeuCmd
|
||||||
Console.WriteLine($"");
|
Console.WriteLine($"");
|
||||||
Console.WriteLine($"- Source: <!--Source-->(LDM p{page})<!--/Source-->");
|
Console.WriteLine($"- Source: <!--Source-->(LDM p{page})<!--/Source-->");
|
||||||
}
|
}
|
||||||
else if (!keySpan.IdStyle.Contains("font-family:sans-serif; font-weight:normal; font-style:normal;") && CloseKeyValue())
|
//else if (!keySpan.IdStyle.Contains("font-family:sans-serif; font-weight:normal; font-style:normal;") && CloseKeyValue())
|
||||||
{
|
//{
|
||||||
}
|
//}
|
||||||
else if (keySpan.IdStyle.Contains("font-family:sans-serif; font-weight:normal; font-style:italic;") && keySpan.Text.Contains("taille"))
|
else if (keySpan.IdStyle.Contains("font-family:sans-serif; font-weight:normal; font-style:italic;") && keySpan.Text.Contains("taille"))
|
||||||
{ // type / size / alignment
|
{ // type / size / alignment
|
||||||
// todo : découper type / size / alignment
|
// todo : découper type / size / alignment
|
||||||
|
|
@ -518,13 +519,46 @@ namespace AideDeJeuCmd
|
||||||
Console.WriteLine($"- <!--Type-->{keySpan.Text}<!--/Alignment-->");
|
Console.WriteLine($"- <!--Type-->{keySpan.Text}<!--/Alignment-->");
|
||||||
}
|
}
|
||||||
else if (keySpan.Style.Contains("rgba(121,27,16,1)"))
|
else if (keySpan.Style.Contains("rgba(121,27,16,1)"))
|
||||||
{ // key / value
|
{ // key / ...
|
||||||
Console.ForegroundColor = ConsoleColor.Blue;
|
string tag = "";
|
||||||
Console.Write($"- **{keySpan.Text.Trim()}**");
|
if (KeyTags.ContainsKey(keySpan.Text.Trim()))
|
||||||
Console.ForegroundColor = ConsoleColor.White;
|
{
|
||||||
Console.WriteLine($" {value}");
|
tag = KeyTags[keySpan.Text.Trim()];
|
||||||
|
|
||||||
|
Console.ForegroundColor = ConsoleColor.Blue;
|
||||||
|
Console.Write($"- **{keySpan.Text.Trim()}**");
|
||||||
|
Console.ForegroundColor = ConsoleColor.White;
|
||||||
|
Console.WriteLine($" <!--{tag}-->{value}<!--/{tag}-->");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (abilities == null)
|
||||||
|
{
|
||||||
|
abilities = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(keySpan.Style.Contains("color:rgba(203,0,0,1)"))
|
else if (keySpan.Style.Contains("rgba(0,0,0,1)"))
|
||||||
|
{ // ... / value
|
||||||
|
if(abilities != null)
|
||||||
|
{
|
||||||
|
abilities += keySpan.Text;
|
||||||
|
if(abilities.Count(c => c == '(') == 6)
|
||||||
|
{
|
||||||
|
Console.WriteLine("|FOR|DEX|CON|INT|SAG|CHA|\n|---|---|---|---|---|---|");
|
||||||
|
Console.WriteLine("|" + abilities.Replace(") ",")").Replace(")",")|"));
|
||||||
|
abilities = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.ForegroundColor = ConsoleColor.Green;
|
||||||
|
Console.Write($"{keySpan.Text}");
|
||||||
|
Console.ForegroundColor = ConsoleColor.White;
|
||||||
|
Console.WriteLine($" {value}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (keySpan.Style.Contains("color:rgba(203,0,0,1)"))
|
||||||
{ // bloodmark
|
{ // bloodmark
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -565,10 +599,11 @@ namespace AideDeJeuCmd
|
||||||
{ "Sens", "Senses" },
|
{ "Sens", "Senses" },
|
||||||
{ "Langues", "Languages" },
|
{ "Langues", "Languages" },
|
||||||
{ "Dangerosité", "Challenge" },
|
{ "Dangerosité", "Challenge" },
|
||||||
{ "Résistance aux dégâts", "DamageResistance" },
|
{ "Résistance aux dégâts", "DamageResistances" },
|
||||||
{ "Immunité contre les dégâts", "DamageImmunities" },
|
{ "Immunité contre les dégâts", "DamageImmunities" },
|
||||||
{ "Immunité contre les états", "StateImmunities" },
|
{ "Immunité contre les états", "ConditionImmunities" },
|
||||||
//{ "", "" },
|
{ "Immunité contre l’état", "ConditionImmunities" },
|
||||||
|
{ "Vulnérabilité aux dégâts", "DamageVulnerabilities" },
|
||||||
//{ "", "" },
|
//{ "", "" },
|
||||||
//{ "", "" },
|
//{ "", "" },
|
||||||
//{ "", "" },
|
//{ "", "" },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue