Search in sources :

Example 1 with NormalizeDeedsText

use of delta.games.lotro.tools.lore.deeds.checks.NormalizeDeedsText in project lotro-tools by dmorcellet.

the class MainLotroWikiDeedsLoader method writeResultFile.

private void writeResultFile() {
    List<DeedDescription> deeds = new ArrayList<DeedDescription>();
    DeedXMLParser parser = new DeedXMLParser();
    File currentDir = new File(".");
    for (File deedFile : currentDir.listFiles()) {
        if (deedFile.getName().endsWith(".xml")) {
            List<DeedDescription> newDeeds = parser.parseXML(deedFile);
            deeds.addAll(newDeeds);
        }
    }
    // Resolve deed links
    new DeedLinksResolver(deeds).doIt();
    int nbDeeds = deeds.size();
    System.out.println("Found " + nbDeeds + " deeds.");
    new CheckItemRewardsInDeeds().doIt(deeds);
    new NormalizeDeedsText().doIt(deeds);
    new CheckDeedLinks().doIt(deeds);
    File out = new File("../lotro-companion/data/lore/deeds.xml");
    DeedsContainer.writeSortedDeeds(deeds, out);
}
Also used : DeedDescription(delta.games.lotro.lore.deeds.DeedDescription) CheckItemRewardsInDeeds(delta.games.lotro.tools.lore.deeds.checks.CheckItemRewardsInDeeds) ArrayList(java.util.ArrayList) NormalizeDeedsText(delta.games.lotro.tools.lore.deeds.checks.NormalizeDeedsText) File(java.io.File) DeedXMLParser(delta.games.lotro.lore.deeds.io.xml.DeedXMLParser) CheckDeedLinks(delta.games.lotro.tools.lore.deeds.checks.CheckDeedLinks)

Aggregations

DeedDescription (delta.games.lotro.lore.deeds.DeedDescription)1 DeedXMLParser (delta.games.lotro.lore.deeds.io.xml.DeedXMLParser)1 CheckDeedLinks (delta.games.lotro.tools.lore.deeds.checks.CheckDeedLinks)1 CheckItemRewardsInDeeds (delta.games.lotro.tools.lore.deeds.checks.CheckItemRewardsInDeeds)1 NormalizeDeedsText (delta.games.lotro.tools.lore.deeds.checks.NormalizeDeedsText)1 File (java.io.File)1 ArrayList (java.util.ArrayList)1