mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-30 06:56:10 +00:00
Liens
This commit is contained in:
parent
aa6636ed7f
commit
12945ce020
3 changed files with 45 additions and 18 deletions
|
|
@ -102,7 +102,7 @@
|
|||
{
|
||||
if (links.Any())
|
||||
{
|
||||
var blockLinks = links.Distinct().OrderBy(l => l.Value).ToList();
|
||||
var blockLinks = links.Distinct().OrderBy(l => l.Key).ToList();
|
||||
view.GestureRecognizers.Add(new TapGestureRecognizer
|
||||
{
|
||||
Command = new Command(async () =>
|
||||
|
|
|
|||
|
|
@ -272,6 +272,14 @@ namespace AideDeJeuCmd
|
|||
alllinks.Add(name, links);
|
||||
var names = GetMarkdownAnchorNames(md).ToList();
|
||||
allnames.Add(name, names);
|
||||
}
|
||||
}
|
||||
foreach (var resname in resnames)
|
||||
{
|
||||
if (resname.EndsWith(".md"))
|
||||
{
|
||||
var name = resname.Substring(15, resname.Length - 18);
|
||||
var md = await Helpers.GetResourceStringAsync(resname);
|
||||
var unlinkedrefs = GetMarkdownUnlinkedRefs(md).ToList();
|
||||
if (unlinkedrefs.Count > 0)
|
||||
{
|
||||
|
|
@ -279,16 +287,36 @@ namespace AideDeJeuCmd
|
|||
Console.WriteLine();
|
||||
foreach (var unlinkedref in unlinkedrefs.Distinct().OrderBy(i => i))
|
||||
{
|
||||
var file = "";
|
||||
//var file = "";
|
||||
var files = new Dictionary<string, string>();
|
||||
foreach(var aalinks in alllinks)
|
||||
{
|
||||
var found = aalinks.Value.FirstOrDefault(t => t.Item2 == Helpers.IdFromName(unlinkedref));
|
||||
if(found != null)
|
||||
{
|
||||
files[found.Item1] = $"{found.Item1}.md";
|
||||
//file = $"{found.Item1}.md";
|
||||
//Console.WriteLine($"[{unlinkedref}]: {file}#{Helpers.IdFromName(unlinkedref)}");
|
||||
}
|
||||
}
|
||||
foreach(var aanchors in allanchors)
|
||||
{
|
||||
if(aanchors.Value.Contains(Helpers.IdFromName(unlinkedref)))
|
||||
{
|
||||
file = $"{aanchors.Key}.md";
|
||||
break;
|
||||
files[aanchors.Key] = $"{aanchors.Key}.md";
|
||||
//file = $"{aanchors.Key}.md";
|
||||
//Console.WriteLine($"[{unlinkedref}]: {file}#{Helpers.IdFromName(unlinkedref)}");
|
||||
//break;
|
||||
}
|
||||
}
|
||||
Console.WriteLine($"[{unlinkedref}]: {file}#{Helpers.IdFromName(unlinkedref)}");
|
||||
if(files.Count == 0)
|
||||
{
|
||||
files[""] = "";
|
||||
}
|
||||
foreach (var file in files)
|
||||
{
|
||||
Console.WriteLine($"[{unlinkedref}]: {file.Value}#{Helpers.IdFromName(unlinkedref)}");
|
||||
}
|
||||
}
|
||||
Console.WriteLine();
|
||||
Console.WriteLine();
|
||||
|
|
@ -379,7 +407,7 @@ namespace AideDeJeuCmd
|
|||
|
||||
public static IEnumerable<string> GetMarkdownAnchorNames(string md)
|
||||
{
|
||||
var regex = new Regex($"\\n##? (?<name>.*?)\\n");
|
||||
var regex = new Regex($"\\n##* (?<name>.*?)\\s*?\\n");
|
||||
var matches = regex.Matches(md);
|
||||
foreach (Match match in matches)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ Au niveau 20, vous êtes devenu une véritable force de la nature. Vos valeurs d
|
|||
[arme courante]: equipment_hd_with_type_armecourante.md
|
||||
[arme de corps-à-corps]: equipment_hd_with_type_armedecorpsàcorps.md
|
||||
[arme de guerre de corps-à-corps]: equipment_hd_with_type_armedecorpsàcorps.md
|
||||
[armes courantes]: #armes-courantes
|
||||
[armes courantes]: equipment_hd_with_type_armecourante.md
|
||||
[armes de guerre]: #armes-de-guerre
|
||||
[armure lourde]: equipment_hd_with_type_armurelourde.md
|
||||
[armures intermédiaires]: equipment_hd_with_type_armureintermédiaire.md
|
||||
|
|
@ -224,29 +224,28 @@ Au niveau 20, vous êtes devenu une véritable force de la nature. Vos valeurs d
|
|||
[aveuglé]: conditions_hd.md#aveuglé
|
||||
[bouclier]: equipment_hd.md#bouclier
|
||||
[boucliers]: equipment_hd.md#bouclier
|
||||
[classe d'armure]: #classe-darmure
|
||||
[classe d'armure]: abilities_dexterity_hd.md#classe-darmure
|
||||
[contondants]: #contondants
|
||||
[Dressage]: #dressage
|
||||
[hache à deux mains]: #hache-à-deux-mains
|
||||
[Dressage]: abilities_wisdom_hd.md#dressage
|
||||
[hache à deux mains]: equipment_hd.md#hache-à-deux-mains
|
||||
[hachettes]: equipment_hd.md#hachette
|
||||
[inconscient]: conditions_hd.md#inconscient
|
||||
[initiative]: #initiative
|
||||
[Intimidation]: #intimidation
|
||||
[initiative]: abilities_dexterity_hd.md#initiative
|
||||
[Intimidation]: abilities_charisma_hd.md#intimidation
|
||||
[javelines]: equipment_hd.md#javeline
|
||||
[Nature]: #nature
|
||||
[Nature]: abilities_intelligence_hd.md#nature
|
||||
[neutralisé]: conditions_hd.md#neutralisé
|
||||
[paquetage d'explorateur]: equipment_hd.md#paquetage-dexplorateur
|
||||
[Perception]: #perception
|
||||
[paquetage d'explorateur]: #paquetage-dexplorateur
|
||||
[Perception]: abilities_wisdom_hd.md#perception
|
||||
[perforants]: #perforants
|
||||
[repos long]: #repos-long
|
||||
[surpris]: conditions_hd.md#surpris
|
||||
[repos long]: resting_hd.md#repos-long
|
||||
[surpris]: #surpris
|
||||
[Survie]: #survie
|
||||
[tableau d'évolution du barbare]: #tableau-dévolution-du-barbare
|
||||
[tranchants]: #tranchants
|
||||
|
||||
|
||||
|
||||
|
||||
[Force]: abilities_strength_hd.md
|
||||
[Dextérité]: abilities_dexterity_hd.md
|
||||
[Constitution]: abilities_constitution_hd.md
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue