From 355eb8d9632b8227ab2810ecabb1820663f36ee0 Mon Sep 17 00:00:00 2001 From: Wynd Date: Sat, 15 Nov 2025 11:23:27 +0200 Subject: [PATCH] Added ignore modrinth flag when counting --- curse-stats.py | 14 ++++++++++++-- justfile | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/curse-stats.py b/curse-stats.py index fbccd49..a1cdc48 100755 --- a/curse-stats.py +++ b/curse-stats.py @@ -264,6 +264,14 @@ if __name__ == "__main__": required=False, dest="mod_loader", ) + parser.add_argument( + "--ignore-modrinth", + help="Ignore modrinth entries", + default=False, + required=False, + action="store_true", + dest="ignore_modrinth", + ) args = parser.parse_args() page_size = clamp(args.page_size, 10, 50) @@ -306,8 +314,10 @@ if __name__ == "__main__": (curse_mods, curse_count) = fetch_curse_mods() all_mods.extend(curse_mods) - (modrinth_mods, modrinth_count) = fetch_modrinth_mods() - all_mods.extend(modrinth_mods) + modrinth_count = 0 + if not args.ignore_modrinth: + (modrinth_mods, modrinth_count) = fetch_modrinth_mods() + all_mods.extend(modrinth_mods) if ONLY_COUNT: print(f"{MOD_LOADER.name}-{GAME_VERSION} {curse_count + modrinth_count}") diff --git a/justfile b/justfile index 8f27375..45ed170 100644 --- a/justfile +++ b/justfile @@ -1,10 +1,28 @@ set quiet +count-big: + #!/usr/bin/env bash + ./curse-stats.py --game-version "1.2.5" --mod-loader Forge --count --ignore-modrinth + printf "\n" + ./curse-stats.py --game-version "1.7.10" --mod-loader Forge --count --ignore-modrinth + printf "\n" + ./curse-stats.py --game-version "1.12.2" --mod-loader Forge --count --ignore-modrinth + printf "\n" + ./curse-stats.py --game-version "1.16.5" --mod-loader Forge --count --ignore-modrinth + printf "\n" + ./curse-stats.py --game-version "1.20.1" --mod-loader Forge --count --ignore-modrinth + printf "\n" + ./curse-stats.py --game-version "1.21.1" --mod-loader Forge --count --ignore-modrinth + printf "\n" + ./curse-stats.py --game-version "1.21.1" --mod-loader NeoForge --count --ignore-modrinth + printf "\n" + count-120: #!/usr/bin/env bash for i in {1..6}; do ./curse-stats.py --game-version "1.20.${i}" --mod-loader Forge --count + ./curse-stats.py --game-version "1.20.${i}" --mod-loader NeoForge --count printf "\n" done