diff --git a/.env.example b/.env.example index cfff1dd..9352353 100644 --- a/.env.example +++ b/.env.example @@ -3,4 +3,5 @@ ENV= CONFIGURED=false SESSION_KEY= HTTP_VALIDATION_KEY= -HTTP_ENCRYPTION_KEY= \ No newline at end of file +HTTP_ENCRYPTION_KEY= +LOGGGING_SENTRY_DSN=https://sentry.io/... \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa32f28..6f0cc74 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,36 +1,38 @@ -name: build +name: Build and Release + on: push: - paths-ignore: [".gitignore", "**/*.md"] - branches: [master] - tags: ["*"] + branches: + - master jobs: - docker-publish-tags: - if: contains(github.ref, 'refs/tags/v') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: elgohr/Publish-Docker-Github-Action@master - with: - name: fmcore/coreapi - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - tag_semver: true - docker-publish-latest: - if: github.ref == 'refs/heads/master' + build: runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 - - uses: elgohr/Publish-Docker-Github-Action@master + - name: Checkout code + uses: actions/checkout@v3 + + - name: Build Docker image + run: | + docker build -t myapp . + + - name: Create container and extract + run: | + mkdir -p ./app + docker create --name extract myapp + docker cp extract:/app/coreapi ./app/coreapi + docker cp extract:/app/cc ./app/cc + docker rm extract + - name: Archive release + run: tar -czvf output.tar.gz ./app + + - name: Create Release + id: create_release + uses: softprops/action-gh-release@v1 with: - name: fmcore/coreapi - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - post-to-webhook: - needs: [docker-publish-latest] - runs-on: ubuntu-latest - steps: - - run: | - set +x - curl -XPOST -H 'X-Webhook-Auth: ${{ secrets.WEBHOOK_SECRET }}' -H "Content-type: application/json" -d '{"app": "flagbrew", "service": "coreapi"}' '${{ secrets.WEBHOOK_URL }}' + tag_name: run-${{ github.run_number }}-${{ github.sha }} + name: Build ${{ github.sha }} + draft: false + prerelease: false + files: output.tar.gz diff --git a/.gitignore b/.gitignore index eee75d4..34390e2 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ tmp/ **/dist **/.env bin -coreapi \ No newline at end of file +coreapi +cc/ \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 0962950..d764982 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,15 @@ COPY . /build RUN make go-build RUN upx --best --lzma coreapi +# build-cs-release image +FROM mcr.microsoft.com/dotnet/sdk:7.0 as build-cs-release +WORKDIR /build + +COPY . /build +RUN apt-get update && apt-get install --assume-yes make +RUN make cs-build-release + + # Run image FROM python:3 RUN apt update && \ @@ -14,11 +23,11 @@ RUN apt update && \ RUN mkdir /app RUN mkdir /data -RUN mkdir /app/python +RUN mkdir /app/css COPY --from=build-go /build/coreapi /app -COPY --from=build-go /build/python /app/python COPY --from=build-go /build/start.sh /app COPY --from=build-go /build/.env.example /data/.env +COPY --from=build-cs-release /build/cc /app/cc # runtime params WORKDIR /app diff --git a/Makefile b/Makefile index 7c72b77..5d9eb4d 100644 --- a/Makefile +++ b/Makefile @@ -6,11 +6,14 @@ export PACKAGE := "github.com/FlagBrew/CoreAPI" VERSION=$(shell git describe --tags --always --abbrev=0 --match=v* 2> /dev/null | sed -r "s:^v::g" || echo 0) VERSION_FULL=$(shell git describe --tags --always --dirty --match=v* 2> /dev/null | sed -r "s:^v::g" || echo 0) +build-all: cs-build-release go-build + # General -clean: +clean: cs-clean /bin/rm -rfv ${PROJECT} + # Docker docker: docker compose \ @@ -36,9 +39,21 @@ docker-build: --force-rm . -# Python -python-fetch: - python3 -m pip install -r python/requirements.txt +# CSharp + +cs-build-release: + cd coreconsole && \ + dotnet build coreconsole.csproj -c Release -o ../cc && \ + cp data ../cc/data -r + + +cs-build-debug: + cd coreconsole && \ + dotnet build coreconsole.csproj -c Debug -o ../cc && \ + cp data ../cc/data -r + +cs-clean: + /bin/rm -rfv cc # Go go-fetch: diff --git a/coreconsole/.gitignore b/coreconsole/.gitignore new file mode 100644 index 0000000..c6cc67a --- /dev/null +++ b/coreconsole/.gitignore @@ -0,0 +1,34 @@ +# Common IntelliJ Platform excludes + +# User specific +**/.idea/**/workspace.xml +**/.idea/**/tasks.xml +**/.idea/shelf/* +**/.idea/dictionaries +**/.idea/httpRequests/ + +# Sensitive or high-churn files +**/.idea/**/dataSources/ +**/.idea/**/dataSources.ids +**/.idea/**/dataSources.xml +**/.idea/**/dataSources.local.xml +**/.idea/**/sqlDataSources.xml +**/.idea/**/dynamic.xml + +# Rider +# Rider auto-generates .iml files, and contentModel.xml +**/.idea/**/*.iml +**/.idea/**/contentModel.xml +**/.idea/**/modules.xml + +*.suo +*.user +.vs/ +[Bb]in/ +[Oo]bj/ +_UpgradeReport_Files/ +[Pp]ackages/ + +Thumbs.db +Desktop.ini +.DS_Store \ No newline at end of file diff --git a/coreconsole/.idea/.idea.coreconsole/.idea/.gitignore b/coreconsole/.idea/.idea.coreconsole/.idea/.gitignore new file mode 100644 index 0000000..414fcab --- /dev/null +++ b/coreconsole/.idea/.idea.coreconsole/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/contentModel.xml +/.idea.coreconsole.iml +/modules.xml +/projectSettingsUpdater.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/coreconsole/.idea/.idea.coreconsole/.idea/encodings.xml b/coreconsole/.idea/.idea.coreconsole/.idea/encodings.xml new file mode 100644 index 0000000..df87cf9 --- /dev/null +++ b/coreconsole/.idea/.idea.coreconsole/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/coreconsole/.idea/.idea.coreconsole/.idea/indexLayout.xml b/coreconsole/.idea/.idea.coreconsole/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/coreconsole/.idea/.idea.coreconsole/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/coreconsole/.idea/.idea.coreconsole/.idea/vcs.xml b/coreconsole/.idea/.idea.coreconsole/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/coreconsole/.idea/.idea.coreconsole/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/coreconsole/Program.cs b/coreconsole/Program.cs new file mode 100644 index 0000000..a428db6 --- /dev/null +++ b/coreconsole/Program.cs @@ -0,0 +1,77 @@ +// See https://aka.ms/new-console-template for more information + +using System.CommandLine; +using System.Text.Json; +using coreconsole.handlers; +using coreconsole.utils; +using PKHeX.Core; +using Sentry; +using Version = coreconsole.Models.Version; + +namespace coreconsole; + +public static class MainClass +{ + public static void Main(string[] args) + { + if (!Helpers.LoadEnv()) Environment.Exit((int)enums.ExitCode.EnvNotConfigured); + + using (SentrySdk.Init(o => { o.Dsn = Environment.GetEnvironmentVariable("SENTRY_DSN"); })) + { + var pokemonArg = new Argument( + "pokemon", + "The pokemon file (in base64 format)." + ); + + var generationOption = new Option( + "--generation", + "Used to determine desired generation when generation could be 6/7 or 8/8b" + ); + + var cmd1 = new Command("summary", "Returns the summary for a given pokemon.") + { + pokemonArg, + generationOption + }; + cmd1.SetHandler(Summary.SummaryHandler, pokemonArg, generationOption); + + var cmd2 = new Command("legality", "Returns the legality status for a Pokemon, including what checks fail.") + { + pokemonArg, + generationOption + }; + + cmd2.SetHandler(Legality.LegalityCheckHandler, pokemonArg, generationOption); + + var legalizationGenerationOverride = new Option("--legalization-generation", + "Forces the legalized Pokemon to use the provided generation (may cause legalization to fail)."); + + var legalizationGameVersionOverride = new Option("--version", + "Game Version to use in trying to legalize the Pokemon (may cause legalization to fail)."); + + var cmd3 = new Command("legalize", "Attempts to auto legalize a pokemon and returns it if successful.") + { + pokemonArg, + generationOption, + legalizationGenerationOverride, + legalizationGameVersionOverride + }; + cmd3.SetHandler(Legality.LegalizeHandler, pokemonArg, generationOption, + legalizationGenerationOverride, legalizationGameVersionOverride); + + var cmd4 = new Command("version", "Returns the version for ALM/PKHeX"); + cmd4.SetHandler(() => { Console.WriteLine(JsonSerializer.Serialize(new Version())); }); + + var cli = new RootCommand("CoreConsole - a tool for interacting with PKHeX and Auto Legality via CLI.") + { + cmd1, + cmd2, + cmd3, + cmd4 + }; + cli.Invoke(args); + } + + Environment.Exit((int)enums.ExitCode.Success); + } +} \ No newline at end of file diff --git a/coreconsole/Tests/AutoLegalityTest.cs b/coreconsole/Tests/AutoLegalityTest.cs new file mode 100644 index 0000000..4a3f59e --- /dev/null +++ b/coreconsole/Tests/AutoLegalityTest.cs @@ -0,0 +1,33 @@ +using coreconsole.handlers; +using coreconsole.utils; +using PKHeX.Core; + +namespace Tests; + +[TestFixture] +public class AutoLegalityTest +{ + [SetUp] + public void Setup() + { + Helpers.Init(); + } + + [Test] + public void CanAutoLegalizePokemon() + { + const string pkmnHex = + "1a9b12b00000701626020000537e0c70d8000000467800020000000000000000000000000000000021003700fd00000023190a0000000000b9227415000000000a13000000000000420061007300630075006c0069006e00ffff0000ffff001400000000000000004400650073006d0075006e006400ffff00000017021000000e00000406000000"; + + var pkmnBytes = Helpers.StringToByteArray(pkmnHex); + var pkmn = EntityFormat.GetFromBytes(pkmnBytes); + Assert.That(pkmn, Is.Not.Null); + // Check the legality first + var legalityReport = Legality.CheckLegality(pkmn!); + Assert.That(legalityReport.Valid, Is.False); + + // Now try to auto legalize + var pokemon = Legality.AutoLegalize(pkmn!); + Assert.That(pokemon, Is.Not.Null); + } +} \ No newline at end of file diff --git a/coreconsole/Tests/SummaryTest.cs b/coreconsole/Tests/SummaryTest.cs new file mode 100644 index 0000000..0769235 --- /dev/null +++ b/coreconsole/Tests/SummaryTest.cs @@ -0,0 +1,54 @@ +using System.Text.Json; +using coreconsole.handlers; +using coreconsole.Models; +using coreconsole.utils; +using PKHeX.Core; + +namespace Tests; + +[TestFixture] +public class SummaryTest +{ + [SetUp] + public void Setup() + { + Helpers.Init(); + // var a = File.ReadAllText("../../../../data/move_types.json"); + // Move.MoveTypes = JsonSerializer.Deserialize>(a!); + } + + [Test] + public void CanGetPokemonSummary() + { + // Create a new Pokemon from base64 + // const string b64 = + // "Snn82gAAtK2MAgAAIuC/cRQsEABBAQAApBGMsAMABvwAAAD8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEcAdQB5AAAAcABpAG4AAAAAAAAAAAAAAAAASQCSAVkAGAEQGBAYAwMDAwAAAAAAAAAAAAD///+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADJFAHIAaQBjAAAAAAAAAAAAAAAAAAAAAAAAAIUABA46AAAAAAAWDAUAAAAKAAQFABhMCAICAAAAAAAAAABkAAAAPgE+AVgBGAGkAKUA+QAAAAAAAAA="; + // const string b64 = + // "vnSSVQAAdV6OAQAAbyBHARQsEABGFg0C/PwAAAAAAAAAAAAA//8TAHIBJABMAQAACCAgAAMDAwA/fvefAAAAAQACAAAAAAAAUwB0AGEAcgBTAGMAcgBlAGEAbQD//wAM//8PAAAAAABHAE8ATgBEAE8AUgD//wAAFwUaFwYD0AcxdQAEZAAAAA=="; + // var pkmnBytes = Convert.FromBase64String(b64); + // const string a = "0101ff0100d93e0004053c5b1f2019506404b351013101790133014001e596fc471402023e00d900b400a3004b004e83a0adadb850000000000092a7a4b1aca0ad508b8b50"; + // const string a = + // "18e9b2f800006c628a030000a1a850120b010000a800040000000000433257db03030000000006fc00fc000000000000000000000000000000000000000000000000000000000000808080000000000000000000000000005300700072006900670061007400690074006f000000000000000a0027009e022c00231e28190000000000000000000000001800ffffcf3e000000000b050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000320000000000ff02000000000000000000000000000000000000000000000000000000000000000000004d00750074006500000000000000000000000000000000000000ff00000000000000000017040405000050000485000000000000000000000000000000000000000000000000000000000000000000000700180016000e0014000a000d000000"; + // const string a = + // "9588a98f000030e5200300000f7742ced0121300e801000028e2645b000437e82d171b1b00000000000000000000000000000000000000000000000000000000cd30af30ed30ba30de3000000000000000000000000000000000d202c702980100000500000000000000000000000000000000000fab1719000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034ff2bff0eff34ff36ff0000000000000000000000000000000000000000000000000000000000000000b000044b00220102000100000000"; + // const string a = + // "0000000000008cb4cc01000000000000000000007500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e630ad30ce30aa30fc30000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000001300000000000000000000000000000000000050004b0048006500580000000000000000000000000000000000000201000000320000000000303000000000ff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101000000317504000000000000000000000000000000000000000000000000000000000000000000000001000c00060006000600060006000000"; + // const string a = + // "00000000000099aadb030000c03a8f49000000001a01000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000490072006f006e0020004c0065006100760065007300000000000100000000000000230000000000000000000000000000000c00000000000000000000130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000ff020000000000000000000000000000000000000000000000000000000000000000000050004b00480065005800000000000000000000000000000000000000000000000000000017051f000000000004000000000000000000000000000000000000000000000000000000000000000000000001000c00070006000700060007000000"; + // const string a = + // "9720a17c000080c07d01ad02acc0efa65a6202001a010000422374330c00061608070d03000000000000000000000000000000000000000000000000000000004c006100740069006f007300000000000000000000000000000013005e002701b600050505050000000000000000000000000000ffc7ff3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047007500740065006e00000000000000000000000000000000008e00051d7f01030000001501030000004001041e001b3100010700000000"; + // const string a = + // "93376e1600009bec650300009bbc892640420f00af001200000000007ad56b4f0a0a04000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000788100000000000041006c006300720065006d00690065000000000000000000000021005502ba00090323140a0f0000000021005502000000000f013ffcff370a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c000000020000000000ff00000000000000000000000000000053006c0065006500700079000000000000000000000000000000a40513001d000715071d15071d0062ea280004810000000000000000000000000000000000000000000000000000000000000000000064000f017100ba00b400000112010000"; + // const string a = + // "000000000000bef065030000f87eb53840420f00a50014000000000051f74348121204000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041006c006300720065006d006900650000000000680000000000760107019c005502102010200303030321005502000000000f01ffffff3f0a000000000000000000000000000000000000000000000050004b0048006500580000000000000000000000000000000000000201000000320000000000000000000000000000000000000000002d000000020000000000ff00000000000000000000000000000054006f006d000000580000000000000000000000000000000000000000000000001501061501060062ea4400040100000000000000000000000000000000000000000000000000000000000000000000"; + const string a = + "1a9b12b00000701626020000537e0c70d8000000467800020000000000000000000000000000000021003700fd00000023190a0000000000b9227415000000000a13000000000000420061007300630075006c0069006e00ffff0000ffff001400000000000000004400650073006d0075006e006400ffff00000017021000000e00000406000000"; + var pkmnBytes = Helpers.StringToByteArray(a); + var pkmn = EntityFormat.GetFromBytes(pkmnBytes, EntityContext.Gen3); + + // Get the summary + var summary = Summary.GetSummary(pkmn!); + + Console.WriteLine(JsonSerializer.Serialize(summary)); + } +} \ No newline at end of file diff --git a/coreconsole/Tests/Tests.csproj b/coreconsole/Tests/Tests.csproj new file mode 100644 index 0000000..4515940 --- /dev/null +++ b/coreconsole/Tests/Tests.csproj @@ -0,0 +1,23 @@ + + + + net7.0 + enable + enable + + false + + + + + + + + + + + + + + + diff --git a/coreconsole/Tests/UnitTest1.cs b/coreconsole/Tests/UnitTest1.cs new file mode 100644 index 0000000..c0540ca --- /dev/null +++ b/coreconsole/Tests/UnitTest1.cs @@ -0,0 +1,15 @@ +namespace Tests; + +public class Tests +{ + [SetUp] + public void Setup() + { + } + + [Test] + public void Test1() + { + Assert.Pass(); + } +} \ No newline at end of file diff --git a/coreconsole/Tests/Usings.cs b/coreconsole/Tests/Usings.cs new file mode 100644 index 0000000..cefced4 --- /dev/null +++ b/coreconsole/Tests/Usings.cs @@ -0,0 +1 @@ +global using NUnit.Framework; \ No newline at end of file diff --git a/coreconsole/coreconsole.csproj b/coreconsole/coreconsole.csproj new file mode 100644 index 0000000..9ebd65b --- /dev/null +++ b/coreconsole/coreconsole.csproj @@ -0,0 +1,34 @@ + + + + Exe + net7.0 + enable + enable + + + + + + + + + + + deps\PKHeX.Core.AutoMod.dll + + + + + + + + + + + + + + + + diff --git a/coreconsole/coreconsole.sln b/coreconsole/coreconsole.sln new file mode 100644 index 0000000..17bc82e --- /dev/null +++ b/coreconsole/coreconsole.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "coreconsole", "coreconsole.csproj", "{FD55452D-FF57-4BDF-A603-260ED6CEB837}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{6A4AAD0E-518C-4429-9A44-FAFC5FB5A1BD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FD55452D-FF57-4BDF-A603-260ED6CEB837}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD55452D-FF57-4BDF-A603-260ED6CEB837}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD55452D-FF57-4BDF-A603-260ED6CEB837}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD55452D-FF57-4BDF-A603-260ED6CEB837}.Release|Any CPU.Build.0 = Release|Any CPU + {6A4AAD0E-518C-4429-9A44-FAFC5FB5A1BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6A4AAD0E-518C-4429-9A44-FAFC5FB5A1BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6A4AAD0E-518C-4429-9A44-FAFC5FB5A1BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6A4AAD0E-518C-4429-9A44-FAFC5FB5A1BD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/coreconsole/data/bindings.json b/coreconsole/data/bindings.json new file mode 100644 index 0000000..15e5142 --- /dev/null +++ b/coreconsole/data/bindings.json @@ -0,0 +1,2192 @@ +{ + "abomasnow_mega": { + "file": "abomasnow-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "absol_mega": { + "file": "absol-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "aegislash_blade": { + "file": "aegislash-blade.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "aegislash_shield": { + "file": "aegislash.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "aerodactyl_mega": { + "file": "aerodactyl-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "aggron_mega": { + "file": "aggron-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "alakazam_mega": { + "file": "alakazam-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "alcremie_caramel_swirl": { + "file": "alcremie-caramel-swirl.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "alcremie_lemon_cream": { + "file": "alcremie-lemon-cream.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "alcremie_matcha_cream": { + "file": "alcremie-matcha-cream.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "alcremie_mint_cream": { + "file": "alcremie-mint-cream.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "alcremie_rainbow_swirl": { + "file": "alcremie-rainbow-swirl.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "alcremie_ruby_cream": { + "file": "alcremie-ruby-cream.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "alcremie_ruby_swirl": { + "file": "alcremie-ruby-swirl.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "alcremie_salted_cream": { + "file": "alcremie-salted-cream.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "alcremie_vanilla_cream": { + "file": "alcremie-vanilla-cream.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "altaria_mega": { + "file": "altaria-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "ampharos_mega": { + "file": "ampharos-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "araquanid_large": { + "file": "araquanid.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arcanine_hisui": { + "file": "arcanine-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arcanine_lord": { + "file": "arcanine-hisui-noble.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_???": { + "file": "arceus-unknown.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_bug": { + "file": "arceus-bug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_dark": { + "file": "arceus-dark.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_dragon": { + "file": "arceus-dragon.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_electric": { + "file": "arceus-electric.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_fairy": { + "file": "arceus-fairy.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_fighting": { + "file": "arceus-fighting.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_fire": { + "file": "arceus-fire.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_flying": { + "file": "arceus-flying.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_ghost": { + "file": "arceus-ghost.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_grass": { + "file": "arceus-grass.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_ground": { + "file": "arceus-ground.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_ice": { + "file": "arceus-ice.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_legend": { + "file": "arceus.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_poison": { + "file": "arceus-poison.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_psychic": { + "file": "arceus-psychic.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_rock": { + "file": "arceus-rock.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_steel": { + "file": "arceus-steel.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "arceus_water": { + "file": "arceus-water.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "articuno_galar": { + "file": "articuno-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "audino_mega": { + "file": "audino-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "avalugg_hisui": { + "file": "avalugg-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "avalugg_lord": { + "file": "avalugg-hisui-noble.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "banette_mega": { + "file": "banette-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "basculegion_f": { + "file": "basculegion.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "basculegion_m": { + "file": "basculegion.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "basculin_blue": { + "file": "basculin-blue-striped.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "basculin_red": { + "file": "basculin.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "basculin_white": { + "file": "basculin-white-striped.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "beedrill_mega": { + "file": "beedrill-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "blastoise_mega": { + "file": "blastoise-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "blaziken_mega": { + "file": "blaziken-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "braviary_hisui": { + "file": "braviary-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "burmy_plant": { + "file": "burmy.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "burmy_sandy": { + "file": "burmy-sandy.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "burmy_trash": { + "file": "burmy-trash.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "calyrex_ice": { + "file": "calyrex-ice-rider.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "calyrex_shadow": { + "file": "calyrex-shadow-rider.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "camerupt_mega": { + "file": "camerupt-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "castform_rainy": { + "file": "castform-rainy.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "castform_snowy": { + "file": "castform-snowy.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "castform_sunny": { + "file": "castform-sunny.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "charizard_mega_x": { + "file": "charizard-mega-x.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "charizard_mega_y": { + "file": "charizard-mega-y.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "cherrim_overcast": { + "file": "cherrim.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "cherrim_sunshine": { + "file": "cherrim-sunshine.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "corsola_galar": { + "file": "corsola-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "cramorant_gorging": { + "file": "cramorant-gorging.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "cramorant_gulping": { + "file": "cramorant-gulping.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "darmanitan_galar": { + "file": "darmanitan-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "darmanitan_galar_zen": { + "file": "darmanitan-galar-zen.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "darmanitan_standard": { + "file": "darmanitan.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "darmanitan_zen": { + "file": "darmanitan-zen.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "darumaka_galar": { + "file": "darumaka-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "decidueye_hisui": { + "file": "decidueye-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "deerling_autumn": { + "file": "deerling-autumn.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "deerling_spring": { + "file": "deerling.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "deerling_summer": { + "file": "deerling-summer.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "deerling_winter": { + "file": "deerling-winter.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "deoxys_attack": { + "file": "deoxys-attack.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "deoxys_defense": { + "file": "deoxys-defense.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "deoxys_speed": { + "file": "deoxys-speed.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "dialga_origin": { + "file": "dialga-origin.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "diancie_mega": { + "file": "diancie-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "diglett_alola": { + "file": "diglett-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "dugtrio_alola": { + "file": "dugtrio-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "eevee_starter": { + "file": "eevee-starter.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "eiscue_ice_face": { + "file": "eiscue.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "eiscue_noice_face": { + "file": "eiscue-noice.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "electrode_hisui": { + "file": "electrode-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "electrode_lord": { + "file": "electrode-hisui-noble.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "eternatus_eternamax": { + "file": "eternatus-eternamax.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "exeggutor_alola": { + "file": "exeggutor-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "farfetch\u2019d_galar": { + "file": "farfetchd-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "flab\u00e9b\u00e9_blue": { + "file": "flabebe-blue.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "flab\u00e9b\u00e9_orange": { + "file": "flabebe-orange.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "flab\u00e9b\u00e9_red": { + "file": "flabebe.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "flab\u00e9b\u00e9_white": { + "file": "flabebe-white.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "flab\u00e9b\u00e9_yellow": { + "file": "flabebe-yellow.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "floette_blue": { + "file": "floette-blue.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "floette_eternal": { + "file": "floette-eternal.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "floette_orange": { + "file": "floette-orange.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "floette_red": { + "file": "floette.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "floette_white": { + "file": "floette-white.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "floette_yellow": { + "file": "floette-yellow.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "florges_blue": { + "file": "florges-blue.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "florges_orange": { + "file": "florges-orange.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "florges_red": { + "file": "florges.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "florges_white": { + "file": "florges-white.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "florges_yellow": { + "file": "florges-yellow.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "furfrou_dandy": { + "file": "furfrou-dandy.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "furfrou_debutante": { + "file": "furfrou-debutante.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "furfrou_diamond": { + "file": "furfrou-diamond.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "furfrou_heart": { + "file": "furfrou-heart.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "furfrou_kabuki": { + "file": "furfrou-kabuki.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "furfrou_la_reine": { + "file": "furfrou-la-reine.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "furfrou_matron": { + "file": "furfrou-matron.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "furfrou_natural": { + "file": "furfrou.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "furfrou_pharaoh": { + "file": "furfrou-pharaoh.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "furfrou_star": { + "file": "furfrou-star.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "gallade_mega": { + "file": "gallade-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "garchomp_mega": { + "file": "garchomp-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "gardevoir_mega": { + "file": "gardevoir-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "gastrodon_east": { + "file": "gastrodon-east.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "gastrodon_west": { + "file": "gastrodon.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "genesect_electric": { + "file": "genesect-shock.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "genesect_fire": { + "file": "genesect-burn.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "genesect_ice": { + "file": "genesect-chill.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "genesect_water": { + "file": "genesect-douse.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "gengar_mega": { + "file": "gengar-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "geodude_alola": { + "file": "geodude-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "giratina_altered": { + "file": "giratina.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "giratina_origin": { + "file": "giratina-origin.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "glalie_mega": { + "file": "glalie-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "golem_alola": { + "file": "golem-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "goodra_hisui": { + "file": "goodra-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "gourgeist_average": { + "file": "gourgeist.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "gourgeist_large": { + "file": "gourgeist-large.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "gourgeist_small": { + "file": "gourgeist-small.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "gourgeist_super": { + "file": "gourgeist-super.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "graveler_alola": { + "file": "graveler-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "greninja_active": { + "file": "greninja.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "greninja_ash": { + "file": "greninja-ash.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "grimer_alola": { + "file": "grimer-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "groudon_primal": { + "file": "groudon-primal.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "growlithe_hisui": { + "file": "growlithe-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "gumshoos_large": { + "file": "gumshoos.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "gyarados_mega": { + "file": "gyarados-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "heracross_mega": { + "file": "heracross-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "hoopa_confined": { + "file": "hoopa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "hoopa_unbound": { + "file": "hoopa-unbound.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "houndoom_mega": { + "file": "houndoom-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "indeedee_f": { + "file": "indeedee.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "indeedee_m": { + "file": "indeedee.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "kangaskhan_mega": { + "file": "kangaskhan-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "keldeo_ordinary": { + "file": "keldeo.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "keldeo_resolute": { + "file": "keldeo-resolute.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "kleavor_lord": { + "file": "kleavor-noble.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "kommo-o_large": { + "file": "kommo-o.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "kyogre_primal": { + "file": "kyogre-primal.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "kyurem_black": { + "file": "kyurem-black.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "kyurem_white": { + "file": "kyurem-white.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "landorus_incarnate": { + "file": "landorus.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "landorus_therian": { + "file": "landorus-therian.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "latias_mega": { + "file": "latias-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "latios_mega": { + "file": "latios-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "lilligant_hisui": { + "file": "lilligant-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "lilligant_lady": { + "file": "lilligant-hisui-noble.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "linoone_galar": { + "file": "linoone-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "lopunny_mega": { + "file": "lopunny-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "lucario_mega": { + "file": "lucario-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "lurantis_large": { + "file": "lurantis.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "lycanroc_dusk": { + "file": "lycanroc-dusk.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "lycanroc_midday": { + "file": "lycanroc.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "lycanroc_midnight": { + "file": "lycanroc-midnight.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "magearna_original": { + "file": "magearna-original.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "manectric_mega": { + "file": "manectric-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "marowak_alola": { + "file": "marowak-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "marowak_large": { + "file": "marowak.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "mawile_mega": { + "file": "mawile-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "medicham_mega": { + "file": "medicham-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "meloetta_aria": { + "file": "meloetta.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "meloetta_pirouette": { + "file": "meloetta-pirouette.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "meowstic_f": { + "file": "meowstic.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "meowstic_m": { + "file": "meowstic.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "meowth_alola": { + "file": "meowth-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "meowth_galar": { + "file": "meowth-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "metagross_mega": { + "file": "metagross-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "mewtwo_mega_x": { + "file": "mewtwo-mega-x.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "mewtwo_mega_y": { + "file": "mewtwo-mega-y.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "mimikyu_*busted": { + "file": "mimikyu.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "mimikyu_busted": { + "file": "mimikyu.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "mimikyu_disguised": { + "file": "mimikyu.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "mimikyu_large": { + "file": "mimikyu.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "minior_c-blue": { + "file": "minior-blue.png", + "hasGen7Naming": true, + "hasFemale": false + }, + "minior_c-green": { + "file": "minior-green.png", + "hasGen7Naming": true, + "hasFemale": false + }, + "minior_c-indigo": { + "file": "minior-indigo.png", + "hasGen7Naming": true, + "hasFemale": false + }, + "minior_c-orange": { + "file": "minior-orange.png", + "hasGen7Naming": true, + "hasFemale": false + }, + "minior_c-red": { + "file": "minior-red.png", + "hasGen7Naming": true, + "hasFemale": false + }, + "minior_c-violet": { + "file": "minior-violet.png", + "hasGen7Naming": true, + "hasFemale": false + }, + "minior_c-yellow": { + "file": "minior-yellow.png", + "hasGen7Naming": true, + "hasFemale": false + }, + "minior_m-blue": { + "file": "minior.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "minior_m-green": { + "file": "minior.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "minior_m-indigo": { + "file": "minior.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "minior_m-orange": { + "file": "minior.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "minior_m-red": { + "file": "minior.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "minior_m-violet": { + "file": "minior.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "minior_m-yellow": { + "file": "minior.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "moltres_galar": { + "file": "moltres-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "morpeko_full_belly": { + "file": "morpeko.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "morpeko_hangry": { + "file": "morpeko-hangry.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "mothim_plant": { + "file": "mothim.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "mothim_sandy": { + "file": "mothim.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "mothim_trash": { + "file": "mothim.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "mr._mime": { + "file": "mr-mime.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "mr._mime_galar": { + "file": "mr-mime-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "muk_alola": { + "file": "muk-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "necrozma_dawn": { + "file": "necrozma-dawn.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "necrozma_dusk": { + "file": "necrozma-dusk.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "necrozma_ultra": { + "file": "necrozma-ultra.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "ninetales_alola": { + "file": "ninetales-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "oricorio_baile": { + "file": "oricorio.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "oricorio_pa\u2019u": { + "file": "oricorio-pau.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "oricorio_pom-pom": { + "file": "oricorio-pom-pom.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "oricorio_sensu": { + "file": "oricorio-sensu.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "palkia_origin": { + "file": "palkia-origin.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "persian_alola": { + "file": "persian-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "pichu_spiky": { + "file": "pichu-spiky-eared.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "pidgeot_mega": { + "file": "pidgeot-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "pikachu_alola": { + "file": "pikachu-alola-cap.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_belle": { + "file": "pikachu-belle.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_cosplay": { + "file": "pikachu-cosplay.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_hoenn": { + "file": "pikachu-hoenn-cap.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_kalos": { + "file": "pikachu-kalos-cap.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_libre": { + "file": "pikachu-libre.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_original": { + "file": "pikachu-original-cap.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_partner": { + "file": "pikachu-partner-cap.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_ph.d.": { + "file": "pikachu-phd.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_pop_star": { + "file": "pikachu-pop-star.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_rock_star": { + "file": "pikachu-rock-star.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_sinnoh": { + "file": "pikachu-sinnoh-cap.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_starter": { + "file": "pikachu-starter.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_unova": { + "file": "pikachu-unova-cap.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pikachu_world": { + "file": "pikachu-world-cap.png", + "hasGen7Naming": false, + "hasFemale": true + }, + "pinsir_mega": { + "file": "pinsir-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "polteageist_antique": { + "file": "polteageist.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "polteageist_phony": { + "file": "polteageist.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "ponyta_galar": { + "file": "ponyta-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "pumpkaboo_average": { + "file": "pumpkaboo.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "pumpkaboo_large": { + "file": "pumpkaboo-large.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "pumpkaboo_small": { + "file": "pumpkaboo-small.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "pumpkaboo_super": { + "file": "pumpkaboo-super.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "qwilfish_hisui": { + "file": "qwilfish-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "raichu_alola": { + "file": "raichu-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "rapidash_galar": { + "file": "rapidash-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "raticate_alola": { + "file": "raticate-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "raticate_large": { + "file": "raticate.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "rattata_alola": { + "file": "rattata-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "rayquaza_mega": { + "file": "rayquaza-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "ribombee_large": { + "file": "ribombee.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "rockruff_dusk": { + "file": "rockruff.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "rotom_fan": { + "file": "rotom-fan.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "rotom_frost": { + "file": "rotom-frost.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "rotom_heat": { + "file": "rotom-heat.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "rotom_mow": { + "file": "rotom-mow.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "rotom_wash": { + "file": "rotom-wash.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "sableye_mega": { + "file": "sableye-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "salamence_mega": { + "file": "salamence-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "salazzle_large": { + "file": "salazzle.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "samurott_hisui": { + "file": "samurott-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "sandshrew_alola": { + "file": "sandshrew-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "sandslash_alola": { + "file": "sandslash-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "sawsbuck_autumn": { + "file": "sawsbuck-autumn.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "sawsbuck_spring": { + "file": "sawsbuck.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "sawsbuck_summer": { + "file": "sawsbuck-summer.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "sawsbuck_winter": { + "file": "sawsbuck-winter.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_archipelago": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_continental": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_elegant": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_fancy": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_garden": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_high_plains": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_icy_snow": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_jungle": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_marine": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_meadow": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_modern": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_monsoon": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_ocean": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_pok\u00e9_ball": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_polar": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_river": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_sandstorm": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_savanna": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_sun": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scatterbug_tundra": { + "file": "scatterbug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "sceptile_mega": { + "file": "sceptile-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "scizor_mega": { + "file": "scizor-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "sharpedo_mega": { + "file": "sharpedo-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "shaymin_land": { + "file": "shaymin.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "shaymin_sky": { + "file": "shaymin-sky.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "shellos_east": { + "file": "shellos-east.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "shellos_west": { + "file": "shellos.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_bug": { + "file": "silvally-bug.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_dark": { + "file": "silvally-dark.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_dragon": { + "file": "silvally-dragon.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_electric": { + "file": "silvally-electric.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_fairy": { + "file": "silvally-fairy.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_fighting": { + "file": "silvally-fighting.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_fire": { + "file": "silvally-fire.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_flying": { + "file": "silvally-flying.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_ghost": { + "file": "silvally-ghost.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_grass": { + "file": "silvally-grass.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_ground": { + "file": "silvally-ground.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_ice": { + "file": "silvally-ice.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_poison": { + "file": "silvally-poison.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_psychic": { + "file": "silvally-psychic.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_rock": { + "file": "silvally-rock.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_steel": { + "file": "silvally-steel.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "silvally_water": { + "file": "silvally-water.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "sinistea_antique": { + "file": "sinistea.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "sinistea_phony": { + "file": "sinistea.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "sliggoo_hisui": { + "file": "sliggoo-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "slowbro_galar": { + "file": "slowbro-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "slowbro_mega": { + "file": "slowbro-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "slowking_galar": { + "file": "slowking-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "slowpoke_galar": { + "file": "slowpoke-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "sneasel_hisui": { + "file": "sneasel-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_archipelago": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_continental": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_elegant": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_fancy": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_garden": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_high_plains": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_icy_snow": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_jungle": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_marine": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_meadow": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_modern": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_monsoon": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_ocean": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_pok\u00e9_ball": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_polar": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_river": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_sandstorm": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_savanna": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_sun": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "spewpa_tundra": { + "file": "spewpa.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "steelix_mega": { + "file": "steelix-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "stunfisk_galar": { + "file": "stunfisk-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "swampert_mega": { + "file": "swampert-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "thundurus_incarnate": { + "file": "thundurus.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "thundurus_therian": { + "file": "thundurus-therian.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "togedemaru_large": { + "file": "togedemaru.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "tornadus_incarnate": { + "file": "tornadus.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "tornadus_therian": { + "file": "tornadus-therian.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "toxtricity_amped_form": { + "file": "toxtricity.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "toxtricity_low_key": { + "file": "toxtricity-low-key.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "typhlosion_hisui": { + "file": "typhlosion-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "tyranitar_mega": { + "file": "tyranitar-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_a": { + "file": "unown.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_b": { + "file": "unown-b.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_c": { + "file": "unown-c.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_d": { + "file": "unown-d.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_e": { + "file": "unown-e.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_exclamation": { + "file": "unown-exclamation.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_f": { + "file": "unown-f.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_g": { + "file": "unown-g.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_h": { + "file": "unown-h.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_i": { + "file": "unown-i.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_j": { + "file": "unown-j.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_k": { + "file": "unown-k.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_l": { + "file": "unown-l.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_m": { + "file": "unown-m.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_n": { + "file": "unown-n.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_o": { + "file": "unown-o.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_p": { + "file": "unown-p.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_q": { + "file": "unown-q.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_question": { + "file": "unown-question.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_r": { + "file": "unown-r.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_s": { + "file": "unown-s.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_t": { + "file": "unown-t.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_u": { + "file": "unown-u.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_v": { + "file": "unown-v.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_w": { + "file": "unown-w.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_x": { + "file": "unown-x.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_y": { + "file": "unown-y.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "unown_z": { + "file": "unown-z.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "urshifu_rapid_strike": { + "file": "urshifu.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "urshifu_single_strike": { + "file": "urshifu.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "venusaur_mega": { + "file": "venusaur-mega.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vikavolt_large": { + "file": "vikavolt.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_archipelago": { + "file": "vivillon-archipelago.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_continental": { + "file": "vivillon-continental.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_elegant": { + "file": "vivillon-elegant.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_fancy": { + "file": "vivillon-fancy.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_garden": { + "file": "vivillon-garden.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_high_plains": { + "file": "vivillon-high-plains.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_icy_snow": { + "file": "vivillon-icy-snow.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_jungle": { + "file": "vivillon-jungle.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_marine": { + "file": "vivillon-marine.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_meadow": { + "file": "vivillon.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_modern": { + "file": "vivillon-modern.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_monsoon": { + "file": "vivillon-monsoon.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_ocean": { + "file": "vivillon-ocean.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_pok\u00e9_ball": { + "file": "vivillon-poke-ball.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_polar": { + "file": "vivillon-polar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_river": { + "file": "vivillon-river.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_sandstorm": { + "file": "vivillon-sandstorm.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_savanna": { + "file": "vivillon-savanna.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_sun": { + "file": "vivillon-sun.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vivillon_tundra": { + "file": "vivillon-tundra.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "voltorb_hisui": { + "file": "voltorb-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "vulpix_alola": { + "file": "vulpix-alola.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "weezing_galar": { + "file": "weezing-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "wishiwashi_school": { + "file": "wishiwashi-school.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "wishiwashi_solo": { + "file": "wishiwashi.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "wormadam_plant": { + "file": "wormadam.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "wormadam_sandy": { + "file": "wormadam-sandy.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "wormadam_trash": { + "file": "wormadam-trash.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "xerneas_active": { + "file": "xerneas-active.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "xerneas_neutral": { + "file": "xerneas.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "yamask_galar": { + "file": "yamask-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zacian_crowned": { + "file": "zacian-crowned.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zacian_hero": { + "file": "zacian.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zamazenta_crowned": { + "file": "zamazenta-crowned.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zamazenta_hero": { + "file": "zamazenta.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zapdos_galar": { + "file": "zapdos-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zarude_dada": { + "file": "zarude-dada.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zigzagoon_galar": { + "file": "zigzagoon-galar.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zoroark_hisui": { + "file": "zoroark-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zorua_hisui": { + "file": "zorua-hisui.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zygarde_10%": { + "file": "zygarde-10.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zygarde_10%-c": { + "file": "zygarde-10.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zygarde_50%": { + "file": "zygarde.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zygarde_50%-c": { + "file": "zygarde.png", + "hasGen7Naming": false, + "hasFemale": false + }, + "zygarde_complete": { + "file": "zygarde-complete.png", + "hasGen7Naming": false, + "hasFemale": false + } +} \ No newline at end of file diff --git a/python/data/item-map.json b/coreconsole/data/item-map.json similarity index 100% rename from python/data/item-map.json rename to coreconsole/data/item-map.json diff --git a/coreconsole/deps/PKHeX.Core.AutoMod.dll b/coreconsole/deps/PKHeX.Core.AutoMod.dll new file mode 100644 index 0000000..370930e Binary files /dev/null and b/coreconsole/deps/PKHeX.Core.AutoMod.dll differ diff --git a/coreconsole/enums/ExitCode.cs b/coreconsole/enums/ExitCode.cs new file mode 100644 index 0000000..9070c4d --- /dev/null +++ b/coreconsole/enums/ExitCode.cs @@ -0,0 +1,10 @@ +namespace coreconsole.enums; + +public enum ExitCode: int +{ + Success = 0, + BadBase64 = 1, + Base64NotPokemon = 2, + UnknownErrorDuringBase64ToPokemon = 3, + EnvNotConfigured = 4 +} \ No newline at end of file diff --git a/coreconsole/handlers/Legality.cs b/coreconsole/handlers/Legality.cs new file mode 100644 index 0000000..3898ff8 --- /dev/null +++ b/coreconsole/handlers/Legality.cs @@ -0,0 +1,82 @@ +using System.Text.Json; +using coreconsole.Models; +using coreconsole.utils; +using PKHeX.Core; +using PKHeX.Core.AutoMod; + +namespace coreconsole.handlers; + +public static class Legality +{ + private static PKM? MainHandler(string pokemon, EntityContext? context) + { + var pkmn = Helpers.PokemonFromBase64(pokemon, context ?? EntityContext.None); + if (pkmn == null) return null; + Helpers.Init(); + + return pkmn; + } + + public static void LegalityCheckHandler(string pokemon, EntityContext? context) + { + var pkmn = MainHandler(pokemon, context); + if (pkmn == null) return; + + var la = CheckLegality(pkmn); + Console.WriteLine(JsonSerializer.Serialize(new LegalityCheckReport(la), Helpers.SerializerOptions)); + } + + public static void LegalizeHandler(string pokemon, EntityContext? context, int? generation, GameVersion? version) + { + var pkmn = MainHandler(pokemon, context); + if (pkmn == null) return; + + var report = CheckLegality(pkmn); + if (report.Valid) + { + Console.WriteLine("{\"error\": \"this pokemon is already legal!\"}"); + return; + } + var result = AutoLegalize(pkmn, generation, version); + if (result != null) + { + report = CheckLegality(result); + } + Console.WriteLine(JsonSerializer.Serialize(new AutoLegalizationResult(report, result), Helpers.SerializerOptions)); + } + + public static LegalityAnalysis CheckLegality(PKM pokemon) + { + return new LegalityAnalysis(pokemon); + } + + public static PKM? AutoLegalize(PKM pokemon, int? overriddenGeneration = null, + GameVersion? overriddenVersion = null) + { + var version = overriddenVersion ?? (Enum.TryParse(pokemon.Version.ToString(), out GameVersion parsedVersion) + ? parsedVersion + : null); + var info = _GetTrainerInfo(pokemon, version); + var regenTemplate = new RegenTemplate(pokemon, overriddenGeneration ?? info.Generation); + + var pkmn = info.GetLegalFromTemplateTimeout(pokemon, regenTemplate, out var result); + if (result != LegalizationResult.Regenerated) return null; + + pkmn.SetTrainerData(info); + + // Check if still legal + return !CheckLegality(pkmn).Valid ? null : pkmn; + } + + private static SimpleTrainerInfo _GetTrainerInfo(PKM pokemon, GameVersion? version) + { + return new SimpleTrainerInfo(version ?? GameVersion.SL) + { + OT = pokemon.OT_Name, + SID16 = pokemon.SID16, + TID16 = pokemon.TID16, + Language = pokemon.Language, + Gender = pokemon.OT_Gender + }; + } +} \ No newline at end of file diff --git a/coreconsole/handlers/Summary.cs b/coreconsole/handlers/Summary.cs new file mode 100644 index 0000000..90b69eb --- /dev/null +++ b/coreconsole/handlers/Summary.cs @@ -0,0 +1,26 @@ +using System.Text.Json; +using coreconsole.Models; +using coreconsole.utils; +using PKHeX.Core; + +namespace coreconsole.handlers; + +public class Summary +{ + public static void SummaryHandler(string pokemon, EntityContext? context) + { + var pkmn = Helpers.PokemonFromBase64(pokemon, context ?? EntityContext.None); + if (pkmn == null) return; + Helpers.Init(); + var summary = GetSummary(pkmn); + Console.WriteLine(JsonSerializer.Serialize(summary, Helpers.SerializerOptions)); + } + + public static Pokemon GetSummary(PKM pokemon) + { + var pes = new PublicEntitySummary(pokemon, GameInfo.Strings); + var pkmn = new Pokemon(pokemon, pes); + + return pkmn; + } +} \ No newline at end of file diff --git a/coreconsole/models/ContestStat.cs b/coreconsole/models/ContestStat.cs new file mode 100644 index 0000000..a10e0f2 --- /dev/null +++ b/coreconsole/models/ContestStat.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; + +namespace coreconsole.Models; + +public struct ContestStat +{ + public ContestStat(string name, int value) + { + Name = name; + Value = value; + } + + [JsonPropertyName("name")] public string Name { get; set; } + [JsonPropertyName("value")] public int Value { get; set; } +} \ No newline at end of file diff --git a/coreconsole/models/EggData.cs b/coreconsole/models/EggData.cs new file mode 100644 index 0000000..e827117 --- /dev/null +++ b/coreconsole/models/EggData.cs @@ -0,0 +1,19 @@ +using System.Text.Json.Serialization; + +namespace coreconsole.Models; + +public struct EggData +{ + [JsonPropertyName("name")] public string Name { get; set; } + [JsonPropertyName("year")] public int Year { get; set; } + [JsonPropertyName("month")] public int Month { get; set; } + [JsonPropertyName("day")] public int Day { get; set; } + + public EggData(string name, int year, int month, int day) + { + Name = name == "(None)" ? "None" : name; + Year = year; + Month = month; + Day = day; + } +} \ No newline at end of file diff --git a/coreconsole/models/Legality.cs b/coreconsole/models/Legality.cs new file mode 100644 index 0000000..a2584cc --- /dev/null +++ b/coreconsole/models/Legality.cs @@ -0,0 +1,42 @@ +using System.Text.Json.Serialization; +using PKHeX.Core; +using Sentry; + +namespace coreconsole.Models; + +public struct LegalityCheckReport +{ + [JsonPropertyName("legal")] public bool Legal { get; set; } + [JsonPropertyName("report")] public string[] Report { get; set; } + + public LegalityCheckReport(LegalityAnalysis la) + { + Legal = la.Valid; + Report = la.Report().Split("\n"); + } +} + +public struct AutoLegalizationResult +{ + [JsonPropertyName("legal")] public bool Legal { get; set; } + [JsonPropertyName("report")] public string[] Report { get; set; } + [JsonPropertyName("pokemon")] public string? PokemonBase64 { get; set; } + + public AutoLegalizationResult(LegalityAnalysis la, PKM? pokemon) + { + Legal = la.Valid; + Report = la.Report().Split("\n"); + + if (pokemon == null) return; + try + { + PokemonBase64 = Convert.ToBase64String(pokemon.SIZE_PARTY > pokemon.SIZE_STORED + ? pokemon.DecryptedPartyData + : pokemon.DecryptedBoxData); + } + catch (Exception e) + { + SentrySdk.CaptureException(e); + } + } +} \ No newline at end of file diff --git a/coreconsole/models/MetData.cs b/coreconsole/models/MetData.cs new file mode 100644 index 0000000..1651f32 --- /dev/null +++ b/coreconsole/models/MetData.cs @@ -0,0 +1,21 @@ +using System.Text.Json.Serialization; + +namespace coreconsole.Models; + +public struct MetData +{ + [JsonPropertyName("name")] public string Name { get; set; } + [JsonPropertyName("level")] public int Level { get; set; } + [JsonPropertyName("year")] public int Year { get; set; } + [JsonPropertyName("month")] public int Month { get; set; } + [JsonPropertyName("day")] public int Day { get; set; } + + public MetData(string name, int level, int year, int month, int day) + { + Name = name == "(None)" ? "None" : name; + Level = level; + Year = year; + Month = month; + Day = day; + } +} \ No newline at end of file diff --git a/coreconsole/models/Move.cs b/coreconsole/models/Move.cs new file mode 100644 index 0000000..1947b82 --- /dev/null +++ b/coreconsole/models/Move.cs @@ -0,0 +1,30 @@ +using System.Text.Json.Serialization; +using PKHeX.Core; +using Sentry; + +namespace coreconsole.Models; + +public struct Move +{ + [JsonPropertyName("name")] public string Name { get; set; } + [JsonPropertyName("type")] public string Type { get; set; } + [JsonPropertyName("pp")] public int Pp { get; set; } + [JsonPropertyName("pp_ups")] public int PpUps { get; set; } + + public Move(ushort id, string name, EntityContext context, int? pp, int? ppUps) + { + Name = id == 0 ? "None" : name; + try + { + Enum.TryParse(MoveInfo.GetType(id, context).ToString(), out MoveType type); + Type = id == 0 ? "Normal" : type.ToString(); + Pp = pp ?? MoveInfo.GetPP(context, id); + PpUps = ppUps ?? 0; + } + catch (Exception e) + { + SentrySdk.CaptureException(e); + Type = "Normal"; + } + } +} \ No newline at end of file diff --git a/coreconsole/models/Pokemon.cs b/coreconsole/models/Pokemon.cs new file mode 100644 index 0000000..a1851de --- /dev/null +++ b/coreconsole/models/Pokemon.cs @@ -0,0 +1,205 @@ +using System.Text.Json.Serialization; +using coreconsole.handlers; +using PKHeX.Core; +using Sentry; + +namespace coreconsole.Models; + +public class PublicEntitySummary : EntitySummary +{ + public PublicEntitySummary(PKM p, GameStrings strings) : base(p, strings) + { + } +} + +public struct Pokemon +{ + public Pokemon(PKM pkmn, EntitySummary summary) + { + Nickname = summary.Nickname; + Species = summary.Species; + Nature = summary.Nature; + Gender = summary.Gender; + Esv = summary.ESV; + HpType = summary.HP_Type; + Ability = summary.Ability; + HeldItem = pkmn.HeldItem == 0 ? "None" : summary.HeldItem; + Ball = summary.Ball; + Ot = summary.OT; + Version = summary.Version; + OtLang = summary.OTLang; + Ec = summary.EC; + Pid = summary.PID; + Exp = summary.EXP; + Level = summary.Level; + Markings = summary.Markings; + Ht = summary.NotOT; + AbilityNum = summary.AbilityNum; + GenderFlag = summary.GenderFlag; + FormNum = summary.Form; + PkrsStrain = summary.PKRS_Strain; + PkrsDays = summary.PKRS_Days; + FatefulEncounter = summary.FatefulEncounter; + IsEgg = summary.IsEgg; + IsNicknamed = summary.IsNicknamed; + IsShiny = summary.IsShiny; + Tid = summary.TID16; + Sid = summary.SID16; + Tsv = summary.TSV; + Checksum = summary.Checksum; + Friendship = summary.Friendship; + + Stats = new List + { + new("HP", summary.HP_IV, summary.HP_EV, summary.HP), + new("Attack", summary.ATK_IV, summary.ATK_EV, summary.ATK), + new("Defense", summary.DEF_IV, summary.DEF_EV, summary.DEF), + new("Special Attack", summary.SPA_IV, summary.SPA_EV, summary.SPA), + new("Special Defense", summary.SPD_IV, summary.SPD_EV, summary.SPD), + new("Speed", summary.SPE_IV, summary.SPE_EV, summary.SPE) + }; + + Moves = new List + { + new(pkmn.Move1, summary.Move1, pkmn.Context, pkmn.Move1_PP, pkmn.Move1_PPUps), + new(pkmn.Move2, summary.Move2, pkmn.Context, pkmn.Move2_PP, pkmn.Move2_PPUps), + new(pkmn.Move3, summary.Move3, pkmn.Context, pkmn.Move3_PP, pkmn.Move3_PPUps), + new(pkmn.Move4, summary.Move4, pkmn.Context, pkmn.Move4_PP, pkmn.Move4_PPUps) + }; + + RelearnMoves = new List + { + new(pkmn.RelearnMove1, summary.Relearn1, pkmn.Context, null, null), + new(pkmn.RelearnMove2, summary.Relearn2, pkmn.Context, null, null), + new(pkmn.RelearnMove3, summary.Relearn3, pkmn.Context, null, null), + new(pkmn.RelearnMove4, summary.Relearn4, pkmn.Context, null, null) + }; + + ContestStats = new List + { + new("Beauty", summary.Beauty), + new("Cool", summary.Cool), + new("Cute", summary.Cute), + new("Sheen", summary.Sheen), + new("Smart", summary.Smart), + new("Tough", summary.Tough) + }; + + var tmpRibbons = new List(); + RibbonInfo.GetRibbonInfo(pkmn).ForEach(info => + { + if (info.HasRibbon) tmpRibbons.Add(info.Name); + }); + + Ribbons = tmpRibbons; + MetData = new MetData(summary.MetLoc, summary.MetLevel, summary.Met_Year, summary.Met_Month, summary.Met_Day); + EggData = new EggData(summary.EggLoc, summary.Egg_Year, summary.Egg_Month, summary.Egg_Day); + try + { + OtGender = GameInfo.GenderSymbolASCII[pkmn.OT_Gender]; + } + catch (Exception e) + { + SentrySdk.CaptureException(e); + OtGender = ""; + } + DexNumber = pkmn.Species; + StoredSize = pkmn.SIZE_STORED; + PartySize = pkmn.SIZE_PARTY; + ItemNum = pkmn.HeldItem; + Generation = pkmn.Generation; + VersionNum = pkmn.Version; + try + { + Base64 = Convert.ToBase64String(PartySize > StoredSize ? pkmn.DecryptedPartyData : pkmn.DecryptedBoxData); + if (Version == "") Version = Enum.GetName(typeof(GameVersion), VersionNum) ?? "???"; + } + catch (Exception e) + { + SentrySdk.CaptureException(e); + Base64 = ""; + } + + try + { + if (Version == "") Version = Enum.GetName(typeof(GameVersion), VersionNum) ?? "???"; + } + catch (Exception e) + { + SentrySdk.CaptureException(e); + Version = ""; + } + + var legality = Legality.CheckLegality(pkmn); + + IsLegal = legality.Valid; + Report = legality.Report(); + SpriteSet = new Sprites(summary, pkmn); + } + + [JsonPropertyName("ot")] public string Ot { get; set; } + + [JsonPropertyName("sprites")] public Sprites SpriteSet { get; set; } + + [JsonPropertyName("is_legal")] public bool IsLegal { get; set; } + [JsonPropertyName("illegal_reasons")] public string Report { get; set; } + [JsonPropertyName("base64")] public string Base64 { get; set; } + + // ReSharper disable once MemberCanBePrivate.Global + [JsonPropertyName("stored_size")] public int StoredSize { get; set; } + + // ReSharper disable once MemberCanBePrivate.Global + [JsonPropertyName("party_size")] public int PartySize { get; set; } + [JsonPropertyName("egg_data")] public EggData EggData { get; set; } + [JsonPropertyName("contest_stats")] public List ContestStats { get; set; } + [JsonPropertyName("moves")] public List Moves { get; set; } + [JsonPropertyName("relearn_moves")] public List RelearnMoves { get; set; } + [JsonPropertyName("stats")] public List Stats { get; set; } + [JsonPropertyName("ribbons")] public List Ribbons { get; set; } + [JsonPropertyName("met_data")] public MetData MetData { get; set; } + [JsonPropertyName("fateful_flag")] public bool FatefulEncounter { get; set; } + [JsonPropertyName("is_egg")] public bool IsEgg { get; set; } + [JsonPropertyName("is_nicknamed")] public bool IsNicknamed { get; set; } + [JsonPropertyName("is_shiny")] public bool IsShiny { get; set; } + + [JsonPropertyName("form_num")] public byte FormNum { get; set; } + [JsonPropertyName("ability_num")] public int AbilityNum { get; set; } + [JsonPropertyName("friendship")] public int Friendship { get; set; } + [JsonPropertyName("gender_flag")] public int GenderFlag { get; set; } + [JsonPropertyName("generation")] public int Generation { get; set; } + [JsonPropertyName("item_num")] public int ItemNum { get; set; } + [JsonPropertyName("level")] public int Level { get; set; } + [JsonPropertyName("markings")] public int Markings { get; set; } + + // ReSharper disable once IdentifierTypo + [JsonPropertyName("pkrs_days")] public int PkrsDays { get; set; } + + // ReSharper disable once IdentifierTypo + [JsonPropertyName("pkrs_strain")] public int PkrsStrain { get; set; } + + // ReSharper disable once MemberCanBePrivate.Global + [JsonPropertyName("version_num")] public int VersionNum { get; set; } + [JsonPropertyName("ability")] public string Ability { get; set; } + [JsonPropertyName("ball")] public string Ball { get; set; } + [JsonPropertyName("ec")] public string Ec { get; set; } + [JsonPropertyName("esv")] public string Esv { get; set; } + [JsonPropertyName("gender")] public string Gender { get; set; } + [JsonPropertyName("held_item")] public string HeldItem { get; set; } + [JsonPropertyName("hp_type")] public string HpType { get; set; } + [JsonPropertyName("ht")] public string Ht { get; set; } + [JsonPropertyName("nature")] public string Nature { get; set; } + [JsonPropertyName("nickname")] public string Nickname { get; set; } + [JsonPropertyName("ot_gender")] public string OtGender { get; set; } + [JsonPropertyName("ot_lang")] public string OtLang { get; set; } + [JsonPropertyName("pid")] public string Pid { get; set; } + [JsonPropertyName("species")] public string Species { get; set; } + + // ReSharper disable once MemberCanBePrivate.Global + [JsonPropertyName("version")] public string Version { get; set; } + [JsonPropertyName("exp")] public uint Exp { get; set; } + [JsonPropertyName("tsv")] public uint Tsv { get; set; } + [JsonPropertyName("checksum")] public ushort Checksum { get; set; } + [JsonPropertyName("dex_number")] public ushort DexNumber { get; set; } + [JsonPropertyName("sid")] public ushort Sid { get; set; } + [JsonPropertyName("tid")] public ushort Tid { get; set; } +} \ No newline at end of file diff --git a/coreconsole/models/Sprites.cs b/coreconsole/models/Sprites.cs new file mode 100644 index 0000000..b5fd52f --- /dev/null +++ b/coreconsole/models/Sprites.cs @@ -0,0 +1,160 @@ +using System.Text.Json; +using System.Text.Json.Serialization; +using PKHeX.Core; +using Sentry; + +namespace coreconsole.Models; + +public struct Sprites +{ + private const string BaseUrl = "https://cdn.sigkill.tech/sprites/"; + + private static readonly List SpeciesWithFemaleForms = new() + { + "frillish", + "hippopotas", + "hippowdon", + "jellicent", + "meowstic", + "pikachu", + "pyroar", + "unfezant", + "wobbuffet", + "basculegion", + "indeedee" + }; + + private static readonly List AlcremieDecorations = new() + { + "strawberry", + "berry", + "love", + "star", + "clover", + "flower", + "ribbon" + }; + + private static readonly Dictionary ReplaceChars = new() + { + { "♀", "f" }, + { "♂", "m" }, + { "é", "e" }, + { "’", "" }, + { "'", "" }, + { ": ", "-" }, + { " ", "-" }, + { ".", "" } + }; + + public static JsonElement SpeciesBindings; + private static JsonElement _itemBindings; + private static bool _spritesLoaded; + + [JsonPropertyName("species")] public string Species { get; set; } + [JsonPropertyName("item")] public string Item { get; set; } + + public static void Init() + { + try + { + var speciesBindingsFile = File.ReadAllText("data/bindings.json"); + SpeciesBindings = JsonSerializer.Deserialize(speciesBindingsFile); + var itemBindingsFile = File.ReadAllText("data/item-map.json"); + _itemBindings = JsonSerializer.Deserialize(itemBindingsFile); + _spritesLoaded = true; + } + catch (Exception e) + { + SentrySdk.CaptureException(e); + _spritesLoaded = false; + } + } + + + public Sprites(EntitySummary summary, PKM pkmn) + { + if (!_spritesLoaded) + { + Species = ""; + Item = ""; + return; + } + + Species = ConstructSpeciesSprite(summary, pkmn); + Item = ConstructItemSprite(pkmn.HeldItem); + } + + private string ConstructSpeciesSprite(EntitySummary summary, PKM pkmn) + { + var checkBinding = true; + var species = summary.Species.ToLower(); + var forms = FormConverter.GetFormList(pkmn.Species, GameInfo.Strings.types, GameInfo.Strings.forms, + GameInfo.GenderSymbolASCII, pkmn.Context); + + var path = $"{BaseUrl}"; + + if (pkmn.Generation <= 7) + path += "pokemon-gen7x/"; + else + path += "pokemon-gen8/"; + + path += pkmn.IsShiny ? "shiny/" : "regular/"; + var form = (forms[pkmn.Form] ?? "").ToLower(); + + if (SpeciesWithFemaleForms.Contains(species) && pkmn.Gender == 2) + { + path += "female/"; + + if (species == "pikachu" && form == "normal") checkBinding = false; + } + + if (form == "") checkBinding = false; + + if (checkBinding) + { + if (SpeciesBindings.TryGetProperty($"{species.Replace(" ", "_")}_{form.Replace(" ", "_")}", + out var binding)) + { + if (species == "alcremie" && pkmn is IFormArgument ifo) + { + try + { + if (!Enum.TryParse(ifo.FormArgument.ToString(), out AlcremieDecoration dec)) return ""; + var name = Enum.GetName(dec)!.ToLower(); + if (!binding.TryGetProperty("file", out var file)) return ""; + path += $"{file.GetString()!.Replace(".png", $"-{name}.png")}"; + } + catch (Exception e) + { + SentrySdk.CaptureException(e); + } + } + else + { + path += $"{binding.GetProperty("file").GetString()}"; + } + + return path; + } + + ; + return $"{path}{species}.png"; + } + + species = ReplaceChars.Aggregate(species, (current, replace) => current.Replace(replace.Key, replace.Value)); + + + return $"{path}{species}.png"; + } + + private string ConstructItemSprite(int item) + { + if (item == 0) return ""; + + if (!_itemBindings.TryGetProperty($"item_{item.ToString().PadLeft(4, '0')}", out var path)) return ""; + ; + + return $"{BaseUrl}items/{path.GetString()}.png"; + } +} \ No newline at end of file diff --git a/coreconsole/models/Stat.cs b/coreconsole/models/Stat.cs new file mode 100644 index 0000000..d98edba --- /dev/null +++ b/coreconsole/models/Stat.cs @@ -0,0 +1,19 @@ +using System.Text.Json.Serialization; + +namespace coreconsole.Models; + +public struct Stat +{ + public Stat(string name, int iv, int ev, string total) + { + Name = name; + IV = iv; + EV = ev; + Total = total; + } + + [JsonPropertyName("name")] public string Name { get; set; } + [JsonPropertyName("iv")] public int IV { get; set; } + [JsonPropertyName("ev")] public int EV { get; set; } + [JsonPropertyName("total")] public string Total { get; set; } +} \ No newline at end of file diff --git a/coreconsole/models/Version.cs b/coreconsole/models/Version.cs new file mode 100644 index 0000000..d857d20 --- /dev/null +++ b/coreconsole/models/Version.cs @@ -0,0 +1,17 @@ +using System.Text.Json.Serialization; + +namespace coreconsole.Models; + +public struct Version +{ + [JsonPropertyName("alm_version")] + public string? AlmVersion { get; set; } + [JsonPropertyName("pkhex_version")] + public string? PkHeXVersion { get; set; } + + public Version() + { + AlmVersion = PKHeX.Core.AutoMod.ALMVersion.Versions.AlmVersionCurrent?.ToString(); + PkHeXVersion = PKHeX.Core.AutoMod.ALMVersion.Versions.CoreVersionLatest?.ToString(); + } +} \ No newline at end of file diff --git a/coreconsole/utils/Helpers.cs b/coreconsole/utils/Helpers.cs new file mode 100644 index 0000000..5490cdb --- /dev/null +++ b/coreconsole/utils/Helpers.cs @@ -0,0 +1,79 @@ +using System.Text.Json; +using coreconsole.Models; +using PKHeX.Core; +using Sentry; + +namespace coreconsole.utils; + +public static class Helpers +{ + public static JsonSerializerOptions? SerializerOptions; + + // Used for tests + public static byte[] StringToByteArray(string hex) + { + return Enumerable.Range(0, hex.Length) + .Where(x => x % 2 == 0) + .Select(x => Convert.ToByte(hex.Substring(x, 2), 16)) + .ToArray(); + } + + public static void Init() + { + EncounterEvent.RefreshMGDB(string.Empty); + RibbonStrings.ResetDictionary(GameInfo.Strings.ribbons); + Sprites.Init(); + + SerializerOptions = new JsonSerializerOptions + { + Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping + }; + } + + public static PKM PokemonFromBase64(string pokemon, EntityContext context = EntityContext.None) + { + try + { + var pkmnStrBytes = Convert.FromBase64String(pokemon); + + var pkmn = EntityFormat.GetFromBytes(pkmnStrBytes, context); + + if (pkmn is not null) return pkmn; + Console.Error.WriteLine("{\"error\": \"base64 is not a pokemon\"}"); + SentrySdk.CaptureMessage(level: SentryLevel.Error, message: "base64 provided is not a pokemon"); + Environment.Exit((int)enums.ExitCode.Base64NotPokemon); + } + catch (Exception e) when (e is FormatException or ArgumentNullException) + { + Console.Error.WriteLine("{\"error\": \"invalid base64 string provided\"}"); + SentrySdk.CaptureException(e); + Environment.Exit((int)enums.ExitCode.BadBase64); + } + catch (Exception e) when (e is not FormatException and not ArgumentNullException) + { + SentrySdk.CaptureException(e); + Environment.Exit((int)enums.ExitCode.UnknownErrorDuringBase64ToPokemon); + } + + return null; + } + + public static bool LoadEnv() + { + if (!File.Exists(".env")) + { + Console.Error.WriteLine(".env is missing"); + return false; + } + + foreach (var line in File.ReadAllLines(".env")) + { + var parts = line.Split("="); + if (parts.Length != 2) continue; + + Environment.SetEnvironmentVariable(parts[0], parts[1]); + } + + return true; + } +} \ No newline at end of file diff --git a/go.mod b/go.mod index 7750da7..94fea8e 100644 --- a/go.mod +++ b/go.mod @@ -1,49 +1,51 @@ module github.com/FlagBrew/CoreAPI -go 1.19 +go 1.20 require ( github.com/apex/log v1.9.0 - github.com/go-chi/chi/v5 v5.0.7 - github.com/go-chi/httprate v0.7.0 - github.com/lrstanley/chix v0.0.0-20221102040401-cd09b32313cc - github.com/lrstanley/clix v0.0.0-20220918173828-afa1308b68ae + github.com/getsentry/sentry-go v0.21.0 + github.com/go-chi/chi/v5 v5.0.8 + github.com/go-chi/httprate v0.7.4 + github.com/lrstanley/chix v1.0.0 + github.com/lrstanley/clix v1.0.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/fatih/color v1.13.0 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/fatih/color v1.15.0 // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-playground/form/v4 v4.2.0 // indirect - github.com/go-playground/locales v0.14.0 // indirect - github.com/go-playground/universal-translator v0.18.0 // indirect - github.com/go-playground/validator/v10 v10.11.1 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/gookit/color v1.5.2 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.14.1 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/gookit/color v1.5.3 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/securecookie v1.1.1 // indirect github.com/gorilla/sessions v1.2.1 // indirect github.com/jessevdk/go-flags v1.5.0 // indirect - github.com/joho/godotenv v1.4.0 // indirect - github.com/leodido/go-urn v1.2.1 // indirect - github.com/lrstanley/go-bogon v0.0.0-20220507183221-362a880cf97b // indirect - github.com/markbates/goth v1.74.2 // indirect + github.com/joho/godotenv v1.5.1 // indirect + github.com/leodido/go-urn v1.2.4 // indirect + github.com/lrstanley/go-bogon v1.0.0 // indirect + github.com/markbates/goth v1.77.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.13.0 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/client_golang v1.15.1 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect - golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect - golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect - golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect - golang.org/x/sync v0.0.0-20220907140024-f12130a52804 // indirect - golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/crypto v0.9.0 // indirect + golang.org/x/net v0.10.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/sync v0.2.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/text v0.9.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/protobuf v1.30.0 // indirect ) diff --git a/go.sum b/go.sum index b5a025e..a5c1c50 100644 --- a/go.sum +++ b/go.sum @@ -34,11 +34,6 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0= github.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA= github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= @@ -46,20 +41,16 @@ github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -70,38 +61,35 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8= -github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= -github.com/go-chi/httprate v0.7.0 h1:8W0dF7Xa2Duz2p8ncGaehIphrxQGNlOtoGY0+NRRfjQ= -github.com/go-chi/httprate v0.7.0/go.mod h1:6GOYBSwnpra4CQfAKXu8sQZg+nZ0M1g9QnyFvxrAB8A= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= +github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0= +github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/httprate v0.7.4 h1:a2GIjv8he9LRf3712zxxnRdckQCm7I8y8yQhkJ84V6M= +github.com/go-chi/httprate v0.7.4/go.mod h1:6GOYBSwnpra4CQfAKXu8sQZg+nZ0M1g9QnyFvxrAB8A= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/form/v4 v4.2.0 h1:N1wh+Goz61e6w66vo8vJkQt+uwZSoLz50kZPJWR8eic= github.com/go-playground/form/v4 v4.2.0/go.mod h1:q1a2BY+AQUUzhl6xA/6hBetay6dEIhMHjgvJiGo6K7U= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= -github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.14.1 h1:9c50NUPC30zyuKprjL3vNZ0m5oG+jU0zvx4AqHGnv4k= +github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/goccy/go-json v0.9.6/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -127,10 +115,9 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -141,10 +128,8 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -159,8 +144,8 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gookit/color v1.5.2 h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI= -github.com/gookit/color v1.5.2/go.mod h1:w8h4bGiHeeBpvQVePTutdbERIUf3oJE5lZ8HM0UgXyg= +github.com/gookit/color v1.5.3 h1:twfIhZs4QLCtimkP7MOxlF3A0U/5cDPseRT9M/+2SCE= +github.com/gookit/color v1.5.3/go.mod h1:NUzwzeehUfl7GIb36pqId+UGmRfQcU/WiiyTTeNjHtE= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= @@ -179,125 +164,82 @@ github.com/jarcoal/httpmock v0.0.0-20180424175123-9c70cfe4a1da/go.mod h1:ks+b9de github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= -github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lestrrat-go/backoff/v2 v2.0.8/go.mod h1:rHP/q/r9aT27n24JQLa7JhSQZCKBBOiM/uP402WwN8Y= github.com/lestrrat-go/blackmagic v1.0.0/go.mod h1:TNgH//0vYSs8VXDCfkZLgIrVTTXQELZffUV0tz3MtdQ= github.com/lestrrat-go/httpcc v1.0.0/go.mod h1:tGS/u00Vh5N6FHNkExqGGNId8e0Big+++0Gf8MBnAvE= github.com/lestrrat-go/iter v1.0.1/go.mod h1:zIdgO1mRKhn8l9vrZJZz9TUMMFbQbLeTsbqPDrJ/OJc= github.com/lestrrat-go/jwx v1.2.21/go.mod h1:9cfxnOH7G1gN75CaJP2hKGcxFEx5sPh1abRIA/ZJVh4= github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= -github.com/lrstanley/chix v0.0.0-20221102040401-cd09b32313cc h1:8nt2uQJiWCktGURF/Rkfh/Lymoiqrs+JaqJ/BBjUCKs= -github.com/lrstanley/chix v0.0.0-20221102040401-cd09b32313cc/go.mod h1:zL0W7YtpWnIBl0dkFgfOP8tCEr8o82v5Ojrcq8SjX5I= -github.com/lrstanley/clix v0.0.0-20220918173828-afa1308b68ae h1:8lmLW1TnIz+V9PSgouID62ds/hDKsZzFtm4+CXXweyQ= -github.com/lrstanley/clix v0.0.0-20220918173828-afa1308b68ae/go.mod h1:6ex+XY4Y+DBseKmAwIAn/bthe6lgzXMSqmwedqlnQ30= -github.com/lrstanley/go-bogon v0.0.0-20220507183221-362a880cf97b h1:jFRbU7IgKGjXlo1ERztns+QOlVRExiP0syyVIsP1TqU= -github.com/lrstanley/go-bogon v0.0.0-20220507183221-362a880cf97b/go.mod h1:1H1sGTRZ05IO1sQHKLAQQ34v19KrQeYg2Ix9HgJuFXQ= +github.com/lrstanley/chix v1.0.0 h1:wXbWIkqagxFMDFsSW/rPejT6C5T08Kc1VJP/qBXmf6I= +github.com/lrstanley/chix v1.0.0/go.mod h1:Ryh6hCy8+DnWuasg2aAyv2jHXecwH/9kVS/XtGZdTKE= +github.com/lrstanley/clix v1.0.0 h1:7M6MLy3OYGZuFdfbalqN/BzLYVYSy3EgtYjZSW/UY/M= +github.com/lrstanley/clix v1.0.0/go.mod h1:WO7zpfZ9s5YR5iZVLFJFdGIxVXBMpydmQN/MwN/hoSk= +github.com/lrstanley/go-bogon v1.0.0 h1:EhFN3Bu+59u9g8n+xWCzRlbSfNKqAbhsjzW8lcMrG0g= +github.com/lrstanley/go-bogon v1.0.0/go.mod h1:1H1sGTRZ05IO1sQHKLAQQ34v19KrQeYg2Ix9HgJuFXQ= github.com/markbates/going v1.0.0/go.mod h1:I6mnB4BPnEeqo85ynXIx1ZFLLbtiLHNXVgWeFO9OGOA= -github.com/markbates/goth v1.74.2 h1:bUA3UNE8PExVyvslcA4z9is62RZ14N2ZdFDpvVDrZ2U= -github.com/markbates/goth v1.74.2/go.mod h1:X6xdNgpapSENS0O35iTBBcMHoJDQDfI9bJl+APCkYMc= +github.com/markbates/goth v1.77.0 h1:s3scqnWv/Zq/a5M766V0FKsLfOdFNdh/HEkuWCKbvT8= +github.com/markbates/goth v1.77.0/go.mod h1:X6xdNgpapSENS0O35iTBBcMHoJDQDfI9bJl+APCkYMc= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mrjones/oauth v0.0.0-20180629183705-f4e24b6d100c/go.mod h1:skjdDftzkFALcuGzYSklqYd8gvat6F1gZJ4YPVbkZpM= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= +github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= @@ -305,7 +247,6 @@ github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -317,17 +258,15 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -362,7 +301,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -370,7 +308,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -389,22 +326,17 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200927032502-5d4f70055728/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 h1:zwrSfklXn0gxyLRX/aR+q6cgHbV/ItVyzbPlbA+dkAw= -golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -413,18 +345,14 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220907140024-f12130a52804 h1:0SH2R3f1b1VmIMG7BXbEZCBUu2dKmHschSmjqGUrW8A= -golang.org/x/sync v0.0.0-20220907140024-f12130a52804/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -433,9 +361,7 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -447,34 +373,25 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 h1:ohgcoMbSofXygzo6AD2I1kz3BFmW1QArPYTtwEM3UXc= -golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -606,25 +523,18 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/internal/handlers/generalhandler/handler.go b/internal/handlers/generalhandler/handler.go index 6ee3dab..e899117 100644 --- a/internal/handlers/generalhandler/handler.go +++ b/internal/handlers/generalhandler/handler.go @@ -8,6 +8,7 @@ import ( "github.com/FlagBrew/CoreAPI/internal/models" "github.com/FlagBrew/CoreAPI/internal/utils" + "github.com/getsentry/sentry-go" "github.com/go-chi/chi/v5" "github.com/lrstanley/chix" ) @@ -21,25 +22,46 @@ func NewHandler() *Handler { func (h *Handler) Route(r chi.Router) { r.Get("/ping", h.ping) + r.Get("/kuma-ping", h.kumaPing) +} + +func (h *Handler) kumaPing(w http.ResponseWriter, r *http.Request) { + chix.JSON(w, r, http.StatusOK, chix.M{ + "status": "ok", + }) } func (h *Handler) ping(w http.ResponseWriter, r *http.Request) { start := time.Now() - version, err := utils.RunCorePython("version", "potato", "", r.Context()) + version, err := utils.RunCoreConsole(r.Context(), "version", "") if err != nil { + // if error code 4, the .env is missing for coreconsole, which should only happen if I forget to set it up, meaning we can tell the user that coreconsole is currently being set-up and to try again later + if err.Error() == "CoreConsole exited with code 4" { + w.Header().Set("Content-Type", "application/json") + + chix.JSON(w, r, http.StatusServiceUnavailable, chix.M{ + "error": "CoreConsole is currently being set-up, please try again later", + }) + return + } + + // If we got here, then something went wrong but likely wasn't caught by coreconsole inside sentry so we'll deal with it here. + sentry.CaptureException(err) chix.Error(w, r, fmt.Errorf("something went wrong, please try again later")) return } v := &models.ALMVersion{} if err := json.Unmarshal([]byte(version), &v); err != nil { + sentry.CaptureException(err) chix.Error(w, r, fmt.Errorf("something went wrong, please try again later")) return } chix.JSON(w, r, 200, chix.M{ - "alm_version": v.Version, + "alm_version": v.ALMVersion, + "pkhex_version": v.PKHeXVersion, "response_time": time.Since(start).Milliseconds(), }) } diff --git a/internal/handlers/infohandler/handler.go b/internal/handlers/infohandler/handler.go index b640d73..1c953a2 100644 --- a/internal/handlers/infohandler/handler.go +++ b/internal/handlers/infohandler/handler.go @@ -1,12 +1,12 @@ package infohandler import ( - "encoding/json" "fmt" "net/http" "github.com/FlagBrew/CoreAPI/internal/models" "github.com/FlagBrew/CoreAPI/internal/utils" + "github.com/getsentry/sentry-go" "github.com/go-chi/chi/v5" "github.com/lrstanley/chix" ) @@ -31,30 +31,57 @@ func (h *Handler) getInfo(w http.ResponseWriter, r *http.Request) { // Get the pkmn in base64 pkmn, err := utils.GetPkmnFromRequest(w, r) - if chix.Error(w, r, err) { + if err != nil { + if err.Error() == "file too large" { + w.Header().Set("Content-Type", "application/json") + + chix.JSON(w, r, http.StatusRequestEntityTooLarge, chix.M{ + "error": "file too large", + }) + return + } + + chix.Error(w, r, err) + sentry.CaptureException(err) return } - // Run the core python script - output, err := utils.RunCorePython("info", pkmn, infoRequest.Generation, r.Context()) + // Run the coreconsole script + var extraArgs []string + if infoRequest.Generation != "" { + extraArgs = append(extraArgs, fmt.Sprintf("--generation=%s", infoRequest.Generation)) + } + + output, err := utils.RunCoreConsole(r.Context(), "summary", pkmn, extraArgs...) if err != nil { - if err.Error() != "exit status 1" { - chix.Error(w, r, err) + // if error code 1 or 2, the pkmn provided is invalid. + if err.Error() == "CoreConsole exited with code 1" || err.Error() == "CoreConsole exited with code 2" { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusBadRequest) + + w.Write([]byte(output)) return } - // try to parse the output as JSON - var js json.RawMessage - if json.Unmarshal([]byte(output), &js) != nil { - // this is not JSON, DO NOT RETURN THIS TO THE USER + // if error code 3, something unknown happened, but should've been captured by sentry inside coreconsole itself. + if err.Error() == "CoreConsole exited with code 3" { chix.Error(w, r, fmt.Errorf("something went wrong, please try again later")) return } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusBadRequest) + // if error code 4, the .env is missing for coreconsole, which should only happen if I forget to set it up, meaning we can tell the user that coreconsole is currently being set-up and to try again later + if err.Error() == "CoreConsole exited with code 4" { + w.Header().Set("Content-Type", "application/json") + + chix.JSON(w, r, http.StatusServiceUnavailable, chix.M{ + "error": "CoreConsole is currently being set-up, please try again later", + }) + return + } - w.Write([]byte(output)) + // If we got here, then something went wrong but likely wasn't caught by coreconsole inside sentry so we'll deal with it here. + sentry.CaptureException(err) + chix.Error(w, r, fmt.Errorf("something went wrong, please try again later")) return } // we got JSON back, so we can just write it to the response diff --git a/internal/handlers/legalityhandler/handler.go b/internal/handlers/legalityhandler/handler.go index bef2985..8e709b2 100644 --- a/internal/handlers/legalityhandler/handler.go +++ b/internal/handlers/legalityhandler/handler.go @@ -1,12 +1,12 @@ package legalityhandler import ( - "encoding/json" "fmt" "net/http" "github.com/FlagBrew/CoreAPI/internal/models" "github.com/FlagBrew/CoreAPI/internal/utils" + "github.com/getsentry/sentry-go" "github.com/go-chi/chi/v5" "github.com/lrstanley/chix" ) @@ -32,30 +32,57 @@ func (h *Handler) legalityReport(w http.ResponseWriter, r *http.Request) { // Get the pkmn in base64 pkmn, err := utils.GetPkmnFromRequest(w, r) - if chix.Error(w, r, err) { + if err != nil { + if err.Error() == "file too large" { + w.Header().Set("Content-Type", "application/json") + + chix.JSON(w, r, http.StatusRequestEntityTooLarge, chix.M{ + "error": "file too large", + }) + return + } + + chix.Error(w, r, err) + sentry.CaptureException(err) return } - // Run the core python script - output, err := utils.RunCorePython("report", pkmn, legalityReportRequest.Generation, r.Context()) + // Run the coreconsole script + var extraArgs []string + if legalityReportRequest.Generation != "" { + extraArgs = append(extraArgs, fmt.Sprintf("--generation=%s", legalityReportRequest.Generation)) + } + + output, err := utils.RunCoreConsole(r.Context(), "legality", pkmn, extraArgs...) if err != nil { - if err.Error() != "exit status 1" { - chix.Error(w, r, err) + // if error code 1 or 2, the pkmn provided is invalid. + if err.Error() == "CoreConsole exited with code 1" || err.Error() == "CoreConsole exited with code 2" { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusBadRequest) + + w.Write([]byte(output)) return } - // try to parse the output as JSON - var js json.RawMessage - if json.Unmarshal([]byte(output), &js) != nil { - // this is not JSON, DO NOT RETURN THIS TO THE USER + // if error code 3, something unknown happened, but should've been captured by sentry inside coreconsole itself. + if err.Error() == "CoreConsole exited with code 3" { chix.Error(w, r, fmt.Errorf("something went wrong, please try again later")) return } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusBadRequest) + // if error code 4, the .env is missing for coreconsole, which should only happen if I forget to set it up, meaning we can tell the user that coreconsole is currently being set-up and to try again later + if err.Error() == "CoreConsole exited with code 4" { + w.Header().Set("Content-Type", "application/json") + + chix.JSON(w, r, http.StatusServiceUnavailable, chix.M{ + "error": "CoreConsole is currently being set-up, please try again later", + }) + return + } - w.Write([]byte(output)) + // If we got here, then something went wrong but likely wasn't caught by coreconsole inside sentry so we'll deal with it here. + sentry.CaptureException(err) + chix.Error(w, r, fmt.Errorf("something went wrong, please try again later")) return } // we got JSON back, so we can just write it to the response @@ -72,30 +99,65 @@ func (h *Handler) autoLegality(w http.ResponseWriter, r *http.Request) { // Get the pkmn in base64 pkmn, err := utils.GetPkmnFromRequest(w, r) - if chix.Error(w, r, err) { + if err != nil { + if err.Error() == "file too large" { + w.Header().Set("Content-Type", "application/json") + + chix.JSON(w, r, http.StatusRequestEntityTooLarge, chix.M{ + "error": "file too large", + }) + return + } + + chix.Error(w, r, err) + sentry.CaptureException(err) return } - // Run the core python script - output, err := utils.RunCorePython("legalize", pkmn, autoLegalityRequest.Generation, r.Context()) + // Run the coreconsole script + var extraArgs []string + if autoLegalityRequest.Generation != "" { + extraArgs = append(extraArgs, fmt.Sprintf("--generation=%s", autoLegalityRequest.Generation)) + } + + if autoLegalityRequest.ForcedGeneration != "" { + extraArgs = append(extraArgs, fmt.Sprintf("--legalization-generation=%s", autoLegalityRequest.ForcedGeneration)) + } + + if autoLegalityRequest.ForcedVersion != "" { + extraArgs = append(extraArgs, fmt.Sprintf("--version=%s", autoLegalityRequest.ForcedVersion)) + } + + output, err := utils.RunCoreConsole(r.Context(), "legalize", pkmn, extraArgs...) if err != nil { - if err.Error() != "exit status 1" { - chix.Error(w, r, err) + // if error code 1 or 2, the pkmn provided is invalid. + if err.Error() == "CoreConsole exited with code 1" || err.Error() == "CoreConsole exited with code 2" { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusBadRequest) + + w.Write([]byte(output)) return } - // try to parse the output as JSON - var js json.RawMessage - if json.Unmarshal([]byte(output), &js) != nil { - // this is not JSON, DO NOT RETURN THIS TO THE USER + // if error code 3, something unknown happened, but should've been captured by sentry inside coreconsole itself. + if err.Error() == "CoreConsole exited with code 3" { chix.Error(w, r, fmt.Errorf("something went wrong, please try again later")) return } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusBadRequest) + // if error code 4, the .env is missing for coreconsole, which should only happen if I forget to set it up, meaning we can tell the user that coreconsole is currently being set-up and to try again later + if err.Error() == "CoreConsole exited with code 4" { + w.Header().Set("Content-Type", "application/json") + + chix.JSON(w, r, http.StatusServiceUnavailable, chix.M{ + "error": "CoreConsole is currently being set-up, please try again later", + }) + return + } - w.Write([]byte(output)) + // If we got here, then something went wrong but likely wasn't caught by coreconsole inside sentry so we'll deal with it here. + sentry.CaptureException(err) + chix.Error(w, r, fmt.Errorf("something went wrong, please try again later")) return } // we got JSON back, so we can just write it to the response diff --git a/internal/models/flags.go b/internal/models/flags.go index d1021ee..433a303 100644 --- a/internal/models/flags.go +++ b/internal/models/flags.go @@ -1,10 +1,10 @@ package models type Flags struct { - Configured bool `long:"configured" env:"CONFIGURED" required:"true" description:"If set to false, the web application will exit, should be set to true when everything is configured correctly"` - Env string `short:"e" long:"env" env:"ENV" required:"true" description:"The environment the program is running in: production/development"` - HTTP ConfigHTTP `group:"HTTP Server Options" namespace:"http" env-namespace:"HTTP"` - //Logging LoggingKeys `group:"Logging Options" namespace:"logging" env-namespace:"LOGGING"` + Configured bool `long:"configured" env:"CONFIGURED" required:"true" description:"If set to false, the web application will exit, should be set to true when everything is configured correctly"` + Env string `short:"e" long:"env" env:"ENV" required:"true" description:"The environment the program is running in: production/development"` + HTTP ConfigHTTP `group:"HTTP Server Options" namespace:"http" env-namespace:"HTTP"` + Logging LoggingKeys `group:"Logging Options" namespace:"logging" env-namespace:"LOGGING"` } type ConfigHTTP struct { diff --git a/internal/models/misc.go b/internal/models/misc.go index a0b872e..1bbd83c 100644 --- a/internal/models/misc.go +++ b/internal/models/misc.go @@ -1,5 +1,6 @@ package models type ALMVersion struct { - Version string `json:"alm_version"` + ALMVersion string `json:"alm_version"` + PKHeXVersion string `json:"pkhex_version"` } diff --git a/internal/models/requests.go b/internal/models/requests.go index 46affd4..5d65a75 100644 --- a/internal/models/requests.go +++ b/internal/models/requests.go @@ -1,18 +1,20 @@ package models type GetInfoRequest struct { - Generation string `json:"generation" form:"generation" query:"generation" validate:"omitempty,oneof=1 2 3 4 5 6 7 8 9 LGPE BDSP PLA"` + Generation string `json:"generation" form:"generation" query:"generation" validate:"omitempty,oneof=Gen6 Gen7 Gen8 Gen8b"` } type GetInfoRequestB64 struct { - Generation string `json:"generation" form:"generation" query:"generation" validate:"omitempty,oneof=1 2 3 4 5 6 7 8 9 LGPE BDSP PLA"` + Generation string `json:"generation" form:"generation" query:"generation" validate:"omitempty,oneof=Gen6 Gen7 Gen8 Gen8b"` Base64 string `json:"base64" form:"base64" query:"base64" validate:"required"` } type LegalityCheckRequest struct { - Generation string `json:"generation" form:"generation" query:"generation" validate:"omitempty,oneof=1 2 3 4 5 6 7 8 9 LGPE BDSP PLA"` + Generation string `json:"generation" form:"generation" query:"generation" validate:"omitempty,oneof=Gen6 Gen7 Gen8 Gen8b"` } type LegalizeRequest struct { - Generation string `json:"generation" form:"generation" query:"generation" validate:"omitempty,oneof=1 2 3 4 5 6 7 8 9 LGPE BDSP PLA"` + Generation string `json:"generation" form:"generation" query:"generation" validate:"omitempty,oneof=Gen6 Gen7 Gen8 Gen8b"` + ForcedGeneration string `json:"forced_generation" form:"forced_generation" query:"forced_generation" validate:"omitempty,oneof=Gen1 Gen2 Gen3 Gen4 Gen5 Gen6 Gen7 Gen7b Gen8 Gen8a Gen8b Gen9 MaxInvalid None SplitInvalid"` + ForcedVersion string `json:"forced_version" form:"forced_version" query:"forced_version" validate:"omitempty,oneof=Any AS B B2 B2W2 BATREV BD BDSP BU BW C COLO CXD D DP DPPt E FR FRLG GD GE Gen1 Gen2 Gen3 Gen4 Gen5 Gen6 Gen7 Gen7b Gen8 Gen9 GG GN GO GP GS GSC HG HGSS Invalid LG MN OR ORAS ORASDEMO P PLA Pt R RB RBY RD RS RSBOX RSE S SH SI SL SM SN SP SS Stadium Stadium2 StadiumJ SV SW SWSH UM Unknown US USUM VL W W2 X XD XY Y YW"` } diff --git a/internal/utils/python.go b/internal/utils/csharp.go similarity index 50% rename from internal/utils/python.go rename to internal/utils/csharp.go index 4787dfe..cdb95ac 100644 --- a/internal/utils/python.go +++ b/internal/utils/csharp.go @@ -8,16 +8,19 @@ import ( "syscall" ) -func RunCorePython(mode, pokemon, generation string, ctx context.Context) (string, error) { - cmd := exec.Command("python", "python/main.py", "--mode", mode, "--pkmn", pokemon) - if generation != "" { - cmd.Args = append(cmd.Args, "--generation", generation) +func RunCoreConsole(ctx context.Context, mode, pokemon string, extraArgs ...string) (string, error) { + args := []string{mode} + if pokemon != "" { + args = append(args, pokemon) } + args = append(args, extraArgs...) + cmd := exec.Command("./coreconsole", args...) + cmd.Dir = "./cc" var out bytes.Buffer - var err bytes.Buffer + var errBytes bytes.Buffer cmd.Stdout = &out - cmd.Stderr = &err + cmd.Stderr = &errBytes ch := make(chan error) go func() { @@ -25,15 +28,18 @@ func RunCorePython(mode, pokemon, generation string, ctx context.Context) (strin }() errored := false killed := false + exitCode := 0 select { case <-ctx.Done(): if err := cmd.Process.Signal(syscall.SIGINT); err != nil { - fmt.Println("failed to kill process: ", err) return "", err } killed = true case err := <-ch: if err != nil { + if exitError, ok := err.(*exec.ExitError); ok { + exitCode = exitError.ExitCode() + } errored = true } } @@ -43,7 +49,7 @@ func RunCorePython(mode, pokemon, generation string, ctx context.Context) (strin } if errored { - return err.String(), fmt.Errorf("exit status 1") + return errBytes.String(), fmt.Errorf("CoreConsole exited with code %d", exitCode) } return out.String(), nil diff --git a/main.go b/main.go index b8431e5..ffa3a65 100644 --- a/main.go +++ b/main.go @@ -2,9 +2,11 @@ package main import ( "context" + "time" "github.com/FlagBrew/CoreAPI/internal/models" "github.com/apex/log" + "github.com/getsentry/sentry-go" "github.com/lrstanley/chix" "github.com/lrstanley/clix" ) @@ -27,12 +29,16 @@ func main() { logger.Fatal("Not configured yet, please configure") } + sentry.Init(sentry.ClientOptions{ + Dsn: cli.Flags.Logging.SentryDSN, + }) + ctx := context.Background() if err := chix.RunCtx( ctx, httpServer(ctx), ); err != nil { + defer sentry.Flush(2 * time.Second) log.WithError(err).Fatal("shutting down") } - } diff --git a/python/.gitignore b/python/.gitignore deleted file mode 100644 index 2b230c2..0000000 --- a/python/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -*.pk[1-8] -*.pb8 -*.pb7 -*.pa8 -.vscode/ -.pytest_cache/ -*.pyc \ No newline at end of file diff --git a/python/Pipfile b/python/Pipfile deleted file mode 100644 index c261655..0000000 --- a/python/Pipfile +++ /dev/null @@ -1,13 +0,0 @@ -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -pythonnet = ">=3.0.0rc4" -flask = "*" - -[dev-packages] - -[requires] -python_version = "3.9" diff --git a/python/Pipfile.lock b/python/Pipfile.lock deleted file mode 100644 index 1bd29d0..0000000 --- a/python/Pipfile.lock +++ /dev/null @@ -1,215 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "6048643ee78f05476d02e33bd93ecbf36846837a3b3890ef90d3d842fb911f8e" - }, - "pipfile-spec": 6, - "requires": { - "python_version": "3.9" - }, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "cffi": { - "hashes": [ - "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5", - "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef", - "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104", - "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426", - "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405", - "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375", - "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a", - "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e", - "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc", - "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf", - "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185", - "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497", - "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3", - "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35", - "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c", - "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83", - "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21", - "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca", - "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984", - "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac", - "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd", - "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee", - "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a", - "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2", - "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192", - "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7", - "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585", - "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f", - "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e", - "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27", - "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b", - "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e", - "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e", - "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d", - "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c", - "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415", - "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82", - "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02", - "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314", - "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325", - "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c", - "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3", - "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914", - "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045", - "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d", - "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9", - "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5", - "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2", - "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c", - "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3", - "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2", - "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8", - "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d", - "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d", - "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9", - "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162", - "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76", - "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4", - "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e", - "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9", - "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6", - "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b", - "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01", - "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0" - ], - "version": "==1.15.1" - }, - "click": { - "hashes": [ - "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e", - "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48" - ], - "markers": "python_version >= '3.7'", - "version": "==8.1.3" - }, - "clr-loader": { - "hashes": [ - "sha256:911706deb35bed487ae344660092c2d7e9a36476d10d2404daf7cc7b26cbca55", - "sha256:bd1967d3cf80368c7d890a332704f169c5d2b5d7141635f1dae84d7d40346d51" - ], - "markers": "python_version >= '3.6'", - "version": "==0.1.7" - }, - "flask": { - "hashes": [ - "sha256:642c450d19c4ad482f96729bd2a8f6d32554aa1e231f4f6b4e7e5264b16cca2b", - "sha256:b9c46cc36662a7949f34b52d8ec7bb59c0d74ba08ba6cb9ce9adc1d8676d9526" - ], - "index": "pypi", - "version": "==2.2.2" - }, - "importlib-metadata": { - "hashes": [ - "sha256:637245b8bab2b6502fcbc752cc4b7a6f6243bb02b31c5c26156ad103d3d45670", - "sha256:7401a975809ea1fdc658c3aa4f78cc2195a0e019c5cbc4c06122884e9ae80c23" - ], - "markers": "python_version < '3.10'", - "version": "==4.12.0" - }, - "itsdangerous": { - "hashes": [ - "sha256:2c2349112351b88699d8d4b6b075022c0808887cb7ad10069318a8b0bc88db44", - "sha256:5dbbc68b317e5e42f327f9021763545dc3fc3bfe22e6deb96aaf1fc38874156a" - ], - "markers": "python_version >= '3.7'", - "version": "==2.1.2" - }, - "jinja2": { - "hashes": [ - "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852", - "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61" - ], - "markers": "python_version >= '3.7'", - "version": "==3.1.2" - }, - "markupsafe": { - "hashes": [ - "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003", - "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88", - "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5", - "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7", - "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a", - "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603", - "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1", - "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135", - "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247", - "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6", - "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601", - "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77", - "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02", - "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e", - "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63", - "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f", - "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980", - "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b", - "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812", - "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff", - "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96", - "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1", - "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925", - "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a", - "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6", - "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e", - "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f", - "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4", - "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f", - "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3", - "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c", - "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a", - "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417", - "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a", - "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a", - "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37", - "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452", - "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933", - "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a", - "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7" - ], - "markers": "python_version >= '3.7'", - "version": "==2.1.1" - }, - "pycparser": { - "hashes": [ - "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9", - "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206" - ], - "version": "==2.21" - }, - "pythonnet": { - "hashes": [ - "sha256:3ce22e9e021f0bbf428641d958b37009abc5387b93a6f29e986ecddf62e12189", - "sha256:af13b3698a0a548fc405562a3a3d6dbe5ebcda048f6101b60778dd7f0cb8012f" - ], - "index": "pypi", - "version": "==3.0.0rc4" - }, - "werkzeug": { - "hashes": [ - "sha256:7ea2d48322cc7c0f8b3a215ed73eabd7b5d75d0b50e31ab006286ccff9e00b8f", - "sha256:f979ab81f58d7318e064e99c4506445d60135ac5cd2e177a2de0089bfd4c9bd5" - ], - "markers": "python_version >= '3.7'", - "version": "==2.2.2" - }, - "zipp": { - "hashes": [ - "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2", - "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009" - ], - "markers": "python_version >= '3.7'", - "version": "==3.8.1" - } - }, - "develop": {} -} diff --git a/python/data/bindings.json b/python/data/bindings.json deleted file mode 100644 index b20fe8d..0000000 --- a/python/data/bindings.json +++ /dev/null @@ -1,2192 +0,0 @@ -{ - "abomasnow_mega": { - "file": "abomasnow-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "absol_mega": { - "file": "absol-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "aegislash_blade": { - "file": "aegislash-blade.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "aegislash_shield": { - "file": "aegislash.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "aerodactyl_mega": { - "file": "aerodactyl-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "aggron_mega": { - "file": "aggron-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "alakazam_mega": { - "file": "alakazam-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "alcremie_caramel_swirl": { - "file": "alcremie-caramel-swirl.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "alcremie_lemon_cream": { - "file": "alcremie-lemon-cream.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "alcremie_matcha_cream": { - "file": "alcremie-matcha-cream.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "alcremie_mint_cream": { - "file": "alcremie-mint-cream.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "alcremie_rainbow_swirl": { - "file": "alcremie-rainbow-swirl.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "alcremie_ruby_cream": { - "file": "alcremie-ruby-cream.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "alcremie_ruby_swirl": { - "file": "alcremie-ruby-swirl.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "alcremie_salted_cream": { - "file": "alcremie-salted-cream.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "alcremie_vanilla_cream": { - "file": "alcremie-vanilla-cream.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "altaria_mega": { - "file": "altaria-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "ampharos_mega": { - "file": "ampharos-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "araquanid_large": { - "file": "araquanid.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arcanine_hisui": { - "file": "arcanine-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arcanine_lord": { - "file": "arcanine-hisui-noble.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_???": { - "file": "arceus-unknown.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_bug": { - "file": "arceus-bug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_dark": { - "file": "arceus-dark.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_dragon": { - "file": "arceus-dragon.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_electric": { - "file": "arceus-electric.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_fairy": { - "file": "arceus-fairy.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_fighting": { - "file": "arceus-fighting.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_fire": { - "file": "arceus-fire.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_flying": { - "file": "arceus-flying.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_ghost": { - "file": "arceus-ghost.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_grass": { - "file": "arceus-grass.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_ground": { - "file": "arceus-ground.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_ice": { - "file": "arceus-ice.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_legend": { - "file": "arceus.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_poison": { - "file": "arceus-poison.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_psychic": { - "file": "arceus-psychic.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_rock": { - "file": "arceus-rock.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_steel": { - "file": "arceus-steel.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "arceus_water": { - "file": "arceus-water.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "articuno_galar": { - "file": "articuno-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "audino_mega": { - "file": "audino-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "avalugg_hisui": { - "file": "avalugg-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "avalugg_lord": { - "file": "avalugg-hisui-noble.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "banette_mega": { - "file": "banette-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "basculegion_f": { - "file": "basculegion.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "basculegion_m": { - "file": "basculegion.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "basculin_blue": { - "file": "basculin-blue-striped.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "basculin_red": { - "file": "basculin.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "basculin_white": { - "file": "basculin-white-striped.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "beedrill_mega": { - "file": "beedrill-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "blastoise_mega": { - "file": "blastoise-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "blaziken_mega": { - "file": "blaziken-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "braviary_hisui": { - "file": "braviary-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "burmy_plant": { - "file": "burmy.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "burmy_sandy": { - "file": "burmy-sandy.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "burmy_trash": { - "file": "burmy-trash.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "calyrex_ice": { - "file": "calyrex-ice-rider.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "calyrex_shadow": { - "file": "calyrex-shadow-rider.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "camerupt_mega": { - "file": "camerupt-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "castform_rainy": { - "file": "castform-rainy.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "castform_snowy": { - "file": "castform-snowy.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "castform_sunny": { - "file": "castform-sunny.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "charizard_mega_x": { - "file": "charizard-mega-x.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "charizard_mega_y": { - "file": "charizard-mega-y.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "cherrim_overcast": { - "file": "cherrim.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "cherrim_sunshine": { - "file": "cherrim-sunshine.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "corsola_galar": { - "file": "corsola-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "cramorant_gorging": { - "file": "cramorant-gorging.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "cramorant_gulping": { - "file": "cramorant-gulping.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "darmanitan_galar": { - "file": "darmanitan-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "darmanitan_galar_zen": { - "file": "darmanitan-galar-zen.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "darmanitan_standard": { - "file": "darmanitan.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "darmanitan_zen": { - "file": "darmanitan-zen.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "darumaka_galar": { - "file": "darumaka-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "decidueye_hisui": { - "file": "decidueye-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "deerling_autumn": { - "file": "deerling-autumn.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "deerling_spring": { - "file": "deerling.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "deerling_summer": { - "file": "deerling-summer.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "deerling_winter": { - "file": "deerling-winter.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "deoxys_attack": { - "file": "deoxys-attack.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "deoxys_defense": { - "file": "deoxys-defense.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "deoxys_speed": { - "file": "deoxys-speed.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "dialga_origin": { - "file": "dialga-origin.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "diancie_mega": { - "file": "diancie-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "diglett_alola": { - "file": "diglett-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "dugtrio_alola": { - "file": "dugtrio-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "eevee_starter": { - "file": "eevee-starter.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "eiscue_ice_face": { - "file": "eiscue.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "eiscue_noice_face": { - "file": "eiscue-noice.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "electrode_hisui": { - "file": "electrode-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "electrode_lord": { - "file": "electrode-hisui-noble.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "eternatus_eternamax": { - "file": "eternatus-eternamax.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "exeggutor_alola": { - "file": "exeggutor-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "farfetch\u2019d_galar": { - "file": "farfetchd-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "flab\u00e9b\u00e9_blue": { - "file": "flabebe-blue.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "flab\u00e9b\u00e9_orange": { - "file": "flabebe-orange.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "flab\u00e9b\u00e9_red": { - "file": "flabebe.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "flab\u00e9b\u00e9_white": { - "file": "flabebe-white.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "flab\u00e9b\u00e9_yellow": { - "file": "flabebe-yellow.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "floette_blue": { - "file": "floette-blue.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "floette_eternal": { - "file": "floette-eternal.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "floette_orange": { - "file": "floette-orange.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "floette_red": { - "file": "floette.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "floette_white": { - "file": "floette-white.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "floette_yellow": { - "file": "floette-yellow.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "florges_blue": { - "file": "florges-blue.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "florges_orange": { - "file": "florges-orange.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "florges_red": { - "file": "florges.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "florges_white": { - "file": "florges-white.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "florges_yellow": { - "file": "florges-yellow.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "furfrou_dandy": { - "file": "furfrou-dandy.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "furfrou_debutante": { - "file": "furfrou-debutante.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "furfrou_diamond": { - "file": "furfrou-diamond.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "furfrou_heart": { - "file": "furfrou-heart.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "furfrou_kabuki": { - "file": "furfrou-kabuki.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "furfrou_la_reine": { - "file": "furfrou-la-reine.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "furfrou_matron": { - "file": "furfrou-matron.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "furfrou_natural": { - "file": "furfrou.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "furfrou_pharaoh": { - "file": "furfrou-pharaoh.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "furfrou_star": { - "file": "furfrou-star.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "gallade_mega": { - "file": "gallade-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "garchomp_mega": { - "file": "garchomp-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "gardevoir_mega": { - "file": "gardevoir-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "gastrodon_east": { - "file": "gastrodon-east.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "gastrodon_west": { - "file": "gastrodon.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "genesect_electric": { - "file": "genesect-shock.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "genesect_fire": { - "file": "genesect-burn.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "genesect_ice": { - "file": "genesect-chill.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "genesect_water": { - "file": "genesect-douse.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "gengar_mega": { - "file": "gengar-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "geodude_alola": { - "file": "geodude-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "giratina_altered": { - "file": "giratina.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "giratina_origin": { - "file": "giratina-origin.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "glalie_mega": { - "file": "glalie-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "golem_alola": { - "file": "golem-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "goodra_hisui": { - "file": "goodra-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "gourgeist_average": { - "file": "gourgeist.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "gourgeist_large": { - "file": "gourgeist-large.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "gourgeist_small": { - "file": "gourgeist-small.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "gourgeist_super": { - "file": "gourgeist-super.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "graveler_alola": { - "file": "graveler-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "greninja_active": { - "file": "greninja.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "greninja_ash": { - "file": "greninja-ash.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "grimer_alola": { - "file": "grimer-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "groudon_primal": { - "file": "groudon-primal.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "growlithe_hisui": { - "file": "growlithe-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "gumshoos_large": { - "file": "gumshoos.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "gyarados_mega": { - "file": "gyarados-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "heracross_mega": { - "file": "heracross-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "hoopa_confined": { - "file": "hoopa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "hoopa_unbound": { - "file": "hoopa-unbound.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "houndoom_mega": { - "file": "houndoom-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "indeedee_f": { - "file": "indeedee.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "indeedee_m": { - "file": "indeedee.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "kangaskhan_mega": { - "file": "kangaskhan-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "keldeo_ordinary": { - "file": "keldeo.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "keldeo_resolute": { - "file": "keldeo-resolute.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "kleavor_lord": { - "file": "kleavor-noble.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "kommo-o_large": { - "file": "kommo-o.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "kyogre_primal": { - "file": "kyogre-primal.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "kyurem_black": { - "file": "kyurem-black.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "kyurem_white": { - "file": "kyurem-white.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "landorus_incarnate": { - "file": "landorus.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "landorus_therian": { - "file": "landorus-therian.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "latias_mega": { - "file": "latias-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "latios_mega": { - "file": "latios-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "lilligant_hisui": { - "file": "lilligant-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "lilligant_lady": { - "file": "lilligant-hisui-noble.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "linoone_galar": { - "file": "linoone-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "lopunny_mega": { - "file": "lopunny-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "lucario_mega": { - "file": "lucario-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "lurantis_large": { - "file": "lurantis.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "lycanroc_dusk": { - "file": "lycanroc-dusk.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "lycanroc_midday": { - "file": "lycanroc.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "lycanroc_midnight": { - "file": "lycanroc-midnight.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "magearna_original": { - "file": "magearna-original.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "manectric_mega": { - "file": "manectric-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "marowak_alola": { - "file": "marowak-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "marowak_large": { - "file": "marowak.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "mawile_mega": { - "file": "mawile-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "medicham_mega": { - "file": "medicham-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "meloetta_aria": { - "file": "meloetta.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "meloetta_pirouette": { - "file": "meloetta-pirouette.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "meowstic_f": { - "file": "meowstic.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "meowstic_m": { - "file": "meowstic.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "meowth_alola": { - "file": "meowth-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "meowth_galar": { - "file": "meowth-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "metagross_mega": { - "file": "metagross-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "mewtwo_mega_x": { - "file": "mewtwo-mega-x.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "mewtwo_mega_y": { - "file": "mewtwo-mega-y.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "mimikyu_*busted": { - "file": "mimikyu.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "mimikyu_busted": { - "file": "mimikyu.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "mimikyu_disguised": { - "file": "mimikyu.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "mimikyu_large": { - "file": "mimikyu.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "minior_c-blue": { - "file": "minior-blue.png", - "hasGen7Naming": true, - "hasFemale": false - }, - "minior_c-green": { - "file": "minior-green.png", - "hasGen7Naming": true, - "hasFemale": false - }, - "minior_c-indigo": { - "file": "minior-indigo.png", - "hasGen7Naming": true, - "hasFemale": false - }, - "minior_c-orange": { - "file": "minior-orange.png", - "hasGen7Naming": true, - "hasFemale": false - }, - "minior_c-red": { - "file": "minior-red.png", - "hasGen7Naming": true, - "hasFemale": false - }, - "minior_c-violet": { - "file": "minior-violet.png", - "hasGen7Naming": true, - "hasFemale": false - }, - "minior_c-yellow": { - "file": "minior-yellow.png", - "hasGen7Naming": true, - "hasFemale": false - }, - "minior_m-blue": { - "file": "minior.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "minior_m-green": { - "file": "minior.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "minior_m-indigo": { - "file": "minior.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "minior_m-orange": { - "file": "minior.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "minior_m-red": { - "file": "minior.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "minior_m-violet": { - "file": "minior.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "minior_m-yellow": { - "file": "minior.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "moltres_galar": { - "file": "moltres-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "morpeko_full_belly": { - "file": "morpeko.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "morpeko_hangry": { - "file": "morpeko-hangry.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "mothim_plant": { - "file": "mothim.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "mothim_sandy": { - "file": "mothim.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "mothim_trash": { - "file": "mothim.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "mr._mime": { - "file": "mr-mime.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "mr._mime_galar": { - "file": "mr-mime-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "muk_alola": { - "file": "muk-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "necrozma_dawn": { - "file": "necrozma-dawn.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "necrozma_dusk": { - "file": "necrozma-dusk.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "necrozma_ultra": { - "file": "necrozma-ultra.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "ninetales_alola": { - "file": "ninetales-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "oricorio_baile": { - "file": "oricorio.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "oricorio_pa\u2019u": { - "file": "oricorio-pau.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "oricorio_pom-pom": { - "file": "oricorio-pom-pom.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "oricorio_sensu": { - "file": "oricorio-sensu.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "palkia_origin": { - "file": "palkia-origin.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "persian_alola": { - "file": "persian-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "pichu_spiky": { - "file": "pichu-spiky-eared.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "pidgeot_mega": { - "file": "pidgeot-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "pikachu_alola": { - "file": "pikachu-alola-cap.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_belle": { - "file": "pikachu-belle.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_cosplay": { - "file": "pikachu-cosplay.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_hoenn": { - "file": "pikachu-hoenn-cap.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_kalos": { - "file": "pikachu-kalos-cap.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_libre": { - "file": "pikachu-libre.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_original": { - "file": "pikachu-original-cap.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_partner": { - "file": "pikachu-partner-cap.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_ph.d.": { - "file": "pikachu-phd.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_pop_star": { - "file": "pikachu-pop-star.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_rock_star": { - "file": "pikachu-rock-star.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_sinnoh": { - "file": "pikachu-sinnoh-cap.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_starter": { - "file": "pikachu-starter.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_unova": { - "file": "pikachu-unova-cap.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pikachu_world": { - "file": "pikachu-world-cap.png", - "hasGen7Naming": false, - "hasFemale": true - }, - "pinsir_mega": { - "file": "pinsir-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "polteageist_antique": { - "file": "polteageist.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "polteageist_phony": { - "file": "polteageist.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "ponyta_galar": { - "file": "ponyta-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "pumpkaboo_average": { - "file": "pumpkaboo.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "pumpkaboo_large": { - "file": "pumpkaboo-large.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "pumpkaboo_small": { - "file": "pumpkaboo-small.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "pumpkaboo_super": { - "file": "pumpkaboo-super.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "qwilfish_hisui": { - "file": "qwilfish-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "raichu_alola": { - "file": "raichu-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "rapidash_galar": { - "file": "rapidash-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "raticate_alola": { - "file": "raticate-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "raticate_large": { - "file": "raticate.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "rattata_alola": { - "file": "rattata-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "rayquaza_mega": { - "file": "rayquaza-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "ribombee_large": { - "file": "ribombee.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "rockruff_dusk": { - "file": "rockruff.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "rotom_fan": { - "file": "rotom-fan.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "rotom_frost": { - "file": "rotom-frost.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "rotom_heat": { - "file": "rotom-heat.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "rotom_mow": { - "file": "rotom-mow.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "rotom_wash": { - "file": "rotom-wash.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "sableye_mega": { - "file": "sableye-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "salamence_mega": { - "file": "salamence-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "salazzle_large": { - "file": "salazzle.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "samurott_hisui": { - "file": "samurott-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "sandshrew_alola": { - "file": "sandshrew-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "sandslash_alola": { - "file": "sandslash-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "sawsbuck_autumn": { - "file": "sawsbuck-autumn.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "sawsbuck_spring": { - "file": "sawsbuck.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "sawsbuck_summer": { - "file": "sawsbuck-summer.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "sawsbuck_winter": { - "file": "sawsbuck-winter.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_archipelago": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_continental": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_elegant": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_fancy": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_garden": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_high_plains": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_icy_snow": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_jungle": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_marine": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_meadow": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_modern": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_monsoon": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_ocean": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_pok\u00e9_ball": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_polar": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_river": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_sandstorm": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_savanna": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_sun": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scatterbug_tundra": { - "file": "scatterbug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "sceptile_mega": { - "file": "sceptile-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "scizor_mega": { - "file": "scizor-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "sharpedo_mega": { - "file": "sharpedo-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "shaymin_land": { - "file": "shaymin.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "shaymin_sky": { - "file": "shaymin-sky.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "shellos_east": { - "file": "shellos-east.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "shellos_west": { - "file": "shellos.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_bug": { - "file": "silvally-bug.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_dark": { - "file": "silvally-dark.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_dragon": { - "file": "silvally-dragon.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_electric": { - "file": "silvally-electric.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_fairy": { - "file": "silvally-fairy.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_fighting": { - "file": "silvally-fighting.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_fire": { - "file": "silvally-fire.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_flying": { - "file": "silvally-flying.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_ghost": { - "file": "silvally-ghost.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_grass": { - "file": "silvally-grass.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_ground": { - "file": "silvally-ground.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_ice": { - "file": "silvally-ice.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_poison": { - "file": "silvally-poison.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_psychic": { - "file": "silvally-psychic.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_rock": { - "file": "silvally-rock.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_steel": { - "file": "silvally-steel.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "silvally_water": { - "file": "silvally-water.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "sinistea_antique": { - "file": "sinistea.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "sinistea_phony": { - "file": "sinistea.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "sliggoo_hisui": { - "file": "sliggoo-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "slowbro_galar": { - "file": "slowbro-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "slowbro_mega": { - "file": "slowbro-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "slowking_galar": { - "file": "slowking-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "slowpoke_galar": { - "file": "slowpoke-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "sneasel_hisui": { - "file": "sneasel-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_archipelago": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_continental": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_elegant": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_fancy": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_garden": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_high_plains": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_icy_snow": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_jungle": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_marine": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_meadow": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_modern": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_monsoon": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_ocean": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_pok\u00e9_ball": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_polar": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_river": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_sandstorm": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_savanna": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_sun": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "spewpa_tundra": { - "file": "spewpa.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "steelix_mega": { - "file": "steelix-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "stunfisk_galar": { - "file": "stunfisk-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "swampert_mega": { - "file": "swampert-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "thundurus_incarnate": { - "file": "thundurus.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "thundurus_therian": { - "file": "thundurus-therian.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "togedemaru_large": { - "file": "togedemaru.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "tornadus_incarnate": { - "file": "tornadus.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "tornadus_therian": { - "file": "tornadus-therian.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "toxtricity_amped_form": { - "file": "toxtricity.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "toxtricity_low_key": { - "file": "toxtricity-low-key.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "typhlosion_hisui": { - "file": "typhlosion-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "tyranitar_mega": { - "file": "tyranitar-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_a": { - "file": "unown.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_b": { - "file": "unown-b.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_c": { - "file": "unown-c.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_d": { - "file": "unown-d.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_e": { - "file": "unown-e.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_exclamation": { - "file": "unown-exclamation.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_f": { - "file": "unown-f.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_g": { - "file": "unown-g.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_h": { - "file": "unown-h.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_i": { - "file": "unown-i.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_j": { - "file": "unown-j.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_k": { - "file": "unown-k.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_l": { - "file": "unown-l.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_m": { - "file": "unown-m.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_n": { - "file": "unown-n.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_o": { - "file": "unown-o.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_p": { - "file": "unown-p.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_q": { - "file": "unown-q.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_question": { - "file": "unown-question.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_r": { - "file": "unown-r.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_s": { - "file": "unown-s.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_t": { - "file": "unown-t.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_u": { - "file": "unown-u.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_v": { - "file": "unown-v.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_w": { - "file": "unown-w.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_x": { - "file": "unown-x.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_y": { - "file": "unown-y.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "unown_z": { - "file": "unown-z.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "urshifu_rapid_strike": { - "file": "urshifu.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "urshifu_single_strike": { - "file": "urshifu.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "venusaur_mega": { - "file": "venusaur-mega.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vikavolt_large": { - "file": "vikavolt.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_archipelago": { - "file": "vivillon-archipelago.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_continental": { - "file": "vivillon-continental.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_elegant": { - "file": "vivillon-elegant.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_fancy": { - "file": "vivillon-fancy.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_garden": { - "file": "vivillon-garden.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_high_plains": { - "file": "vivillon-high-plains.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_icy_snow": { - "file": "vivillon-icy-snow.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_jungle": { - "file": "vivillon-jungle.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_marine": { - "file": "vivillon-marine.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_meadow": { - "file": "vivillon.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_modern": { - "file": "vivillon-modern.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_monsoon": { - "file": "vivillon-monsoon.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_ocean": { - "file": "vivillon-ocean.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_pok\u00e9_ball": { - "file": "vivillon-poke-ball.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_polar": { - "file": "vivillon-polar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_river": { - "file": "vivillon-river.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_sandstorm": { - "file": "vivillon-sandstorm.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_savanna": { - "file": "vivillon-savanna.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_sun": { - "file": "vivillon-sun.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vivillon_tundra": { - "file": "vivillon-tundra.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "voltorb_hisui": { - "file": "voltorb-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "vulpix_alola": { - "file": "vulpix-alola.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "weezing_galar": { - "file": "weezing-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "wishiwashi_school": { - "file": "wishiwashi-school.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "wishiwashi_solo": { - "file": "wishiwashi.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "wormadam_plant": { - "file": "wormadam.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "wormadam_sandy": { - "file": "wormadam-sandy.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "wormadam_trash": { - "file": "wormadam-trash.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "xerneas_active": { - "file": "xerneas-active.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "xerneas_neutral": { - "file": "xerneas.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "yamask_galar": { - "file": "yamask-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zacian_crowned": { - "file": "zacian-crowned.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zacian_hero": { - "file": "zacian.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zamazenta_crowned": { - "file": "zamazenta-crowned.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zamazenta_hero": { - "file": "zamazenta.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zapdos_galar": { - "file": "zapdos-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zarude_dada": { - "file": "zarude-dada.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zigzagoon_galar": { - "file": "zigzagoon-galar.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zoroark_hisui": { - "file": "zoroark-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zorua_hisui": { - "file": "zorua-hisui.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zygarde_10%": { - "file": "zygarde-10.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zygarde_10%-c": { - "file": "zygarde-10.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zygarde_50%": { - "file": "zygarde.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zygarde_50%-c": { - "file": "zygarde.png", - "hasGen7Naming": false, - "hasFemale": false - }, - "zygarde_complete": { - "file": "zygarde-complete.png", - "hasGen7Naming": false, - "hasFemale": false - } -} \ No newline at end of file diff --git a/python/data/move_types.json b/python/data/move_types.json deleted file mode 100644 index ed2215d..0000000 --- a/python/data/move_types.json +++ /dev/null @@ -1,853 +0,0 @@ -{ - "0": 0, - "1": 0, - "2": 1, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 9, - "8": 14, - "9": 12, - "10": 0, - "11": 0, - "12": 0, - "13": 0, - "14": 0, - "15": 0, - "16": 2, - "17": 2, - "18": 0, - "19": 2, - "20": 0, - "21": 0, - "22": 11, - "23": 0, - "24": 1, - "25": 0, - "26": 1, - "27": 1, - "28": 4, - "29": 0, - "30": 0, - "31": 0, - "32": 0, - "33": 0, - "34": 0, - "35": 0, - "36": 0, - "37": 0, - "38": 0, - "39": 0, - "40": 3, - "41": 6, - "42": 6, - "43": 0, - "44": 16, - "45": 0, - "46": 0, - "47": 0, - "48": 0, - "49": 0, - "50": 0, - "51": 3, - "52": 9, - "53": 9, - "54": 14, - "55": 10, - "56": 10, - "57": 10, - "58": 14, - "59": 14, - "60": 13, - "61": 10, - "62": 14, - "63": 0, - "64": 2, - "65": 2, - "66": 1, - "67": 1, - "68": 1, - "69": 1, - "70": 0, - "71": 11, - "72": 11, - "73": 11, - "74": 0, - "75": 11, - "76": 11, - "77": 3, - "78": 11, - "79": 11, - "80": 11, - "81": 6, - "82": 15, - "83": 9, - "84": 12, - "85": 12, - "86": 12, - "87": 12, - "88": 5, - "89": 4, - "90": 4, - "91": 4, - "92": 3, - "93": 13, - "94": 13, - "95": 13, - "96": 13, - "97": 13, - "98": 0, - "99": 0, - "100": 13, - "101": 7, - "102": 0, - "103": 0, - "104": 0, - "105": 0, - "106": 0, - "107": 0, - "108": 0, - "109": 7, - "110": 10, - "111": 0, - "112": 13, - "113": 13, - "114": 14, - "115": 13, - "116": 0, - "117": 0, - "118": 0, - "119": 2, - "120": 0, - "121": 0, - "122": 7, - "123": 3, - "124": 3, - "125": 4, - "126": 9, - "127": 10, - "128": 10, - "129": 0, - "130": 0, - "131": 0, - "132": 0, - "133": 13, - "134": 13, - "135": 0, - "136": 1, - "137": 0, - "138": 13, - "139": 3, - "140": 0, - "141": 6, - "142": 0, - "143": 2, - "144": 0, - "145": 10, - "146": 0, - "147": 11, - "148": 0, - "149": 13, - "150": 0, - "151": 3, - "152": 10, - "153": 0, - "154": 0, - "155": 4, - "156": 13, - "157": 5, - "158": 0, - "159": 0, - "160": 0, - "161": 0, - "162": 0, - "163": 0, - "164": 0, - "165": 0, - "166": 0, - "167": 1, - "168": 16, - "169": 6, - "170": 0, - "171": 7, - "172": 9, - "173": 0, - "174": 7, - "175": 0, - "176": 0, - "177": 2, - "178": 11, - "179": 1, - "180": 7, - "181": 14, - "182": 0, - "183": 1, - "184": 0, - "185": 16, - "186": 17, - "187": 0, - "188": 3, - "189": 4, - "190": 10, - "191": 4, - "192": 12, - "193": 0, - "194": 7, - "195": 0, - "196": 14, - "197": 1, - "198": 4, - "199": 0, - "200": 15, - "201": 5, - "202": 11, - "203": 0, - "204": 17, - "205": 5, - "206": 0, - "207": 0, - "208": 0, - "209": 12, - "210": 6, - "211": 8, - "212": 0, - "213": 0, - "214": 0, - "215": 0, - "216": 0, - "217": 0, - "218": 0, - "219": 0, - "220": 0, - "221": 9, - "222": 4, - "223": 1, - "224": 6, - "225": 15, - "226": 0, - "227": 0, - "228": 16, - "229": 0, - "230": 0, - "231": 8, - "232": 8, - "233": 1, - "234": 0, - "235": 11, - "236": 17, - "237": 0, - "238": 1, - "239": 15, - "240": 10, - "241": 9, - "242": 16, - "243": 13, - "244": 0, - "245": 0, - "246": 5, - "247": 7, - "248": 13, - "249": 1, - "250": 10, - "251": 16, - "252": 0, - "253": 0, - "254": 0, - "255": 0, - "256": 0, - "257": 9, - "258": 14, - "259": 16, - "260": 16, - "261": 9, - "262": 16, - "263": 0, - "264": 1, - "265": 0, - "266": 0, - "267": 0, - "268": 12, - "269": 16, - "270": 0, - "271": 13, - "272": 13, - "273": 0, - "274": 0, - "275": 11, - "276": 1, - "277": 13, - "278": 0, - "279": 1, - "280": 1, - "281": 0, - "282": 16, - "283": 0, - "284": 9, - "285": 13, - "286": 13, - "287": 0, - "288": 7, - "289": 16, - "290": 0, - "291": 10, - "292": 1, - "293": 0, - "294": 6, - "295": 13, - "296": 13, - "297": 2, - "298": 0, - "299": 9, - "300": 4, - "301": 14, - "302": 11, - "303": 0, - "304": 0, - "305": 3, - "306": 0, - "307": 9, - "308": 10, - "309": 8, - "310": 7, - "311": 0, - "312": 11, - "313": 16, - "314": 2, - "315": 9, - "316": 0, - "317": 5, - "318": 6, - "319": 8, - "320": 11, - "321": 0, - "322": 13, - "323": 10, - "324": 6, - "325": 7, - "326": 13, - "327": 1, - "328": 4, - "329": 14, - "330": 10, - "331": 11, - "332": 2, - "333": 14, - "334": 8, - "335": 0, - "336": 0, - "337": 15, - "338": 11, - "339": 1, - "340": 2, - "341": 4, - "342": 3, - "343": 0, - "344": 12, - "345": 11, - "346": 10, - "347": 13, - "348": 11, - "349": 15, - "350": 5, - "351": 12, - "352": 10, - "353": 8, - "354": 13, - "355": 2, - "356": 13, - "357": 13, - "358": 1, - "359": 1, - "360": 8, - "361": 13, - "362": 10, - "363": 0, - "364": 0, - "365": 2, - "366": 2, - "367": 0, - "368": 8, - "369": 6, - "370": 1, - "371": 16, - "372": 16, - "373": 16, - "374": 16, - "375": 13, - "376": 0, - "377": 13, - "378": 0, - "379": 13, - "380": 3, - "381": 0, - "382": 0, - "383": 0, - "384": 13, - "385": 13, - "386": 16, - "387": 0, - "388": 11, - "389": 16, - "390": 3, - "391": 13, - "392": 10, - "393": 12, - "394": 9, - "395": 1, - "396": 1, - "397": 5, - "398": 3, - "399": 16, - "400": 16, - "401": 10, - "402": 11, - "403": 2, - "404": 6, - "405": 6, - "406": 15, - "407": 15, - "408": 5, - "409": 1, - "410": 1, - "411": 1, - "412": 11, - "413": 2, - "414": 4, - "415": 16, - "416": 0, - "417": 16, - "418": 8, - "419": 14, - "420": 14, - "421": 7, - "422": 12, - "423": 14, - "424": 9, - "425": 7, - "426": 4, - "427": 13, - "428": 13, - "429": 8, - "430": 8, - "431": 0, - "432": 2, - "433": 13, - "434": 15, - "435": 12, - "436": 9, - "437": 11, - "438": 11, - "439": 5, - "440": 3, - "441": 3, - "442": 8, - "443": 8, - "444": 5, - "445": 0, - "446": 5, - "447": 11, - "448": 2, - "449": 0, - "450": 6, - "451": 12, - "452": 11, - "453": 10, - "454": 6, - "455": 6, - "456": 6, - "457": 5, - "458": 0, - "459": 15, - "460": 15, - "461": 13, - "462": 0, - "463": 9, - "464": 16, - "465": 11, - "466": 7, - "467": 7, - "468": 16, - "469": 5, - "470": 13, - "471": 13, - "472": 13, - "473": 13, - "474": 3, - "475": 8, - "476": 6, - "477": 13, - "478": 13, - "479": 5, - "480": 1, - "481": 9, - "482": 3, - "483": 6, - "484": 8, - "485": 13, - "486": 12, - "487": 10, - "488": 9, - "489": 3, - "490": 1, - "491": 3, - "492": 16, - "493": 0, - "494": 0, - "495": 0, - "496": 0, - "497": 0, - "498": 0, - "499": 3, - "500": 13, - "501": 1, - "502": 13, - "503": 10, - "504": 0, - "505": 13, - "506": 7, - "507": 2, - "508": 8, - "509": 1, - "510": 9, - "511": 16, - "512": 2, - "513": 0, - "514": 0, - "515": 1, - "516": 0, - "517": 9, - "518": 10, - "519": 9, - "520": 11, - "521": 12, - "522": 6, - "523": 4, - "524": 14, - "525": 15, - "526": 0, - "527": 12, - "528": 12, - "529": 4, - "530": 15, - "531": 13, - "532": 11, - "533": 1, - "534": 10, - "535": 9, - "536": 11, - "537": 6, - "538": 11, - "539": 16, - "540": 13, - "541": 0, - "542": 2, - "543": 0, - "544": 8, - "545": 9, - "546": 0, - "547": 0, - "548": 1, - "549": 14, - "550": 12, - "551": 9, - "552": 9, - "553": 14, - "554": 14, - "555": 16, - "556": 14, - "557": 9, - "558": 9, - "559": 12, - "560": 1, - "561": 1, - "562": 3, - "563": 4, - "564": 6, - "565": 6, - "566": 7, - "567": 7, - "568": 0, - "569": 12, - "570": 12, - "571": 11, - "572": 11, - "573": 14, - "574": 17, - "575": 16, - "576": 16, - "577": 17, - "578": 17, - "579": 17, - "580": 11, - "581": 17, - "582": 12, - "583": 17, - "584": 17, - "585": 17, - "586": 0, - "587": 17, - "588": 8, - "589": 0, - "590": 0, - "591": 5, - "592": 10, - "593": 13, - "594": 10, - "595": 9, - "596": 11, - "597": 17, - "598": 12, - "599": 3, - "600": 6, - "601": 17, - "602": 12, - "603": 0, - "604": 12, - "605": 17, - "606": 0, - "607": 0, - "608": 17, - "609": 12, - "610": 0, - "611": 6, - "612": 1, - "613": 2, - "614": 4, - "615": 4, - "616": 4, - "617": 17, - "618": 10, - "619": 4, - "620": 2, - "621": 16, - "622": 0, - "623": 0, - "624": 1, - "625": 1, - "626": 2, - "627": 2, - "628": 3, - "629": 3, - "630": 4, - "631": 4, - "632": 5, - "633": 5, - "634": 6, - "635": 6, - "636": 7, - "637": 7, - "638": 8, - "639": 8, - "640": 9, - "641": 9, - "642": 10, - "643": 10, - "644": 11, - "645": 11, - "646": 12, - "647": 12, - "648": 13, - "649": 13, - "650": 14, - "651": 14, - "652": 15, - "653": 15, - "654": 16, - "655": 16, - "656": 17, - "657": 17, - "658": 12, - "659": 4, - "660": 6, - "661": 3, - "662": 7, - "663": 16, - "664": 10, - "665": 14, - "666": 17, - "667": 4, - "668": 11, - "669": 11, - "670": 11, - "671": 0, - "672": 3, - "673": 0, - "674": 8, - "675": 16, - "676": 6, - "677": 8, - "678": 13, - "679": 6, - "680": 9, - "681": 16, - "682": 9, - "683": 13, - "684": 8, - "685": 3, - "686": 0, - "687": 15, - "688": 11, - "689": 13, - "690": 2, - "691": 15, - "692": 15, - "693": 16, - "694": 14, - "695": 7, - "696": 16, - "697": 10, - "698": 17, - "699": 7, - "700": 12, - "701": 0, - "702": 0, - "703": 13, - "704": 9, - "705": 17, - "706": 13, - "707": 4, - "708": 7, - "709": 5, - "710": 10, - "711": 13, - "712": 7, - "713": 8, - "714": 7, - "715": 0, - "716": 12, - "717": 17, - "718": 0, - "719": 12, - "720": 9, - "721": 12, - "722": 13, - "723": 13, - "724": 8, - "725": 7, - "726": 17, - "727": 5, - "728": 15, - "729": 12, - "730": 10, - "731": 2, - "732": 12, - "733": 10, - "734": 12, - "735": 9, - "736": 13, - "737": 16, - "738": 11, - "739": 14, - "740": 17, - "741": 0, - "742": 8, - "743": 0, - "744": 15, - "745": 10, - "746": 16, - "747": 0, - "748": 1, - "749": 5, - "750": 13, - "751": 15, - "752": 0, - "753": 1, - "754": 12, - "755": 10, - "756": 0, - "757": 9, - "758": 6, - "759": 12, - "760": 0, - "761": 1, - "762": 7, - "763": 14, - "764": 3, - "765": 10, - "766": 2, - "767": 17, - "768": 15, - "769": 13, - "770": 5, - "771": 4, - "772": 16, - "773": 11, - "774": 8, - "775": 15, - "776": 1, - "777": 17, - "778": 11, - "779": 11, - "780": 9, - "781": 8, - "782": 8, - "783": 12, - "784": 15, - "785": 11, - "786": 12, - "787": 11, - "788": 11, - "789": 17, - "790": 17, - "791": 10, - "792": 16, - "793": 16, - "794": 1, - "795": 15, - "796": 8, - "797": 13, - "798": 8, - "799": 15, - "800": 5, - "801": 3, - "802": 17, - "803": 11, - "804": 12, - "805": 0, - "806": 6, - "807": 9, - "808": 16, - "809": 7, - "810": 3, - "811": 1, - "812": 10, - "813": 14, - "814": 2, - "815": 4, - "816": 11, - "817": 16, - "818": 10, - "819": 12, - "820": 15, - "821": 13, - "822": 16, - "823": 1, - "824": 14, - "825": 7, - "826": 13, - "827": 3, - "828": 13, - "829": 0, - "830": 5, - "831": 17, - "832": 13, - "833": 9, - "834": 10, - "835": 11, - "836": 14, - "837": 1, - "838": 4, - "839": 3, - "840": 13, - "841": 7, - "842": 8, - "843": 1, - "844": 7, - "845": 16, - "846": 2, - "847": 12, - "848": 4, - "849": 13, - "850": 13 -} diff --git a/python/deps/IndexRange.dll b/python/deps/IndexRange.dll deleted file mode 100644 index 450436b..0000000 Binary files a/python/deps/IndexRange.dll and /dev/null differ diff --git a/python/deps/PKHeX.Core.AutoMod.dll b/python/deps/PKHeX.Core.AutoMod.dll deleted file mode 100644 index e2fe639..0000000 Binary files a/python/deps/PKHeX.Core.AutoMod.dll and /dev/null differ diff --git a/python/deps/PKHeX.Core.dll b/python/deps/PKHeX.Core.dll deleted file mode 100755 index cd812cb..0000000 Binary files a/python/deps/PKHeX.Core.dll and /dev/null differ diff --git a/python/deps/System.Buffers.dll b/python/deps/System.Buffers.dll deleted file mode 100644 index 14e5c53..0000000 Binary files a/python/deps/System.Buffers.dll and /dev/null differ diff --git a/python/deps/System.Memory.dll b/python/deps/System.Memory.dll deleted file mode 100644 index 98f1c5d..0000000 Binary files a/python/deps/System.Memory.dll and /dev/null differ diff --git a/python/deps/System.Runtime.CompilerServices.Unsafe.dll b/python/deps/System.Runtime.CompilerServices.Unsafe.dll deleted file mode 100644 index b50dbc4..0000000 Binary files a/python/deps/System.Runtime.CompilerServices.Unsafe.dll and /dev/null differ diff --git a/python/deps/System.ValueTuple.dll b/python/deps/System.ValueTuple.dll deleted file mode 100644 index 65fa9ee..0000000 Binary files a/python/deps/System.ValueTuple.dll and /dev/null differ diff --git a/python/main.py b/python/main.py deleted file mode 100644 index dc8264b..0000000 --- a/python/main.py +++ /dev/null @@ -1,114 +0,0 @@ -# type: ignore ReportMissingImport - -import base64 -import signal -from utils.load import * -import argparse -from utils.helpers import get_pokemon_from_base64, LanguageStrings, MoveTypes -from utils.legality import legality_check, legalize, cancel -from utils.pkmn import Pokemon -from utils.sprites import Sprites -import json -import sys -from PKHeX.Core.AutoMod import ALMVersion - -language = LanguageStrings() -sprites = Sprites() -moveTypes = MoveTypes() - -def handleArgs(): - parser = argparse.ArgumentParser() - parser.add_argument('--mode', type=str, required=True, choices=['legalize', 'report', 'info', 'version'], help='The function to perform') - parser.add_argument('--pkmn', type=str, required=True, help='The base64 encoded pokemon to perform the function on') - parser.add_argument('--generation', type=str, required=False, help='The generation of the pokemon to perform the function on') - return parser.parse_args() - -def checkLegality(pkmn): - valid, report = legality_check(pkmn) - sys.stdout.write(json.dumps({ - "legal": valid, - "report": report.split("\n") - }, ensure_ascii=False)) - sys.stdout.write("\n") - sys.stdout.flush() - -def autoLegality(pkmn, generation): - valid, report = legality_check(pkmn) - if valid: - sys.stdout.write(json.dumps({"error": "this pokemon is already legal!"})) - sys.stdout.write("\n") - sys.stdout.flush() - return - - legalized = legalize(pkmn, generation) - if legalized is None: - sys.stdout.write(json.dumps({ - "legal": False, - "pokemon": None, - "report": report.split("\n") - }, ensure_ascii=False)) - sys.stdout.write("\n") - sys.stdout.flush() - return - - sys.stdout.write(json.dumps({ - "legal": True, - "pokemon": base64.b64encode(bytearray(byte for byte in legalized.DecryptedBoxData)).decode('UTF-8'), - "report": report.split("\n") - })) - sys.stdout.write("\n") - sys.stdout.flush() -def version(): - sys.stdout.write(json.dumps({ - "alm_version": ALMVersion.CurrentVersion - })) - sys.stdout.write("\n") - sys.stdout.flush() - - -def getInfo(pkmn, generation): - sys.stdout.write(Pokemon(pkmn, language, moveTypes, sprites, generation).toJSON()) - sys.stdout.write("\n") - sys.stdout.flush() - -def handleTermination(signum, frame): - cancel() - sys.exit(0) - -if __name__ == '__main__': - args = handleArgs() - - signal.signal(signal.SIGINT, handleTermination) - signal.signal(signal.SIGTERM, handleTermination) - - if args.mode == 'version': - version() - sys.exit(0) - - pkmn, error = get_pokemon_from_base64(args.pkmn, args.generation) - if error is not None: - sys.stderr.write(json.dumps(error, ensure_ascii=False)) - sys.stderr.write("\n") - sys.stderr.flush() - sys.exit(1) - - if args.mode == 'report': - result = checkLegality(pkmn) - elif args.mode == 'legalize': - try: - result = autoLegality(pkmn, args.generation) - except Exception as e: - sys.stderr.write(json.dumps({"error": "something went wrong with legalizing your Pokemon"})) - sys.stderr.write("\n") - sys.stderr.flush() - # print(e) - sys.exit(1) - elif args.mode == 'info': - try: - getInfo(pkmn, args.generation if args.generation is not None else "") - except Exception as e: - sys.stderr.write(json.dumps({"error": "something went wrong with getting info for your Pokemon"})) - sys.stderr.write("\n") - sys.stderr.flush() - # print(e) - sys.exit(1) diff --git a/python/pytest.ini b/python/pytest.ini deleted file mode 100644 index 03f586d..0000000 --- a/python/pytest.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pytest] -pythonpath = . \ No newline at end of file diff --git a/python/requirements.txt b/python/requirements.txt deleted file mode 100644 index 5f6244d..0000000 --- a/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pythonnet -segno \ No newline at end of file diff --git a/python/tests/jsons/illegal/fixable/pk7.json b/python/tests/jsons/illegal/fixable/pk7.json deleted file mode 100644 index 2693102..0000000 --- a/python/tests/jsons/illegal/fixable/pk7.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "ability": "Intimidate", - "ability_num": 4, - "ball": "Timer Ball", - "base64": "bWRLvQAA02PXAoACOTAx1HDKAQAWBFUJeDN51wMC/PQOAAAAAAAAAAAAAAAAAAAAiAAIAADAAwAAAAAAAAAAAEkAbgBjAGkAbgBlAHIAbwBhAHIAAAAAAAAA6AGXAhcBWQAgEBAQAwMDAwoANAAXAQAAAAD///8/UwBhAGsAcwAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAARgABBAkAAAAAAAAAAABKAGUAcwBzAGkAZQAAAAAAAAAAAAAAAAAAAP8AAAAAAAAUCgUUCgUAMnVOAAqBACExBwECAAAAAA==", - "checksum": 25555, - "contest_stats": [ - { - "stat_name": "Cool", - "stat_value": 0 - }, - { - "stat_name": "Beauty", - "stat_value": 0 - }, - { - "stat_name": "Cute", - "stat_value": 0 - }, - { - "stat_name": "Smart", - "stat_value": 0 - }, - { - "stat_name": "Tough", - "stat_value": 0 - }, - { - "stat_name": "Sheen", - "stat_value": 0 - } - ], - "dex_number": 727, - "ec": "BD4B646D", - "egg_data": { - "day": 5, - "location": "a Link Trade (---)", - "month": 10, - "year": 2020 - }, - "esv": "3648", - "exp": 117360, - "fateful_flag": false, - "form_num": 0, - "friendship": 255, - "gender": "F", - "gender_flag": 1, - "generation": 7, - "held_item": "Assault Vest", - "hp_type": "Dark", - "ht": "Saks", - "illegal_reasons": "Invalid: Can't have ball for encounter type.", - "is_egg": false, - "is_legal": false, - "is_nicknamed": false, - "is_shiny": true, - "item_num": 640, - "level": 50, - "markings": 2389, - "met_data": { - "day": 5, - "level": 1, - "location": "Paniola Ranch", - "month": 10, - "year": 2020 - }, - "moves": [ - { - "name": "Flame Charge", - "pp": 32, - "pp_ups": 3, - "type": "Fire" - }, - { - "name": "Darkest Lariat", - "pp": 16, - "pp_ups": 3, - "type": "Dark" - }, - { - "name": "Revenge", - "pp": 16, - "pp_ups": 3, - "type": "Fighting" - }, - { - "name": "Earthquake", - "pp": 16, - "pp_ups": 3, - "type": "Ground" - } - ], - "nature": "Adamant", - "nickname": "Incineroar", - "ot": "Jessie", - "ot_gender": "F", - "ot_lang": "English", - "pid": "D7793378", - "pkrs_days": 0, - "pkrs_strain": 0, - "relearn_moves": [ - { - "name": "Scratch", - "type": "Normal" - }, - { - "name": "Ember", - "type": "Fire" - }, - { - "name": "Revenge", - "type": "Fighting" - }, - { - "name": "None", - "type": "Normal" - } - ], - "ribbons": [ - "Best Friends", - "Effort", - "Footprint", - "Alola Champion", - "Battle Royal Champion", - "Battle Tree Great", - "Battle Tree Master" - ], - "sid": 3559, - "size": 232, - "species": "Incineroar", - "sprites": { - "item": "https://cdn.sigkill.tech/sprites/items/hold-item/assault-vest.png", - "species": "https://cdn.sigkill.tech/sprites/pokemon-gen7x/shiny/incineroar.png" - }, - "stats": [ - { - "stat_ev": 31, - "stat_iv": 252, - "stat_name": "HP", - "stat_total": "202" - }, - { - "stat_ev": 31, - "stat_iv": 244, - "stat_name": "Attack", - "stat_total": "182" - }, - { - "stat_ev": 31, - "stat_iv": 14, - "stat_name": "Defense", - "stat_total": "112" - }, - { - "stat_ev": 31, - "stat_iv": 0, - "stat_name": "Special Attack", - "stat_total": "90" - }, - { - "stat_ev": 31, - "stat_iv": 0, - "stat_name": "Special Defense", - "stat_total": "110" - }, - { - "stat_ev": 31, - "stat_iv": 0, - "stat_name": "Speed", - "stat_total": "80" - } - ], - "tid": 993401, - "tsv": 3648, - "version": "Ultra Moon" -} diff --git a/python/tests/jsons/legal/pa8.json b/python/tests/jsons/legal/pa8.json deleted file mode 100644 index 0e943bc..0000000 --- a/python/tests/jsons/legal/pa8.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "ability": "Multitype", - "ability_num": 2, - "ball": "Poké Ball", - "base64": "xZMnaQAAtA/tAQAAjZ2SiwDECQB5AAIAAAAAADH/rNgSEgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB1uHUAaQBGAcEBPwAKDwUFQQByAGMAZQB1AHMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABaAf+3/z8AAAAAAAAAAAAAAAAAAAAAAAAAAF5dnUOyI1ZFAAAAAFAASwBIAGUAWAAAAAAAAAAAAAAAAAAAAAAAAAIBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAACAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAGEAcwBpAG4AAAAAAAAAAAAAAAAAAAAAAP8AAAAAAAAAAAAWAxIEAADaAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "checksum": 4020, - "contest_stats": [ - { - "stat_name": "Cool", - "stat_value": 0 - }, - { - "stat_name": "Beauty", - "stat_value": 0 - }, - { - "stat_name": "Cute", - "stat_value": 0 - }, - { - "stat_name": "Smart", - "stat_value": 0 - }, - { - "stat_name": "Tough", - "stat_value": 0 - }, - { - "stat_name": "Sheen", - "stat_value": 0 - } - ], - "dex_number": 493, - "ec": "692793C5", - "egg_data": { - "day": 1, - "location": "Jubilife City", - "month": 1, - "year": 1 - }, - "esv": "0633", - "exp": 640000, - "fateful_flag": true, - "form_num": 0, - "friendship": 255, - "gender": "-", - "gender_flag": 2, - "generation": 8, - "held_item": "None", - "hp_type": "Dark", - "ht": "PKHeX", - "illegal_reasons": "Legal!", - "is_egg": false, - "is_legal": true, - "is_nicknamed": false, - "is_shiny": false, - "item_num": 0, - "level": 80, - "markings": 0, - "met_data": { - "day": 18, - "level": 80, - "location": "Hall of Origin", - "month": 3, - "year": 2022 - }, - "moves": [ - { - "name": "Recover", - "pp": 10, - "pp_ups": 0, - "type": "Normal" - }, - { - "name": "Extrasensory", - "pp": 15, - "pp_ups": 0, - "type": "Psychic" - }, - { - "name": "Judgment", - "pp": 5, - "pp_ups": 0, - "type": "Normal" - }, - { - "name": "Hyper Beam", - "pp": 5, - "pp_ups": 0, - "type": "Normal" - } - ], - "nature": "Bashful", - "nickname": "Arceus", - "ot": "Hasin", - "ot_gender": "M", - "ot_lang": "English", - "pid": "D8ACFF31", - "pkrs_days": 0, - "pkrs_strain": 0, - "relearn_moves": [ - { - "name": "None", - "type": "Normal" - }, - { - "name": "None", - "type": "Normal" - }, - { - "name": "None", - "type": "Normal" - }, - { - "name": "None", - "type": "Normal" - } - ], - "ribbons": [], - "sid": 2341, - "size": 360, - "species": "Arceus", - "sprites": { - "item": null, - "species": "https://cdn.sigkill.tech/sprites/pokemon-gen8/regular/arceus.png" - }, - "stats": [ - { - "stat_ev": 31, - "stat_iv": 0, - "stat_name": "HP", - "stat_total": "346" - }, - { - "stat_ev": 31, - "stat_iv": 0, - "stat_name": "Attack", - "stat_total": "258" - }, - { - "stat_ev": 13, - "stat_iv": 0, - "stat_name": "Defense", - "stat_total": "240" - }, - { - "stat_ev": 31, - "stat_iv": 0, - "stat_name": "Special Attack", - "stat_total": "258" - }, - { - "stat_ev": 31, - "stat_iv": 0, - "stat_name": "Special Defense", - "stat_total": "258" - }, - { - "stat_ev": 31, - "stat_iv": 0, - "stat_name": "Speed", - "stat_total": "258" - } - ], - "tid": 641613, - "tsv": 353, - "version": "Brilliant Diamond" -} diff --git a/python/tests/jsons/legal/pb7.json b/python/tests/jsons/legal/pb7.json deleted file mode 100644 index e1b9271..0000000 --- a/python/tests/jsons/legal/pb7.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "ability": "Keen Eye", - "ability_num": 1, - "ball": "Poké Ball", - "base64": "DpFEuAAAuywRAAAA8w3YFYw7AAAzAQAAH2NXQwICAAAAAAAAAgICAgICAACDgqZCAAAAAAAAAAAAADJ5AAAAAFAAaQBkAGcAZQBvAHQAdABvAAAAAAAAAAAAdwARAGMBEgAUIwoUAAAAAAAAAAAAAAAAAAAtzB8mUABLAEgAZQBYAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAARgAAAAAAAAAAAGRkAABZAGUAbABsAG8AdwAAAAAAAAAAAAAAAAAAAEYAAAAAAAAAAAASBRgAAAAyAAQbACIAAAACZb5gQwAAAAAbAAAATABMACoAKQAvACIAJwDUAQAAAAA=", - "checksum": 11451, - "contest_stats": [ - { "stat_name": "Cool", "stat_value": 0 }, - { "stat_name": "Beauty", "stat_value": 0 }, - { "stat_name": "Cute", "stat_value": 0 }, - { "stat_name": "Smart", "stat_value": 0 }, - { "stat_name": "Tough", "stat_value": 0 }, - { "stat_name": "Sheen", "stat_value": 0 } - ], - "dex_number": 17, - "ec": "B844910E", - "egg_data": { "day": 1, "location": "——————", "month": 1, "year": 1 }, - "esv": "0516", - "exp": 15244, - "fateful_flag": false, - "form_num": 0, - "friendship": 70, - "gender": "F", - "gender_flag": 1, - "generation": 7, - "held_item": "None", - "hp_type": "Dark", - "ht": "PKHeX", - "illegal_reasons": "Legal!", - "is_egg": false, - "is_legal": true, - "is_nicknamed": false, - "is_shiny": false, - "item_num": 0, - "level": 27, - "markings": 0, - "met_data": { - "day": 24, - "level": 27, - "location": "GO Park complex", - "month": 5, - "year": 2018 - }, - "moves": [ - { "name": "Mirror Move", "pp": 20, "pp_ups": 0, "type": "Flying" }, - { "name": "Wing Attack", "pp": 35, "pp_ups": 0, "type": "Flying" }, - { "name": "Roost", "pp": 10, "pp_ups": 0, "type": "Flying" }, - { "name": "Whirlwind", "pp": 20, "pp_ups": 0, "type": "Normal" } - ], - "nature": "Brave", - "nickname": "Pidgeotto", - "ot": "Yellow", - "ot_gender": "M", - "ot_lang": "English", - "pid": "4357631F", - "pkrs_days": 0, - "pkrs_strain": 0, - "relearn_moves": [ - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" } - ], - "ribbons": [], - "sid": 366, - "size": 260, - "species": "Pidgeotto", - "sprites": { - "item": null, - "species": "https://cdn.sigkill.tech/sprites/pokemon-gen7x/regular/pidgeotto.png" - }, - "stats": [ - { "stat_ev": 13, "stat_iv": 0, "stat_name": "HP", "stat_total": "76" }, - { "stat_ev": 1, "stat_iv": 0, "stat_name": "Attack", "stat_total": "42" }, - { "stat_ev": 19, "stat_iv": 0, "stat_name": "Defense", "stat_total": "41" }, - { - "stat_ev": 1, - "stat_iv": 0, - "stat_name": "Special Attack", - "stat_total": "34" - }, - { - "stat_ev": 19, - "stat_iv": 0, - "stat_name": "Special Defense", - "stat_total": "39" - }, - { "stat_ev": 31, "stat_iv": 0, "stat_name": "Speed", "stat_total": "47" } - ], - "tid": 480883, - "tsv": 386, - "version": "GO" -} diff --git a/python/tests/jsons/legal/pb8.json b/python/tests/jsons/legal/pb8.json deleted file mode 100644 index 47a414d..0000000 --- a/python/tests/jsons/legal/pb8.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "ability": "Ice Body", - "ability_num": 2, - "ball": "Master Ball", - "base64": "703uRwAAYmJqAQAALEYh6DsmAQBzAAIAAAAAAGctVXQREQQAAAACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADIdAAAAAAAAEcAbABhAGwAaQBlAAAAAAAAAAAAAAAAAAAAvwAMAiwApwEUChkPAAAAAL8AAAAAAAAAdwAAcKcXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAIAAAAAAP8AAAAAAAAAAAAAAAAAAABPAGMAdABvAAAAAAAAAAAAAAAAAAAAAAAAAD0AAAAAAAAAAAAVDAUA//9KAgEqAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", - "checksum": 25186, - "contest_stats": [ - { "stat_name": "Cool", "stat_value": 0 }, - { "stat_name": "Beauty", "stat_value": 0 }, - { "stat_name": "Cute", "stat_value": 0 }, - { "stat_name": "Smart", "stat_value": 0 }, - { "stat_name": "Tough", "stat_value": 0 }, - { "stat_name": "Sheen", "stat_value": 0 } - ], - "dex_number": 362, - "ec": "47EE4DEF", - "egg_data": { "day": 1, "location": "", "month": 1, "year": 1 }, - "esv": "1427", - "exp": 75323, - "fateful_flag": false, - "form_num": 0, - "friendship": 61, - "gender": "F", - "gender_flag": 1, - "generation": 8, - "held_item": "None", - "hp_type": "Steel", - "ht": "", - "illegal_reasons": "Legal!", - "is_egg": false, - "is_legal": true, - "is_nicknamed": false, - "is_shiny": false, - "item_num": 0, - "level": 42, - "markings": 0, - "met_data": { - "day": 5, - "level": 42, - "location": "Grand Underground (Whiteout Cave)", - "month": 12, - "year": 2021 - }, - "moves": [ - { "name": "Spikes", "pp": 20, "pp_ups": 0, "type": "Ground" }, - { "name": "Frost Breath", "pp": 10, "pp_ups": 0, "type": "Ice" }, - { "name": "Bite", "pp": 25, "pp_ups": 0, "type": "Dark" }, - { "name": "Ice Fang", "pp": 15, "pp_ups": 0, "type": "Ice" } - ], - "nature": "Quiet", - "nickname": "Glalie", - "ot": "Octo", - "ot_gender": "M", - "ot_lang": "English", - "pid": "74552D67", - "pkrs_days": 0, - "pkrs_strain": 0, - "relearn_moves": [ - { "name": "Spikes", "type": "Ground" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" } - ], - "ribbons": [], - "sid": 3894, - "size": 328, - "species": "Glalie", - "sprites": { - "item": null, - "species": "https://cdn.sigkill.tech/sprites/pokemon-gen8/regular/glalie.png" - }, - "stats": [ - { "stat_ev": 0, "stat_iv": 2, "stat_name": "HP", "stat_total": "119" }, - { "stat_ev": 0, "stat_iv": 0, "stat_name": "Attack", "stat_total": "72" }, - { "stat_ev": 28, "stat_iv": 2, "stat_name": "Defense", "stat_total": "83" }, - { - "stat_ev": 26, - "stat_iv": 0, - "stat_name": "Special Attack", - "stat_total": "91" - }, - { - "stat_ev": 11, - "stat_iv": 0, - "stat_name": "Special Defense", - "stat_total": "76" - }, - { "stat_ev": 14, "stat_iv": 0, "stat_name": "Speed", "stat_total": "70" } - ], - "tid": 494764, - "tsv": 2784, - "version": "Brilliant Diamond" -} diff --git a/python/tests/jsons/legal/pk1.json b/python/tests/jsons/legal/pk1.json deleted file mode 100644 index d537803..0000000 --- a/python/tests/jsons/legal/pk1.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "ability": "", - "ability_num": -1, - "ball": "None", - "base64": "AQv/CwCzNwAAAC0ybxVn1icCiecAAAAAAAAAAAAAk/oUKBQoNwCzAEsAWgA2AFKKjoqIUAAAAAAAAIuIgoqIk5SNhlBQ", - "checksum": 44268, - "contest_stats": [ - { "stat_name": "Cool", "stat_value": 0 }, - { "stat_name": "Beauty", "stat_value": 0 }, - { "stat_name": "Cute", "stat_value": 0 }, - { "stat_name": "Smart", "stat_value": 0 }, - { "stat_name": "Tough", "stat_value": 0 }, - { "stat_name": "Sheen", "stat_value": 0 } - ], - "dex_number": 108, - "ec": "00000000", - "egg_data": { "day": 1, "location": "", "month": 1, "year": 1 }, - "esv": "65535", - "exp": 166375, - "fateful_flag": false, - "form_num": 0, - "friendship": 0, - "gender": "M", - "gender_flag": 0, - "generation": 1, - "held_item": "None", - "hp_type": "Steel", - "ht": "N/A", - "illegal_reasons": "Legal!", - "is_egg": false, - "is_legal": true, - "is_nicknamed": false, - "is_shiny": false, - "item_num": 0, - "level": 55, - "markings": 0, - "met_data": { "day": 1, "level": 0, "location": "", "month": 1, "year": 1 }, - "moves": [ - { "name": "Disable", "pp": 20, "pp_ups": 0, "type": "Normal" }, - { "name": "Defense Curl", "pp": 40, "pp_ups": 0, "type": "Normal" }, - { "name": "Slam", "pp": 20, "pp_ups": 0, "type": "Normal" }, - { "name": "Screech", "pp": 40, "pp_ups": 0, "type": "Normal" } - ], - "nature": "Hardy", - "nickname": "LICKITUNG", - "ot": "KOKI", - "ot_gender": "M", - "ot_lang": "English", - "pid": "00000000", - "pkrs_days": 0, - "pkrs_strain": 0, - "relearn_moves": [ - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" } - ], - "ribbons": [], - "sid": 0, - "size": 33, - "species": "Lickitung", - "sprites": { - "item": null, - "species": "https://cdn.sigkill.tech/sprites/pokemon-gen7x/regular/lickitung.png" - }, - "stats": [ - { "stat_ev": 14, "stat_iv": 0, "stat_name": "HP", "stat_total": "179" }, - { "stat_ev": 9, "stat_iv": 0, "stat_name": "Attack", "stat_total": "75" }, - { "stat_ev": 3, "stat_iv": 0, "stat_name": "Defense", "stat_total": "90" }, - { - "stat_ev": 10, - "stat_iv": 0, - "stat_name": "Special Attack", - "stat_total": "82" - }, - { - "stat_ev": 10, - "stat_iv": 0, - "stat_name": "Special Defense", - "stat_total": "82" - }, - { "stat_ev": 15, "stat_iv": 0, "stat_name": "Speed", "stat_total": "54" } - ], - "tid": 54823, - "tsv": 0, - "version": "" -} diff --git a/python/tests/jsons/legal/pk2.json b/python/tests/jsons/legal/pk2.json deleted file mode 100644 index 10375af..0000000 --- a/python/tests/jsons/legal/pk2.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "ability": "", - "ability_num": -1, - "ball": "None", - "base64": "ATz/PBiRXwAA3doAATkAPwA8ADcARwAy6XQeFAAAVgDEBAcAAAAXABcADgAMABIACwALi6CzqKVQUFAAAACPjouIloCGUFBQUA==", - "checksum": 60009, - "contest_stats": [ - { "stat_name": "Cool", "stat_value": 0 }, - { "stat_name": "Beauty", "stat_value": 0 }, - { "stat_name": "Cute", "stat_value": 0 }, - { "stat_name": "Smart", "stat_value": 0 }, - { "stat_name": "Tough", "stat_value": 0 }, - { "stat_name": "Sheen", "stat_value": 0 } - ], - "dex_number": 60, - "ec": "00000000", - "egg_data": { "day": 1, "location": "None", "month": 1, "year": 1 }, - "esv": "65535", - "exp": 313, - "fateful_flag": false, - "form_num": 0, - "friendship": 86, - "gender": "M", - "gender_flag": 0, - "generation": 2, - "held_item": "Water Stone", - "hp_type": "Water", - "ht": "N/A", - "illegal_reasons": "Legal!", - "is_egg": false, - "is_legal": true, - "is_nicknamed": false, - "is_shiny": false, - "item_num": 24, - "level": 7, - "markings": 0, - "met_data": { - "day": 1, - "level": 4, - "location": "Route 30", - "month": 1, - "year": 1 - }, - "moves": [ - { "name": "Bubble", "pp": 30, "pp_ups": 0, "type": "Water" }, - { "name": "Hypnosis", "pp": 20, "pp_ups": 0, "type": "Psychic" }, - { "name": "None", "pp": 0, "pp_ups": 0, "type": "Normal" }, - { "name": "None", "pp": 0, "pp_ups": 0, "type": "Normal" } - ], - "nature": "Hardy", - "nickname": "POLIWAG", - "ot": "Latif", - "ot_gender": "M", - "ot_lang": "English", - "pid": "00000000", - "pkrs_days": 0, - "pkrs_strain": 0, - "relearn_moves": [ - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" } - ], - "ribbons": [], - "sid": 0, - "size": 32, - "species": "Poliwag", - "sprites": { - "item": "https://cdn.sigkill.tech/sprites/items/medicine/max-potion.png", - "species": "https://cdn.sigkill.tech/sprites/pokemon-gen7x/regular/poliwag.png" - }, - "stats": [ - { "stat_ev": 6, "stat_iv": 63, "stat_name": "HP", "stat_total": "23" }, - { "stat_ev": 14, "stat_iv": 60, "stat_name": "Attack", "stat_total": "14" }, - { "stat_ev": 9, "stat_iv": 55, "stat_name": "Defense", "stat_total": "12" }, - { - "stat_ev": 4, - "stat_iv": 50, - "stat_name": "Special Attack", - "stat_total": "11" - }, - { - "stat_ev": 4, - "stat_iv": 50, - "stat_name": "Special Defense", - "stat_total": "11" - }, - { "stat_ev": 7, "stat_iv": 71, "stat_name": "Speed", "stat_total": "18" } - ], - "tid": 56794, - "tsv": 0, - "version": "" -} diff --git a/python/tests/jsons/legal/pk3.json b/python/tests/jsons/legal/pk3.json deleted file mode 100644 index 6f7f591..0000000 --- a/python/tests/jsons/legal/pk3.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "ability": "Pressure", - "ability_num": -1, - "ball": "Ultra Ball", - "base64": "3mlDwRNceHa7zM7Dvc/Iyf9zAgLO4+Ld////APpbAACQAAAAWmICAAAjAAA2AGEAqgA6AB4eBQoAAAAAAAAAAAAAAAAAizIS0g1sAQAAAAA=", - "checksum": 23546, - "contest_stats": [ - { "stat_name": "Cool", "stat_value": 0 }, - { "stat_name": "Beauty", "stat_value": 0 }, - { "stat_name": "Cute", "stat_value": 0 }, - { "stat_name": "Smart", "stat_value": 0 }, - { "stat_name": "Tough", "stat_value": 0 }, - { "stat_name": "Sheen", "stat_value": 0 } - ], - "dex_number": 144, - "ec": "C14369DE", - "egg_data": { - "day": 1, - "location": "Littleroot Town", - "month": 1, - "year": 1 - }, - "esv": "5395", - "exp": 156250, - "fateful_flag": false, - "form_num": 0, - "friendship": 35, - "gender": "-", - "gender_flag": 2, - "generation": 3, - "held_item": "None", - "hp_type": "Fighting", - "ht": "N/A", - "illegal_reasons": "Legal!", - "is_egg": false, - "is_legal": true, - "is_nicknamed": false, - "is_shiny": false, - "item_num": 0, - "level": 50, - "markings": 0, - "met_data": { - "day": 1, - "level": 50, - "location": "Seafoam Islands", - "month": 1, - "year": 1 - }, - "moves": [ - { "name": "Mist", "pp": 30, "pp_ups": 0, "type": "Ice" }, - { "name": "Agility", "pp": 30, "pp_ups": 0, "type": "Psychic" }, - { "name": "Mind Reader", "pp": 5, "pp_ups": 0, "type": "Normal" }, - { "name": "Ice Beam", "pp": 10, "pp_ups": 0, "type": "Ice" } - ], - "nature": "Brave", - "nickname": "ARTICUNO", - "ot": "Toni", - "ot_gender": "M", - "ot_lang": "English", - "pid": "C14369DE", - "pkrs_days": 0, - "pkrs_strain": 0, - "relearn_moves": [ - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" } - ], - "ribbons": [], - "sid": 30328, - "size": 80, - "species": "Articuno", - "sprites": { - "item": null, - "species": "https://cdn.sigkill.tech/sprites/pokemon-gen7x/regular/articuno.png" - }, - "stats": [ - { "stat_ev": 18, "stat_iv": 0, "stat_name": "HP", "stat_total": "159" }, - { "stat_ev": 14, "stat_iv": 0, "stat_name": "Attack", "stat_total": "106" }, - { "stat_ev": 3, "stat_iv": 0, "stat_name": "Defense", "stat_total": "106" }, - { - "stat_ev": 22, - "stat_iv": 0, - "stat_name": "Special Attack", - "stat_total": "111" - }, - { - "stat_ev": 0, - "stat_iv": 0, - "stat_name": "Special Defense", - "stat_total": "130" - }, - { "stat_ev": 24, "stat_iv": 0, "stat_name": "Speed", "stat_total": "91" } - ], - "tid": 23571, - "tsv": 1357, - "version": "FireRed" -} diff --git a/python/tests/jsons/legal/pk4.json b/python/tests/jsons/legal/pk4.json deleted file mode 100644 index 9166ab9..0000000 --- a/python/tests/jsons/legal/pk4.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "ability": "Synchronize", - "ability_num": -1, - "ball": "Poké Ball", - "base64": "sAQF/AAAx2lBAAAAOTAx1BQsEAD/HB0CAAAAAAAAAAAAAAAA//8TAGQAAAAAAAAAFAAAAAAAAAC/f/g/AAAAAQAAAADQBwQAKwE2ASsBNQErAUQBKwE3Af//AAAAAAAM//8PAAAAAAA6ATUBMgFJAUIB//8AAAAAFgkKFgkK0AcEAAAEAAAAAA==", - "checksum": 17972, - "contest_stats": [ - { "stat_name": "Cool", "stat_value": 0 }, - { "stat_name": "Beauty", "stat_value": 0 }, - { "stat_name": "Cute", "stat_value": 0 }, - { "stat_name": "Smart", "stat_value": 0 }, - { "stat_name": "Tough", "stat_value": 0 }, - { "stat_name": "Sheen", "stat_value": 0 } - ], - "dex_number": 65, - "ec": "FC0504B0", - "egg_data": { - "day": 10, - "location": "Day-Care Couple", - "month": 9, - "year": 2022 - }, - "esv": "7958", - "exp": 1059860, - "fateful_flag": false, - "form_num": 0, - "friendship": 255, - "gender": "M", - "gender_flag": 0, - "generation": 4, - "held_item": "None", - "hp_type": "Ice", - "ht": "N/A", - "illegal_reasons": "Legal!", - "is_egg": false, - "is_legal": true, - "is_nicknamed": false, - "is_shiny": false, - "item_num": 0, - "level": 100, - "markings": 29, - "met_data": { - "day": 10, - "level": 0, - "location": "Solaceon Town", - "month": 9, - "year": 2022 - }, - "moves": [ - { "name": "Teleport", "pp": 20, "pp_ups": 0, "type": "Psychic" }, - { "name": "None", "pp": 0, "pp_ups": 0, "type": "Normal" }, - { "name": "None", "pp": 0, "pp_ups": 0, "type": "Normal" }, - { "name": "None", "pp": 0, "pp_ups": 0, "type": "Normal" } - ], - "nature": "Serious", - "nickname": "ALAKAZAM", - "ot": "PKHeX", - "ot_gender": "M", - "ot_lang": "English", - "pid": "FC0504B0", - "pkrs_days": 0, - "pkrs_strain": 0, - "relearn_moves": [ - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" } - ], - "ribbons": [ - "Sinnoh Champion", - "Ability", - "Great Ability", - "Double Ability", - "Multi Ability", - "Pair Ability", - "World Ability", - "Alert", - "Shock", - "Downcast", - "Careless", - "Relax", - "Snooze", - "Smile", - "Gorgeous", - "Royal", - "Gorgeous Royal", - "Footprint", - "Legend", - "Effort", - "Cool (G4)", - "Cool Great", - "Cool Ultra", - "Cool Master", - "Beauty (G4)", - "Beauty Great", - "Beauty Ultra", - "Beauty Master", - "Cute (G4)", - "Cute Great", - "Cute Ultra", - "Cute Master", - "Smart (G4)", - "Smart Great", - "Smart Ultra", - "Smart Master", - "Tough (G4)", - "Tough Great", - "Tough Ultra", - "Tough Master" - ], - "sid": 54321, - "size": 136, - "species": "Alakazam", - "sprites": { - "item": null, - "species": "https://cdn.sigkill.tech/sprites/pokemon-gen7x/regular/alakazam.png" - }, - "stats": [ - { "stat_ev": 31, "stat_iv": 0, "stat_name": "HP", "stat_total": "251" }, - { "stat_ev": 29, "stat_iv": 0, "stat_name": "Attack", "stat_total": "134" }, - { - "stat_ev": 31, - "stat_iv": 0, - "stat_name": "Defense", - "stat_total": "126" - }, - { - "stat_ev": 31, - "stat_iv": 0, - "stat_name": "Special Attack", - "stat_total": "306" - }, - { - "stat_ev": 31, - "stat_iv": 0, - "stat_name": "Special Defense", - "stat_total": "206" - }, - { "stat_ev": 16, "stat_iv": 0, "stat_name": "Speed", "stat_total": "261" } - ], - "tid": 12345, - "tsv": 7297, - "version": "Platinum" -} diff --git a/python/tests/jsons/legal/pk5.json b/python/tests/jsons/legal/pk5.json deleted file mode 100644 index 683cbac..0000000 --- a/python/tests/jsons/legal/pk5.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "ability": "Victory Star", - "ability_num": -1, - "ball": "Premier Ball", - "base64": "egZKRQAA1J7uAQAAg2HJ7noQAABnogAHAAAAAAAAAAAAAAAAAAAAAF0A/gFiAMsAGQ8eCgAAAABaav63AAAAAAQVAAAAAAAAVgBpAGMAdABvAHIAeQAgAFYAMgD//wAUAAAAAAAAAABMAHkAbgD//wAAAAAAAP//AAAAFgkDAAA+AAAMjwAAAA==", - "checksum": 40660, - "contest_stats": [ - { "stat_name": "Cool", "stat_value": 0 }, - { "stat_name": "Beauty", "stat_value": 0 }, - { "stat_name": "Cute", "stat_value": 0 }, - { "stat_name": "Smart", "stat_value": 0 }, - { "stat_name": "Tough", "stat_value": 0 }, - { "stat_name": "Sheen", "stat_value": 0 } - ], - "dex_number": 494, - "ec": "454A067A", - "egg_data": { "day": 1, "location": "None", "month": 1, "year": 1 }, - "esv": "2150", - "exp": 4218, - "fateful_flag": false, - "form_num": 0, - "friendship": 103, - "gender": "-", - "gender_flag": 2, - "generation": 5, - "held_item": "None", - "hp_type": "Electric", - "ht": "N/A", - "illegal_reasons": "Legal!", - "is_egg": false, - "is_legal": true, - "is_nicknamed": true, - "is_shiny": false, - "item_num": 0, - "level": 15, - "markings": 0, - "met_data": { - "day": 3, - "level": 15, - "location": "Liberty Garden", - "month": 9, - "year": 2022 - }, - "moves": [ - { "name": "Confusion", "pp": 25, "pp_ups": 0, "type": "Psychic" }, - { "name": "Incinerate", "pp": 15, "pp_ups": 0, "type": "Fire" }, - { "name": "Quick Attack", "pp": 30, "pp_ups": 0, "type": "Normal" }, - { "name": "Endure", "pp": 10, "pp_ups": 0, "type": "Normal" } - ], - "nature": "Gentle", - "nickname": "Victory V2", - "ot": "Lyn", - "ot_gender": "F", - "ot_lang": "Spanish", - "pid": "454A067A", - "pkrs_days": 0, - "pkrs_strain": 0, - "relearn_moves": [ - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" } - ], - "ribbons": [], - "sid": 61129, - "size": 136, - "species": "Victini", - "sprites": { - "item": null, - "species": "https://cdn.sigkill.tech/sprites/pokemon-gen7x/regular/victini.png" - }, - "stats": [ - { "stat_ev": 26, "stat_iv": 0, "stat_name": "HP", "stat_total": "58" }, - { "stat_ev": 18, "stat_iv": 0, "stat_name": "Attack", "stat_total": "37" }, - { "stat_ev": 26, "stat_iv": 0, "stat_name": "Defense", "stat_total": "34" }, - { - "stat_ev": 31, - "stat_iv": 0, - "stat_name": "Special Attack", - "stat_total": "39" - }, - { - "stat_ev": 27, - "stat_iv": 0, - "stat_name": "Special Defense", - "stat_total": "42" - }, - { "stat_ev": 28, "stat_iv": 0, "stat_name": "Speed", "stat_total": "39" } - ], - "tid": 24963, - "tsv": 4585, - "version": "White" -} diff --git a/python/tests/jsons/legal/pk6.json b/python/tests/jsons/legal/pk6.json deleted file mode 100644 index 0856e20..0000000 --- a/python/tests/jsons/legal/pk6.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "ability": "Gluttony", - "ability_num": 2, - "ball": "Poké Ball", - "base64": "8SpEWgAAshUIAQAARQAAAKQrAABSAgAAjgMeewgADxEXHhEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEwAaQBuAG8AbwBuAGUAAABuAAAAAAAAAAAAKgAdAPkAYAIUDw8eAwMDAwAAAAAAAAAAAAD///8/QwBoAGEAZAAAAAAAAAAAAAAAAAAAAAAAAAAAAQBuAAAAAAAAAAAAAAAARgABBAgACQAAAAAAAABDAGgAYQBkAAAAAAAAAAAAAAAAAAAAAAAAAMoAAxYAAAsAAAAWCQUAAAAaAQQEABsxAAECAAAAAA==", - "checksum": 5554, - "contest_stats": [ - { "stat_name": "Cool", "stat_value": 0 }, - { "stat_name": "Beauty", "stat_value": 0 }, - { "stat_name": "Cute", "stat_value": 0 }, - { "stat_name": "Smart", "stat_value": 0 }, - { "stat_name": "Tough", "stat_value": 0 }, - { "stat_name": "Sheen", "stat_value": 0 } - ], - "dex_number": 264, - "ec": "5A442AF1", - "egg_data": { "day": 1, "location": "None", "month": 1, "year": 1 }, - "esv": "1929", - "exp": 11172, - "fateful_flag": false, - "form_num": 0, - "friendship": 202, - "gender": "M", - "gender_flag": 0, - "generation": 6, - "held_item": "None", - "hp_type": "Dark", - "ht": "Chad", - "illegal_reasons": "Legal!", - "is_egg": false, - "is_legal": true, - "is_nicknamed": false, - "is_shiny": false, - "item_num": 0, - "level": 22, - "markings": 0, - "met_data": { - "day": 5, - "level": 4, - "location": "Petalburg Woods", - "month": 9, - "year": 2022 - }, - "moves": [ - { "name": "Pin Missile", "pp": 20, "pp_ups": 3, "type": "Bug" }, - { "name": "Headbutt", "pp": 15, "pp_ups": 3, "type": "Normal" }, - { "name": "Rock Smash", "pp": 15, "pp_ups": 3, "type": "Fighting" }, - { "name": "Baby-Doll Eyes", "pp": 30, "pp_ups": 3, "type": "Fairy" } - ], - "nature": "Impish", - "nickname": "Linoone", - "ot": "Chad", - "ot_gender": "M", - "ot_lang": "English", - "pid": "7B1E038E", - "pkrs_days": 0, - "pkrs_strain": 0, - "relearn_moves": [ - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" } - ], - "ribbons": [], - "sid": 0, - "size": 232, - "species": "Linoone", - "sprites": { - "item": null, - "species": "https://cdn.sigkill.tech/sprites/pokemon-gen7x/regular/linoone.png" - }, - "stats": [ - { "stat_ev": 31, "stat_iv": 15, "stat_name": "HP", "stat_total": "73" }, - { "stat_ev": 31, "stat_iv": 17, "stat_name": "Attack", "stat_total": "43" }, - { - "stat_ev": 31, - "stat_iv": 23, - "stat_name": "Defense", - "stat_total": "42" - }, - { - "stat_ev": 31, - "stat_iv": 17, - "stat_name": "Special Attack", - "stat_total": "30" - }, - { - "stat_ev": 31, - "stat_iv": 6, - "stat_name": "Special Defense", - "stat_total": "38" - }, - { "stat_ev": 31, "stat_iv": 30, "stat_name": "Speed", "stat_total": "57" } - ], - "tid": 69, - "tsv": 4, - "version": "Omega Ruby" -} diff --git a/python/tests/jsons/legal/pk7.json b/python/tests/jsons/legal/pk7.json deleted file mode 100644 index fb58843..0000000 --- a/python/tests/jsons/legal/pk7.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "ability": "Sand Veil", - "ability_num": 1, - "ball": "Poké Ball", - "base64": "XgEAAAAAZJ4cAAAApt3RHSC/AgAIAQAAXgEAAAACDn55KjuUAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEYAZQBsAGkAeAAAAGEAcwBoAAAAAAAAAAAAWQCjAFsAAAAKFAoAAAAAAAAAAAAAAAAAAACZFiapUABLAEgAZQBYAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAARgABBAQAAAAAAAAAAABGAGEAdwBrAGUAcwAAAAAAAAAAAAAAAAAAAEYAAAAAAAAAAAAUBRkAAAAxdQQ4AAIxBwECAAAAAA==", - "checksum": 40548, - "contest_stats": [ - { "stat_name": "Cool", "stat_value": 1 }, - { "stat_name": "Beauty", "stat_value": 1 }, - { "stat_name": "Cute", "stat_value": 1 }, - { "stat_name": "Smart", "stat_value": 1 }, - { "stat_name": "Tough", "stat_value": 1 }, - { "stat_name": "Sheen", "stat_value": 1 } - ], - "dex_number": 28, - "ec": "0000015E", - "egg_data": { "day": 1, "location": "——————", "month": 1, "year": 1 }, - "esv": "0021", - "exp": 180000, - "fateful_flag": false, - "form_num": 0, - "friendship": 70, - "gender": "F", - "gender_flag": 1, - "generation": 3, - "held_item": "None", - "hp_type": "Flying", - "ht": "PKHeX", - "illegal_reasons": "Legal!", - "is_egg": false, - "is_legal": true, - "is_nicknamed": true, - "is_shiny": false, - "item_num": 0, - "level": 56, - "markings": 0, - "met_data": { - "day": 25, - "level": 56, - "location": "a Link Trade (NPC)", - "month": 5, - "year": 2020 - }, - "moves": [ - { "name": "Earthquake", "pp": 10, "pp_ups": 0, "type": "Ground" }, - { "name": "Slash", "pp": 20, "pp_ups": 0, "type": "Normal" }, - { "name": "Dig", "pp": 10, "pp_ups": 0, "type": "Ground" }, - { "name": "None", "pp": 0, "pp_ups": 0, "type": "Normal" } - ], - "nature": "Hardy", - "nickname": "Felix", - "ot": "Fawkes", - "ot_gender": "M", - "ot_lang": "English", - "pid": "0000015E", - "pkrs_days": 0, - "pkrs_strain": 0, - "relearn_moves": [ - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" } - ], - "ribbons": [], - "sid": 7633, - "size": 232, - "species": "Sandslash", - "sprites": { - "item": null, - "species": "https://cdn.sigkill.tech/sprites/pokemon-gen7x/regular/sandslash.png" - }, - "stats": [ - { "stat_ev": 25, "stat_iv": 14, "stat_name": "HP", "stat_total": "165" }, - { - "stat_ev": 20, - "stat_iv": 126, - "stat_name": "Attack", - "stat_total": "145" - }, - { - "stat_ev": 5, - "stat_iv": 121, - "stat_name": "Defense", - "stat_total": "147" - }, - { - "stat_ev": 18, - "stat_iv": 59, - "stat_name": "Special Attack", - "stat_total": "73" - }, - { - "stat_ev": 20, - "stat_iv": 148, - "stat_name": "Special Defense", - "stat_total": "98" - }, - { "stat_ev": 12, "stat_iv": 42, "stat_name": "Speed", "stat_total": "90" } - ], - "tid": 56742, - "tsv": 3079, - "version": "Ruby" -} diff --git a/python/tests/jsons/legal/pk8.json b/python/tests/jsons/legal/pk8.json deleted file mode 100644 index 27d1a7c..0000000 --- a/python/tests/jsons/legal/pk8.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "ability": "Drought", - "ability_num": 1, - "ball": "Heavy Ball", - "base64": "T66umQAA3Kx/ARwDESUl8M6KBgBGAAEAAAAAAHQ96r0QDAgAAABVVVVVVVUAAAAAAAAAAIgAAAAAABwAAAAAAAAAAAAAAAAAAAAAAAAAAACFpAAAAAAAAEcAcgBvAHUAZABvAG4AAAAAAHIAAAAAAAAA9gBZAAkAngEFCg8KAAAAAAAAAAAAAAAAAAH///8/CgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABLAEgAZQBYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALQAAAAIAAAAAAP8AAAAAAAAAAAAAAAAAAABIAGEAcgBsAGUAeQAAAAAAAAAAAAAAAAAAADIAAAAAAAAAAAAWCAUAAAD0ABTGAAeHEIwIiAFACZwAQQAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", - "checksum": 44252, - "contest_stats": [ - { "stat_name": "Cool", "stat_value": 0 }, - { "stat_name": "Beauty", "stat_value": 0 }, - { "stat_name": "Cute", "stat_value": 0 }, - { "stat_name": "Smart", "stat_value": 0 }, - { "stat_name": "Tough", "stat_value": 0 }, - { "stat_name": "Sheen", "stat_value": 0 } - ], - "dex_number": 383, - "ec": "99AEAE4F", - "egg_data": { "day": 1, "location": "——————", "month": 1, "year": 1 }, - "esv": "2057", - "exp": 428750, - "fateful_flag": false, - "form_num": 0, - "friendship": 50, - "gender": "-", - "gender_flag": 2, - "generation": 8, - "held_item": "Gold Bottle Cap", - "hp_type": "Dark", - "ht": "", - "illegal_reasons": "Legal!", - "is_egg": false, - "is_legal": true, - "is_nicknamed": false, - "is_shiny": false, - "item_num": 796, - "level": 70, - "markings": 0, - "met_data": { - "day": 5, - "level": 70, - "location": "in the Max Lair", - "month": 8, - "year": 2022 - }, - "moves": [ - { "name": "Ancient Power", "pp": 5, "pp_ups": 0, "type": "Rock" }, - { "name": "Earthquake", "pp": 10, "pp_ups": 0, "type": "Ground" }, - { "name": "Thunder Punch", "pp": 15, "pp_ups": 0, "type": "Electric" }, - { "name": "Earth Power", "pp": 10, "pp_ups": 0, "type": "Ground" } - ], - "nature": "Serious", - "nickname": "Groudon", - "ot": "Harley", - "ot_gender": "F", - "ot_lang": "English", - "pid": "BDEA3D74", - "pkrs_days": 0, - "pkrs_strain": 0, - "relearn_moves": [ - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" }, - { "name": "None", "type": "Normal" } - ], - "ribbons": [ - "Best Friends", - "Effort", - "Galar Champion", - "Tower Master", - "Master Rank" - ], - "sid": 4028, - "size": 328, - "species": "Groudon", - "sprites": { - "item": "https://cdn.sigkill.tech/sprites/items/other-item/gold-bottle-cap.png", - "species": "https://cdn.sigkill.tech/sprites/pokemon-gen8/regular/groudon.png" - }, - "stats": [ - { "stat_ev": 31, "stat_iv": 85, "stat_name": "HP", "stat_total": "256" }, - { - "stat_ev": 31, - "stat_iv": 85, - "stat_name": "Attack", - "stat_total": "251" - }, - { - "stat_ev": 31, - "stat_iv": 85, - "stat_name": "Defense", - "stat_total": "237" - }, - { - "stat_ev": 31, - "stat_iv": 85, - "stat_name": "Special Attack", - "stat_total": "181" - }, - { - "stat_ev": 31, - "stat_iv": 85, - "stat_name": "Special Defense", - "stat_total": "167" - }, - { "stat_ev": 31, "stat_iv": 85, "stat_name": "Speed", "stat_total": "167" } - ], - "tid": 966161, - "tsv": 3411, - "version": "Shield" -} diff --git a/python/tests/test_pkmn.py b/python/tests/test_pkmn.py deleted file mode 100644 index d51ded4..0000000 --- a/python/tests/test_pkmn.py +++ /dev/null @@ -1,55 +0,0 @@ -import base64 -import json -import pytest -from utils.load import * -from utils.helpers import get_pkmn, LanguageStrings, MoveTypes -from utils.pkmn import Pokemon -from utils.sprites import Sprites - -class TestPokemonSummary: - strings = None - moveTypes = None - sprites = None - - def setup(self): - self.strings = LanguageStrings() - self.moveTypes = MoveTypes() - self.sprites = Sprites() - - @pytest.mark.parametrize("filename,generation", [("pk1.json", "1"), ("pk2.json", "2"), ("pk3.json", "3"), ("pk4.json", "4"), ("pk5.json", "5"), ("pk6.json", "6"), ("pk7.json", "7"), ("pk8.json", "8"), ("pb7.json", "LGPE"), ("pb8.json", "BDSP"), ("pa8.json", "PLA")]) - def test_get_pokemon_summary_with_generation(self, filename, generation): - """ - Tests creating a pokemon summary - """ - # Load the expected summary and compare - with open("tests/jsons/legal/{}".format(filename), mode='r') as expected: - expected_summary = json.load(expected) - # Load the pokemon data - pokemon_data = base64.b64decode(expected_summary["base64"]) - # Load the pokemon data - pkmn = get_pkmn(pokemon_data, generation) - assert pkmn is not None - # Create a summary - summary = Pokemon(pkmn, self.strings, self.moveTypes, self.sprites) - - assert summary is not None - assert expected_summary == json.loads(summary.toJSON()) - - @pytest.mark.parametrize("filename", [("pk1.json"), ("pk2.json"), ("pk3.json"), ("pk4.json"), ("pk5.json"), ("pk6.json"), ("pk7.json"), ("pk8.json"), ("pb7.json"), ("pb8.json"), ("pa8.json")]) - def test_get_pokemon_summary_without_generation(self, filename): - """ - Tests creating a pokemon summary - """ - # Load the expected summary and compare - with open("tests/jsons/legal/{}".format(filename), mode='r') as expected: - expected_summary = json.load(expected) - # Load the pokemon data - pokemon_data = base64.b64decode(expected_summary["base64"]) - # Load the pokemon data - pkmn = get_pkmn(pokemon_data) - assert pkmn is not None - # Create a summary - summary = Pokemon(pkmn, self.strings, self.moveTypes, self.sprites) - - assert summary is not None - assert expected_summary == json.loads(summary.toJSON()) diff --git a/python/utils/helpers.py b/python/utils/helpers.py deleted file mode 100644 index 7af27ba..0000000 --- a/python/utils/helpers.py +++ /dev/null @@ -1,199 +0,0 @@ -#type: ignore ReportMissingImport - -from typing import Union -import json -import base64 -from PKHeX.Core import PokeList1, PokeList2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PB7, PB8, PA8, GameVersion, GameStrings, SimpleTrainerInfo, EntityFormat - -class LanguageStrings: - __strings = None - def __init__(self, language: str = "en") -> None: - self.__strings = GameStrings(language) - - def get_move_name(self, move: int): - try: - return self.__strings.movelist[move] - except: - return "None" - - def get_species_name(self, species: int): - try: - return self.__strings.specieslist[species] - except: - return "None" - - def get_ability_name(self, ability: int): - try: - return self.__strings.abilitylist[ability] - except: - return "None" - - def get_type_name(self, type: int): - try: - return self.__strings.types[type] - except: - return "None" - - def get_nature_name(self, nature: int): - try: - return self.__strings.natures[nature] - except: - return "None" - - def get_item_name(self, item: int): - try: - return self.__strings.itemlist[item] - except: - return "None" - - def get_ball_name(self, ball: int): - try: - return self.__strings.balllist[ball] - except: - return "None" - - def get_game_name(self, version: int): - try: - return self.__strings.gamelist[version] - except: - return "None" - -class MoveTypes: - __types = None - def __init__(self) -> None: - # open the JSON file - with open("python/data/move_types.json", mode='r') as file: - self.__types = json.load(file) - - def get_type_name(self, type: str): - try: - return self.__types[type] - except: - return "None" - -def get_pkmn(data, generation = None) -> Union[PokeList1, PokeList2, PK3, PK4, PK5, PK6, PK7, PK8, PB7, PB8, PA8, None]: - """ - Accepts a bytearray of a PKM file and returns the appropriate PKM object. - - Optionally accepts a generation number to force the PKM object to be of that generation. - - If no generation is specified, the function will attempt to determine the generation of the PKM file. - - Returns None if the generation cannot be determined or if the provided data is not valid for the specified generation. - """ - try: - if generation == "1": - return PokeList1(data)[0] - elif generation == "2": - return PokeList2(data)[0] - elif generation == "3": - return PK3(data) - elif generation == "4": - return PK4(data) - elif generation == "5": - return PK5(data) - elif generation == "6": - return PK6(data) - elif generation == "7": - return PK7(data) - elif generation == "8": - return PK8(data) - elif generation == "9": - return PK9(data) - elif generation == "BDSP": - return PB8(data) - elif generation == "LGPE": - return PB7(data) - elif generation == "PLA": - return PA8(data) - elif generation is None: - # Get the pkmn from both approaches - entityPkmn = EntityFormat.GetFromBytes(data) - getPkmnPkmn = get_pkmn(data, get_generation_from_version(entityPkmn.Version)) - # If they are different type, we should check the size - if str(type(entityPkmn)) != str(type(getPkmnPkmn)): - # If the entityPkmn is greater than the getPkmnPkmn, we should return the entityPkmn as it is more likely to be correct - if len(entityPkmn.Data) > len(getPkmnPkmn.Data): - return entityPkmn - # If the sizes are the same, return getPkmnPkmn as EntityFormat.GetFromBytes is more likely to be wrong in situations like BDSP - return getPkmnPkmn - else: - # If they are the same type, we can return entityPkmn as it is more likely to be correct - return entityPkmn - # If above doesn't fail, then we can retrieve the generation from the pkmn object using the Version - # we do this rather than just returning the pokemon directly as legality checks - # seem to fail if we don't have the correct generation despite the fact that the pokemon is valid - #return get_pkmn(data, get_generation_from_version(pkmn.Version)) - else: - return None - except: - return None - -def get_game_version(pkm): - return { - "": GameVersion.YW, - "": GameVersion.C, - "": GameVersion.E, - "": GameVersion.HG, - "": GameVersion.B2, - "": GameVersion.OR, - "": GameVersion.UM, - "": GameVersion.GE, - "": GameVersion.SW, - "": GameVersion.SL, - "": GameVersion.BD, - "": GameVersion.PLA, - }[str(type(pkm))] - -def get_trainer_info(pkmn, ver): - info = SimpleTrainerInfo(ver) - info.OT = pkmn.OT_Name - info.SID = pkmn.SID - info.TID = pkmn.TID - info.Language = pkmn.Language - info.Gender = pkmn.Gender - return info - - -def get_generation_from_version(ver): - if ver in [35, 36, 37, 38, 50, 51, 84, 83]: - return "1" - elif ver in [39, 40, 41, 52, 53, 85]: - return "2" - elif ver in [1, 2, 3, 4, 5, 54, 55, 56, 57, 58, 59]: - return "3" - elif ver in [10, 11, 12, 7, 8, 60, 61, 62, 0x3F]: - return "4" - elif ver in [20, 21, 22, 23, 0x40, 65]: - return "5" - elif ver in [24, 25, 26, 27, 66, 67, 68]: - return "6" - elif ver in [30, 0x1F, 0x20, 33, 69, 70]: - return "7" - elif ver in [71, 34, 42, 43]: - return "LGPE" - elif ver in [44, 45, 47, 72]: - return "8" - elif ver in [73, 48, 49]: - return "BDSP" - elif ver == 471: - return "PLA" - elif ver in [50, 51]: - return "9" - else: - raise ValueError("Unsuppored game version") - -def get_pokemon_from_base64(input, generation = None): - # decode the base64 string - try: - decoded = base64.b64decode(input, validate=True) - except: - return None, "Invalid base64 string" - # get the pkmn object - pkmn = get_pkmn(decoded, generation) - - if pkmn is None: - return None, {"error": "Invalid pokemon file or bad generation"} - - return pkmn, None - \ No newline at end of file diff --git a/python/utils/legality.py b/python/utils/legality.py deleted file mode 100644 index d2f33a1..0000000 --- a/python/utils/legality.py +++ /dev/null @@ -1,62 +0,0 @@ -# type: ignore ReportMissingImport - -from PKHeX.Core import LegalityAnalysis, LegalityFormatting -from PKHeX.Core.AutoMod import SimpleEdits, RegenTemplate, LegalizationResult, APILegality -import utils.helpers as helpers -from multiprocessing import Process, Queue -import time -import base64 - - -x = None - -def autolegalityThead(info, pkmn, set, legalization_res, out): - pkmn, _ = APILegality.GetLegalFromTemplate(info, pkmn, set, legalization_res) - out.put(base64.b64encode(bytearray(byte for byte in pkmn.DecryptedBoxData)).decode('UTF-8')) - -def cancel(): - if x is not None: - x.kill() - -def legalize(pkmn, generation): - global x - info = helpers.get_trainer_info(pkmn, helpers.get_game_version(pkmn)) - set = RegenTemplate(pkmn, info.Generation) - legalization_res = LegalizationResult(0) - out = Queue() - - x = Process(target=autolegalityThead, args=(info, pkmn, set, legalization_res, out)) - x.daemon = True - x.start() - - i = 0 - killed = False - while x.is_alive(): - time.sleep(1) - i += 1 - if i > 15: - killed = True - x.kill() - if killed: - return None - - # convert the pokemon back - result = out.get() - - legalized, err = helpers.get_pokemon_from_base64(result, generation) - if err is not None: - # print(err, info.Generation) - return None - - SimpleEdits.SetTrainerData(legalized, info) - report = LegalityAnalysis(legalized) - if report.Valid: - return legalized - return None - - -def legality_check(pkmn): - la = LegalityAnalysis(pkmn) - report = LegalityFormatting.GetLegalityReport(la) - - return la.Valid, report diff --git a/python/utils/load.py b/python/utils/load.py deleted file mode 100644 index 0e64933..0000000 --- a/python/utils/load.py +++ /dev/null @@ -1,21 +0,0 @@ -# type: ignore ReportMissingImport - -from pythonnet import load -#load("coreclr") <-- Using something other than mono caused sig 11 to occur - -import clr, sys, os - - - -sys.path.append(os.getcwd() + r"/python/deps/") -clr.AddReference("PKHeX.Core") -clr.AddReference("PKHeX.Core.AutoMod") -from PKHeX.Core import GameInfo, EncounterEvent, RibbonStrings -from PKHeX.Core.AutoMod import APILegality - -EncounterEvent.RefreshMGDB("") -RibbonStrings.ResetDictionary(GameInfo.Strings.ribbons) -APILegality.EnableEasterEggs = False -APILegality.PrioritizeGame = False -APILegality.UseTrainerData = False -APILegality.Timeout = 15 diff --git a/python/utils/pkmn.py b/python/utils/pkmn.py deleted file mode 100644 index 3f7a7c4..0000000 --- a/python/utils/pkmn.py +++ /dev/null @@ -1,160 +0,0 @@ -# type: ignore ReportMissingImport - -import json -from utils.helpers import LanguageStrings, MoveTypes, get_generation_from_version -from utils.sprites import Sprites -from utils.weridness import fix_weridness_for_strings -from utils.legality import legality_check -import base64, io -import segno -from PKHeX.Core import GameInfo, RibbonInfo, RibbonStrings, EntitySummary, GameStrings, QRMessageUtil, FormConverter - -class Pokemon: - def __init__(self, pkmn, strings: LanguageStrings, moveTypes: MoveTypes, spriteHelper: Sprites, generation: str) -> None: - # We can piggyback off of EntitySummary to get a lot of the data we need - entity = EntitySummary(pkmn, GameStrings("en")) - self.nickname = entity.Nickname - self.species = entity.Species - self.nature = entity.Nature - self.gender = entity.Gender - self.esv = entity.ESV - self.hp_type = entity.HP_Type - self.ability = entity.Ability - self.held_item = entity.HeldItem - self.ball = entity.Ball - self.ot = entity.OT - self.version = entity.Version - self.ot_lang = entity.OTLang - self.ec = entity.EC - self.pid = entity.PID - self.exp = entity.EXP - self.level = entity.Level - self.markings = entity.Markings - self.ht = entity.NotOT - self.ability_num = entity.AbilityNum - self.gender_flag = entity.GenderFlag - self.form_num = entity.Form - self.pkrs_strain = entity.PKRS_Strain - self.pkrs_days = entity.PKRS_Days - self.fateful_flag = entity.FatefulFlag - self.is_egg = entity.IsEgg - self.is_nicknamed = entity.IsNicknamed - self.is_shiny = entity.IsShiny - self.tid = entity.TID - self.sid = entity.SID - self.tsv = entity.TSV - self.checksum = entity.Checksum - self.friendship = entity.Friendship - # Now for the custom ones that we do not rely on EntitySummary for - self.relearn_moves = [ - self.Move(pkmn.RelearnMove1, None, None, strings, moveTypes), - self.Move(pkmn.RelearnMove2, None, None, strings, moveTypes), - self.Move(pkmn.RelearnMove3, None, None, strings, moveTypes), - self.Move(pkmn.RelearnMove4, None, None, strings, moveTypes) - ] - self.contest_stats = [ # Technically we do use EntitySummary for this, but we need to convert it to a list - self.ContestStat("Cool", entity.Cool), - self.ContestStat("Beauty", entity.Beauty), - self.ContestStat("Cute", entity.Cute), - self.ContestStat("Smart", entity.Smart), - self.ContestStat("Tough", entity.Tough), - self.ContestStat("Sheen", entity.Sheen) - ] - self.stats = [ # Technically we do use EntitySummary for this, but we need to convert it to a list - self.Stat("HP", entity.HP_EV, entity.HP_IV, entity.HP), - self.Stat("Attack", entity.ATK_EV, entity.ATK_IV, entity.ATK), - self.Stat("Defense", entity.DEF_EV, entity.DEF_IV, entity.DEF), - self.Stat("Special Attack", entity.SPA_EV, entity.SPA_IV, entity.SPA), - self.Stat("Special Defense", entity.SPD_EV, entity.SPD_IV, entity.SPD), - self.Stat("Speed", entity.SPE_EV, entity.SPE_IV, entity.SPE), - ] - self.moves = [ - self.Move(pkmn.Move1, pkmn.Move1_PP, pkmn.Move1_PPUps, strings, moveTypes), - self.Move(pkmn.Move2, pkmn.Move2_PP, pkmn.Move2_PPUps, strings, moveTypes), - self.Move(pkmn.Move3, pkmn.Move3_PP, pkmn.Move3_PPUps, strings, moveTypes), - self.Move(pkmn.Move4, pkmn.Move4_PP, pkmn.Move4_PPUps, strings, moveTypes) - ] - self.met_data = self.MetData(entity.MetLoc, entity.MetLevel, entity.Met_Year, entity.Met_Month, entity.Met_Day) - self.egg_data = self.EggData(entity.EggLoc, entity.Egg_Year, entity.Egg_Month, entity.Egg_Day) - - self.ot_gender = GameInfo.GenderSymbolASCII[pkmn.OT_Gender] - self.is_legal, self.illegal_reasons = legality_check(pkmn) - try: - self.generation = get_generation_from_version(pkmn.Version) - except: - - self.generation = generation if generation != "" else str(pkmn.Generation) - - self.dex_number = pkmn.Species - self.size = pkmn.SIZE_STORED - self.item_num = pkmn.HeldItem - self.ribbons = [RibbonStrings.GetName(ribbon.Name) for ribbon in RibbonInfo.GetRibbonInfo(pkmn) if ribbon.HasRibbon] - self.base64 = base64.b64encode(bytearray(byte for byte in pkmn.DecryptedBoxData)).decode('UTF-8') - #self.qr = self.genQR(QRMessageUtil.GetMessage(pkmn)) - self.sprites = self.Sprites(spriteHelper, - entity.Species, - pkmn.Species, "female" if entity.Gender == 'F' else "male", - entity.IsShiny, - entity.Form, - pkmn.Generation, - pkmn.Context, - pkmn.FormArgument if hasattr(pkmn, "FormArgument") else 0, - pkmn.HeldItem - ) - - def toJSON(self): - return fix_weridness_for_strings(json.dumps(self, default=lambda o: o.__dict__, - sort_keys=True, indent=4, ensure_ascii=False)) - - def genQR(self, data): - buff = io.BytesIO() - segno.make_qr(data).save(buff, kind='png') - qr = base64.b64encode(buff.getvalue()).decode('UTF-8') - buff.close() - return qr - - class Move: - def __init__(self, move, pp, pp_ups, strings: LanguageStrings, moveTypes: MoveTypes) -> None: - self.name = "None" if move == 0 else strings.get_move_name(move) - self.type = strings.get_type_name(moveTypes.get_type_name(str(move))) - if pp is not None and pp_ups is not None: - self.pp = pp - self.pp_ups = pp_ups - - class Stat: - def __init__(self, name, iv, ev, total) -> None: - self.stat_name = name - self.stat_iv = iv - self.stat_ev = ev - self.stat_total = total - - class ContestStat: - def __init__(self, name, value) -> None: - self.stat_name = name - self.stat_value = value - - class MetData: - def __init__(self, met_loc, met_level, met_year, met_month, met_day) -> None: - self.location = met_loc - self.level = met_level - self.year = met_year - self.month = met_month - self.day = met_day - - class EggData: - def __init__(self, egg_location, egg_year, egg_month, egg_day) -> None: - self.location = egg_location - self.year = egg_year - self.month = egg_month - self.day = egg_day - class Sprites: - def __init__(self, spriteHelper: Sprites, species: str, speciesNum: int, gender: str, shiny: bool, form: int, generation: int, context, formArg, item) -> None: - formName = self._get_form_name(speciesNum, form, context) - self.species = spriteHelper.get_pokemon_sprite(species.lower(), gender, shiny, formName.lower(), generation >= 8, formArg) - self.item = None if item == 0 else spriteHelper.get_item_sprite(item) - - def _get_form_name(self, species, form, context): - formList = FormConverter.GetFormList(species, GameInfo.Strings.types, GameInfo.Strings.forms, GameInfo.GenderSymbolUnicode, context) - if len(formList) > 1: - return formList[form] - return formList[0] diff --git a/python/utils/sprites.py b/python/utils/sprites.py deleted file mode 100644 index b41a955..0000000 --- a/python/utils/sprites.py +++ /dev/null @@ -1,211 +0,0 @@ -# type: ignore ReportMissingImport - -from utils.helpers import LanguageStrings -from PKHeX.Core import FormConverter, GameInfo, EntityContext -import json - -class Sprites: - BASE_URL = "https://cdn.sigkill.tech/sprites/" - POKEMON_WITH_FEMALE_FORMS = ['frillish','hippopotas','hippowdon','jellicent','meowstic','pikachu','pyroar','unfezant','wobbuffet','basculegion','indeedee'] - REPLACE_CHARS = { - "♀": "f", - "♂": "m", - "é": "e", - "’": "", - "'": "", - ": ": "-", - " ": "-", - ".": "", - } - ALCREMIE_DECORATIONS = { - "0": "strawberry", - "1": "berry", - "2": "love", - "3": "star", - "4": "clover", - "5": "flower", - "6": "ribbon", - } - - _bindings = {} - _item_bindings = {} - - def __init__(self): - with open("python/data/bindings.json", mode='r') as file: - self._bindings = json.load(file) - with open("python/data/item-map.json", mode='r') as file: - self._item_bindings = json.load(file) - - def get_pokemon_sprite(self, species, gender, shiny, form, useGen8Sprites, formArg = None): - # Check to see if the species is in the POKEMON_WITH_FEMALE_FORMS - checkBinding = True - path = "{}{}{}".format(self.BASE_URL, "pokemon-gen7x/" if not useGen8Sprites else "pokemon-gen8/", "shiny/" if shiny else "regular/") - - if species in self.POKEMON_WITH_FEMALE_FORMS and gender == "female": - path += "female/" - if species == "pikachu" and form == "normal": - checkBinding = False - - if checkBinding: - lookup = "{}_{}".format(species.replace(' ', '_'), form.replace(' ', '_')) - binding = self._bindings.get(lookup, None) - if binding is not None: - path += binding['file'] - if species == "alcremie": - path = path.replace('.png', '-{}.png'.format(self.ALCREMIE_DECORATIONS.get(str(formArg), "strawberry"))) - return path - # Check to see if we need to replace any characters - for char in self.REPLACE_CHARS: - species = species.replace(char, self.REPLACE_CHARS[char]) - path += "{}.png".format(species) - - return path - - def get_item_sprite(self, item): - # convert the item to a string - item = str(item) - # check the length of the item, we want 0000 format - if len(item) < 4: - item = item.zfill(4) - - # check to see if the item is in the item map - binding = self._item_bindings.get("item_{}".format(item), None) - if binding is not None: - return "{}items/{}.png".format(self.BASE_URL, binding) - # if not, return None - return None - - -def generate_bindings(strings: LanguageStrings): - contexts = [ - EntityContext.Gen1, - EntityContext.Gen2, - EntityContext.Gen3, - EntityContext.Gen4, - EntityContext.Gen5, - EntityContext.Gen6, - EntityContext.Gen7, - EntityContext.Gen7b, - EntityContext.Gen8, - EntityContext.Gen8a, - EntityContext.Gen8b - ] - species_form = [] - has_female_forms = [ - 'frillish', - 'hippopotas', - 'hippowdon', - 'jellicent', - 'meowstic', - 'pikachu', - 'pyroar', - 'unfezant', - 'wobbuffet', - 'basculegion', - 'indeedee' - ] - for context in contexts: - for i in range(1, 905): - forms = FormConverter.GetFormList(i, GameInfo.Strings.types, GameInfo.Strings.forms, GameInfo.GenderSymbolUnicode, context) - species = strings.get_species_name(i).lower() - for form in forms: - form = form.lower() - if form == "": - if species in has_female_forms and species not in species_form: - species_form.append("{}".format(species)) - continue - if form == "normal" and species not in species_form: - species_form.append("{}".format(species)) - continue - elif form == "normal": - continue - if form == "!": - form = "exclamation" - if form == "?": - form = "question" - if form == "♂": - form = "m" - if form == "♀": - form = "f" - - if "{} {}".format(species, form) not in species_form: - species_form.append("{} {}".format(species, form)) - species_form.sort() - # check to see if bindings.json exists, if it does check to see if we have a lastIndex - lastIndex = 0 - try: - with open("bindings.json", mode='r') as bindings: - data = json.load(bindings) - lastIndex = data.get("last_index") - # check the size - if len(species_form) != data.get('last_size'): - # print(len(species_form), data.get('last_size')) - q = input("The size of the species_form list is different than the lastSize in bindings.json, do you want to start from the beginning? (y/n): ") - if q == "y": - lastIndex = 0 - except FileNotFoundError: - pass - - # print("There are {} forms to go through and you have gotten through {} of them, meaning {} more to go, good luck, you're doing this manually".format(len(species_form), lastIndex, len(species_form)- lastIndex)) - bindings = {} - if lastIndex != 0: - bindings = data.get('bindings') - try: - for s in species_form: - if lastIndex != 0: - lastIndex -= 1 - continue - splitted = s.split(" ") - species = splitted[0] - has_female = species in has_female_forms - if len(splitted) == 1: - continue - - form = "-".join(splitted[1:]) - - # prompt for the image filename - question = input("is the image for {0}'s {1} form named {0}-{1}.png? (y/n): ".format(species, form)) - if question == "y": - bindings[s.replace(" ", "_")] = { - "file": "{}-{}.png".format(species, form), - "hasGen7Naming": False, - "hasFemale": has_female - } - continue - question2 = input("is it literally just the damn species name? (y/n): ") - if question2 == "y": - bindings[s.replace(" ", "_")] = { - "file": "{}.png".format(species), - "hasGen7Naming": False, - "hasFemale": has_female - } - continue - name = input("Enter the filename for {} (DO NOT ENTER THE EXTENSION, ASSUMING IT IS PNG): ".format(s)) - hasGen7 = input("Does this have a -gen7 form? (y or blank): ") - if hasGen7 == "y": - hasGen7 = True - else: - hasGen7 = False - - bindings[s.replace(" ", "_")] = { - "file": "{}.png".format(name), - "hasGen7Naming": hasGen7, - "hasFemale": has_female - } - - # Write the bindings to a json file - with open("bindings.json", mode='w') as f: - json.dump(bindings, f, indent=4) - except KeyboardInterrupt: - # Write the bindings to a json file so we can resume later - with open("bindings.json", mode='w') as f: - json.dump({ - "bindings": bindings, - "last_index": species_form.index(s), - "last_size": len(species_form) - }, f, indent=4) - # print("Interrupted, saved bindings to bindings.json") - - - - \ No newline at end of file diff --git a/python/utils/weridness.py b/python/utils/weridness.py deleted file mode 100644 index 00a9743..0000000 --- a/python/utils/weridness.py +++ /dev/null @@ -1,43 +0,0 @@ -import re - -def fix_weridness_for_strings(input: str): - """ - This is a hackish workaround for something I can't figure out. - """ - # check for more than 1 sourrending paranthesis around a string using regex - match = re.search(r"\(\(.*\)\)", input) - if match: - # Get the content of the paranthesis - string = match.group(0) - # Remove all paranthesis - string = string.replace("(", "") - string = string.replace(")", "") - if string == "None": - # Replace the string with the original string - input = input.replace(match.group(0), "None") - - else: - # wrap the string in paranthesis - string = f"({string})" - # Replace the string with the original string - input = input.replace(match.group(0), string) - - # Check for (None) and replace instances of it with None - input = input.replace("(None)", "None") - - # check repeating text like (npc) (npc) (npc) - matches = re.findall(r"\(.*\)\s\(.*\)\"", input) - # there may be multiple matches, we have to deal with them all - if len(matches) > 0: - for match in matches: - # split the match by spaces - split = match.split(" ") - # get the last item in the list - string = split[-1] - # replace the input with the new string - input = input.replace(match, string) - # print(split, string, input) - - - # if there isn't anything we need to fix, just return the input - return input