commit bf6a8e30d636290294c4d1e8f5b236604bd9c088 parent 807e446aa359be9264ea1dea5bab69ebbfd421f7 Author: Kevin Corvisier <git@kevincorvisier.fr> Date: Sun, 20 Oct 2024 13:37:55 +0900 Set default values of properties in application.properties Diffstat:
7 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/src/main/java/fr/kevincorvisier/mtg/dd/Main.java b/src/main/java/fr/kevincorvisier/mtg/dd/Main.java @@ -58,8 +58,8 @@ public class Main try (final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext()) { - context.getEnvironment().getPropertySources().addLast(new ResourcePropertySource("application.properties")); context.getEnvironment().getPropertySources().addLast(new ResourcePropertySource(realFile.toURI().toString())); + context.getEnvironment().getPropertySources().addLast(new ResourcePropertySource("application.properties")); context.scan("fr.kevincorvisier.mtg.dd"); context.refresh(); diff --git a/src/main/packaged-resources/cfg/application.properties b/src/main/packaged-resources/cfg/application.properties @@ -2,3 +2,23 @@ cache.database=/home/kebi/Documents/mtg/cache.db ignore.players=Moreau,\u30E2\u30ED\u30FC replace-archetypes=Mono Red[MiddleSchool]|Burn,Sligh|Burn,Other|Rogue,Goblin[Middle School]|Goblins + +# +# Default values +# + +# Maximum number of decklists to download per archetype, once reached for an archetype, any decklist of this archetype will be ignored +archetype-limit=100 + +# Comma-separated list of banlist files. Any deck containing one of the cards in the banlists will be ignored +banlists=banlist_custom.txt + +# Maximum number of decklist to download, once reached the current configuration will end, the program will move to the next one or stop +limit=100 + +# When true, only decks containing only AI playable cards will be saved, the other will be ignored +only-ai-playable-cards=true + +# Minimum number of players for a tournament from TCDecks to be taken into account, tournament with less players will be ignored +tcdecks.tournament.players.min=0 + diff --git a/src/main/packaged-resources/cfg/config-available/example1-initial-population.properties b/src/main/packaged-resources/cfg/config-available/example1-initial-population.properties @@ -1,7 +1,6 @@ banlists=banlist_ec.txt,banlist_custom.txt limit=20 archetype-limit=20 -only-ai-playable-cards=true sources=https://www.hareruyamtg.com/en/deck/result?pageSize=100&formats[11]=11&eventName=middle&public_status=public&grades=top8&archetypeIds=5841,5885,6440 | \ https://www.tcdecks.net/archetype.php?archetype=Burn&format=Premodern output-dir=/home/kebi/git/repositories/mtg-genetic-deckbuilding/src/main/packaged-resources/cfg/example1/initial-population diff --git a/src/main/packaged-resources/cfg/config-available/example1-ms-opponents.properties b/src/main/packaged-resources/cfg/config-available/example1-ms-opponents.properties @@ -1,7 +1,5 @@ -banlists=banlist_custom.txt limit=13 archetype-limit=1 -only-ai-playable-cards=true sources=https://www.hareruyamtg.com/en/deck/result?pageSize=100&formats[11]=11&eventName=middle&public_status=public&grades=champion | \ https://www.hareruyamtg.com/en/deck/result?pageSize=100&formats[11]=11&eventName=middle&public_status=public&grades=top8 | \ https://www.hareruyamtg.com/en/deck/result?pageSize=100&formats[11]=11&eventName=middle&public_status=public&grades=top8&page=2 | \ diff --git a/src/main/packaged-resources/cfg/config-available/example1-pm-opponents.properties b/src/main/packaged-resources/cfg/config-available/example1-pm-opponents.properties @@ -1,7 +1,5 @@ -banlists=banlist_custom.txt limit=12 archetype-limit=1 -only-ai-playable-cards=true sources=https://www.tcdecks.net/format.php?format=Premodern output-dir=/home/kebi/git/repositories/mtg-genetic-deckbuilding/src/main/packaged-resources/cfg/example1/pm-opponents2 tcdecks.tournament.players.min=64 \ No newline at end of file diff --git a/src/main/packaged-resources/cfg/config-available/pauper-meta.properties b/src/main/packaged-resources/cfg/config-available/pauper-meta.properties @@ -1,6 +1,2 @@ -banlists=banlist_custom.txt -limit=100 -archetype-limit=100 -only-ai-playable-cards=true sources=https://www.hareruyamtg.com/en/deck/result?pageSize=100&formats[8]=8&public_status=public output-dir=/home/kebi/Documents/mtg/pauper/meta \ No newline at end of file diff --git a/src/main/packaged-resources/cfg/config-available/standard-meta.properties b/src/main/packaged-resources/cfg/config-available/standard-meta.properties @@ -1,6 +1,4 @@ -banlists=banlist_custom.txt -limit=100 -archetype-limit=100 -only-ai-playable-cards=true -sources=https://www.hareruyamtg.com/en/deck/result?pageSize=100&formats[1]=1&public_status=public +limit=10 +archetype-limit=1 +sources=https://www.hareruyamtg.com/en/deck/result?pageSize=100&formats[1]=1&public_status=public&grades=champion output-dir=/home/kebi/Documents/mtg/standard/meta \ No newline at end of file