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.WriteLine($"Page : {page}");
|
||||
Console.ForegroundColor = ConsoleColor.White;
|
||||
string abilities = null;
|
||||
foreach (var line in fullText)
|
||||
{
|
||||
var keySpan = line.FirstOrDefault();
|
||||
|
|
@ -508,9 +509,9 @@ namespace AideDeJeuCmd
|
|||
Console.WriteLine($"");
|
||||
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"))
|
||||
{ // type / size / alignment
|
||||
// todo : découper type / size / alignment
|
||||
|
|
@ -518,12 +519,45 @@ namespace AideDeJeuCmd
|
|||
Console.WriteLine($"- <!--Type-->{keySpan.Text}<!--/Alignment-->");
|
||||
}
|
||||
else if (keySpan.Style.Contains("rgba(121,27,16,1)"))
|
||||
{ // key / value
|
||||
{ // key / ...
|
||||
string tag = "";
|
||||
if (KeyTags.ContainsKey(keySpan.Text.Trim()))
|
||||
{
|
||||
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("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
|
||||
|
||||
|
|
@ -565,10 +599,11 @@ namespace AideDeJeuCmd
|
|||
{ "Sens", "Senses" },
|
||||
{ "Langues", "Languages" },
|
||||
{ "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 é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