From 1c1ed6c5255c436d8e86441d8851f464749bd146 Mon Sep 17 00:00:00 2001 From: mtkennerly Date: Wed, 15 Jul 2020 15:34:37 -0400 Subject: [PATCH] Fix up some redirected pages and add pre-commit hooks --- .pre-commit-config.yaml | 18 ++++++++++ CONTRIBUTING.md | 5 +++ data/manifest.yaml | 67 ++++++++++++++++++++++++++++++++++++++ data/missing.md | 8 ++--- data/steam-game-cache.yaml | 5 +++ data/wiki-game-cache.yaml | 50 ++++++++++++++-------------- src/manifest.ts | 4 +-- src/wiki.ts | 1 - 8 files changed, 122 insertions(+), 36 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..e90b8e23 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.1.7 + hooks: + - id: forbid-tabs + - repo: local + hooks: + - id: schema + name: schema + language: system + entry: npm run schema + types: [yaml] + pass_filenames: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 744fb2f3..c30c7190 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,6 +9,11 @@ Generally, you just need these commands: * `npm run schema` * List some stats about the data set: * `npm run stats` +* Activate pre-commit hooks (requires Python): + ``` + pip install --user pre-commit + pre-commit install + ``` There are some lower-level commands for finer control or full imports: diff --git a/data/manifest.yaml b/data/manifest.yaml index d61edf8f..8c2d0920 100644 --- a/data/manifest.yaml +++ b/data/manifest.yaml @@ -79769,6 +79769,17 @@ Fairy Fencer F: Fairy Fencer F: {} steam: id: 347830 +'Fairy Fencer F: Advent Dark Force': + files: + '/My Games/Idea Factory International, Inc/Fairy Fencer F Advent Dark Force': + tags: + - save + when: + - os: windows + installDir: + Fairy Fencer F Advent Dark Force: {} + steam: + id: 524580 'Fairy Godmother Stories: Cinderella': installDir: Fairy Godmother Stories Cinderella Collector's Edition: {} @@ -89637,6 +89648,9 @@ Fused: Fused: {} steam: id: 1001910 +Fuser: + steam: + id: 1331440 Futanari Quest: steam: id: 790410 @@ -157530,6 +157544,23 @@ Okaeri: Okaeri: {} steam: id: 1147960 +Okami HD: + files: + /userdata//587620/remote: + tags: + - save + when: + - os: windows + store: steam + /OKAMI HD: + tags: + - config + when: + - os: windows + installDir: + Okami: {} + steam: + id: 587620 'Okay, Panic!': installDir: 'Okay, Panic!': {} @@ -195159,6 +195190,11 @@ Shadow Fencer Theatre: Shadow Force: steam: id: 883750 +Shadow Gangs: + installDir: + Shadow Gangs: {} + steam: + id: 1143430 'Shadow Harvest: Phantom Ops': files: /Shadow Harvest/Controls.ini: @@ -208617,6 +208653,22 @@ Sponchies: Sponchies: {} steam: id: 593670 +'SpongeBob SquarePants: Battle for Bikini Bottom - Rehydrated': + files: + /Pineapple/Saved/Config/WindowsNoEditor: + tags: + - config + when: + - os: windows + /Pineapple/Saved/SaveGames: + tags: + - save + when: + - os: windows + installDir: + SpongeBob SquarePants Battle for Bikini Bottom - Rehydrated: {} + steam: + id: 969990 'SpongeBob SquarePants: Employee of the Month': files: /saved: @@ -219603,6 +219655,21 @@ Sword 'N' Board: Sword N Board: {} steam: id: 425230 +Sword Art Online Alicization Lycoris: + files: + /userdata//1009290/remote: + tags: + - save + when: + - os: windows + store: steam + /sao_al/userdata/GRPCFG.bin: + tags: + - config + when: + - os: windows + steam: + id: 1009290 'Sword Art Online Re: Hollow Fragment': installDir: SAOHF: {} diff --git a/data/missing.md b/data/missing.md index 95dbed7a..ce2fd160 100644 --- a/data/missing.md +++ b/data/missing.md @@ -10613,7 +10613,6 @@ * [Fairspace](https://www.pcgamingwiki.com/wiki/?curid=45968) * [Fairtravel Battle](https://www.pcgamingwiki.com/wiki/?curid=157331) * [Fairy Escape](https://www.pcgamingwiki.com/wiki/?curid=92775) -* [Fairy Fencer F Advent Dark Force](https://www.pcgamingwiki.com/wiki/?curid=57452) * [Fairy Godmother Stories: Cinderella](https://www.pcgamingwiki.com/wiki/?curid=153042) * [Fairy Knights](https://www.pcgamingwiki.com/wiki/?curid=127486) * [Fairy Lands: Rinka and the Fairy Gems](https://www.pcgamingwiki.com/wiki/?curid=66464) @@ -12032,7 +12031,7 @@ * [Fury's Sky](https://www.pcgamingwiki.com/wiki/?curid=144224) * [Fuse Balls](https://www.pcgamingwiki.com/wiki/?curid=87952) * [Fused](https://www.pcgamingwiki.com/wiki/?curid=125113) -* [FUSER](https://www.pcgamingwiki.com/wiki/?curid=161491) +* [Fuser](https://www.pcgamingwiki.com/wiki/?curid=161491) * [Futanari Quest](https://www.pcgamingwiki.com/wiki/?curid=92857) * [Future Aero Racing S Ultra](https://www.pcgamingwiki.com/wiki/?curid=127999) * [Future City Coaster](https://www.pcgamingwiki.com/wiki/?curid=90030) @@ -21151,7 +21150,6 @@ * [OK Boomer](https://www.pcgamingwiki.com/wiki/?curid=153810) * [OK K.O.! Let's Play Heroes](https://www.pcgamingwiki.com/wiki/?curid=80430) * [Okaeri](https://www.pcgamingwiki.com/wiki/?curid=144815) -* [Ōkami HD](https://www.pcgamingwiki.com/wiki/?curid=70781) * [Okay, Panic!](https://www.pcgamingwiki.com/wiki/?curid=141041) * [Okinawa Rush](https://www.pcgamingwiki.com/wiki/?curid=58884) * [Olaguna Chronicles](https://www.pcgamingwiki.com/wiki/?curid=156396) @@ -26163,7 +26161,7 @@ * [Shadow Fear Path to Insanity](https://www.pcgamingwiki.com/wiki/?curid=105371) * [Shadow Fencer Theatre](https://www.pcgamingwiki.com/wiki/?curid=132784) * [Shadow Force](https://www.pcgamingwiki.com/wiki/?curid=130464) -* [Shadow gangs](https://www.pcgamingwiki.com/wiki/?curid=161212) +* [Shadow Gangs](https://www.pcgamingwiki.com/wiki/?curid=161212) * [Shadow Heroes: Vengeance In Flames](https://www.pcgamingwiki.com/wiki/?curid=34781) * [Shadow Hunter](https://www.pcgamingwiki.com/wiki/?curid=48162) * [Shadow Legend VR](https://www.pcgamingwiki.com/wiki/?curid=124421) @@ -27935,7 +27933,6 @@ * [Spoko and Poko](https://www.pcgamingwiki.com/wiki/?curid=47958) * [Sponchies](https://www.pcgamingwiki.com/wiki/?curid=72692) * [SpongeBob SquarePants: Battle for Bikini Bottom](https://www.pcgamingwiki.com/wiki/?curid=16581) -* [SpongeBob SquarePants: Battle for Bikini Bottom Rehydrated](https://www.pcgamingwiki.com/wiki/?curid=138112) * [SpongeBob SquarePants: Diner Dash](https://www.pcgamingwiki.com/wiki/?curid=140400) * [SpongeBob: Patty Pursuit](https://www.pcgamingwiki.com/wiki/?curid=160743) * [Spooky Bonus](https://www.pcgamingwiki.com/wiki/?curid=34823) @@ -29298,7 +29295,6 @@ * [Sword 'N' Board](https://www.pcgamingwiki.com/wiki/?curid=44766) * [Sword and Shield](https://www.pcgamingwiki.com/wiki/?curid=52866) * [Sword Art Online Re: Hollow Fragment](https://www.pcgamingwiki.com/wiki/?curid=108434) -* [Sword Art Online: Alicization Lycoris](https://www.pcgamingwiki.com/wiki/?curid=133036) * [Sword Art Online: Lost Song](https://www.pcgamingwiki.com/wiki/?curid=122967) * [Sword Bros](https://www.pcgamingwiki.com/wiki/?curid=74999) * [Sword Defense](https://www.pcgamingwiki.com/wiki/?curid=130026) diff --git a/data/steam-game-cache.yaml b/data/steam-game-cache.yaml index 80095a9f..d0b9204c 100644 --- a/data/steam-game-cache.yaml +++ b/data/steam-game-cache.yaml @@ -14998,6 +14998,7 @@ installDir: Unreal Gold '1330740': installDir: Battle For Crown Multiplayer +'1331440': {} '1332010': {} '1334730': {} '1337920': {} @@ -42780,6 +42781,8 @@ '587580': installDir: Nature Treks VR '587590': {} +'587620': + installDir: Okami '587670': installDir: Gremlins_vs_Automatons '587690': @@ -72491,6 +72494,8 @@ installDir: Woodcutter Simulator 2011 '969970': installDir: BattleRush Ardennes Assault +'969990': + installDir: SpongeBob SquarePants Battle for Bikini Bottom - Rehydrated '97000': installDir: Solar 2 '970000': diff --git a/data/wiki-game-cache.yaml b/data/wiki-game-cache.yaml index 70aae6fe..d9e67929 100644 --- a/data/wiki-game-cache.yaml +++ b/data/wiki-game-cache.yaml @@ -38594,11 +38594,6 @@ FULLCHOKE: FUNGI: pageId: 156019 revId: 931093 -FUSER: - pageId: 161491 - renamedFrom: - - Fuser - revId: 0 FUTURE GPX CYBER FORMULA SIN VIER: pageId: 123862 revId: 852743 @@ -38830,9 +38825,9 @@ Fairy Escape: Fairy Fencer F: pageId: 23023 revId: 982514 -Fairy Fencer F Advent Dark Force: +'Fairy Fencer F: Advent Dark Force': pageId: 57452 - revId: 982518 + revId: 982517 'Fairy Godmother Stories: Cinderella': pageId: 153042 revId: 915746 @@ -43678,6 +43673,11 @@ Fuse Balls: Fused: pageId: 125113 revId: 854301 +Fuser: + pageId: 161491 + renamedFrom: + - FUSER + revId: 981922 Futanari Quest: pageId: 92857 revId: 854302 @@ -76802,6 +76802,11 @@ Oirbo: Okaeri: pageId: 144815 revId: 946155 +Okami HD: + pageId: 70781 + renamedFrom: + - Ōkami HD + revId: 981042 'Okay, Panic!': pageId: 141041 revId: 863683 @@ -95131,6 +95136,11 @@ Shadow Fencer Theatre: Shadow Force: pageId: 130464 revId: 868820 +Shadow Gangs: + pageId: 161212 + renamedFrom: + - Shadow gangs + revId: 974366 'Shadow Harvest: Phantom Ops': pageId: 40999 revId: 868821 @@ -95215,11 +95225,6 @@ Shadow Watch: 'Shadow Wolf Mysteries: Under the Crimson Moon Collector''s Edition': pageId: 123673 revId: 868847 -Shadow gangs: - pageId: 161212 - renamedFrom: - - Shadow Gangs - revId: 974367 Shadow of Conquest: pageId: 61548 revId: 868848 @@ -101539,12 +101544,11 @@ Sponchies: pageId: 16581 revId: 977391 tooBroad: true -'SpongeBob SquarePants: Battle for Bikini Bottom Rehydrated': +'SpongeBob SquarePants: Battle for Bikini Bottom - Rehydrated': pageId: 138112 renamedFrom: - 'SpongeBob SquarePants: Battle for Bikini Bottom Rehydrated' - - 'SpongeBob SquarePants: Battle for Bikini Bottom - Rehydrated' - revId: 976749 + revId: 982568 'SpongeBob SquarePants: Diner Dash': pageId: 140400 revId: 934458 @@ -106527,14 +106531,14 @@ Switcher: Sword 'N' Board: pageId: 44766 revId: 872205 +Sword Art Online Alicization Lycoris: + pageId: 133036 + renamedFrom: + - 'Sword Art Online: Alicization Lycoris' + revId: 982055 'Sword Art Online Re: Hollow Fragment': pageId: 108434 revId: 966487 -'Sword Art Online: Alicization Lycoris': - pageId: 133036 - renamedFrom: - - Sword Art Online Alicization Lycoris - revId: 0 'Sword Art Online: Fatal Bullet': pageId: 80649 revId: 966033 @@ -130887,12 +130891,6 @@ Zzzzz: Černaja Metka: pageId: 139919 revId: 953789 -Ōkami HD: - pageId: 70781 - renamedFrom: - - Ōkami HD - - Okami HD - revId: 975594 'ΔV: Rings of Saturn': pageId: 109004 revId: 879097 diff --git a/src/manifest.ts b/src/manifest.ts index 34690159..ed193824 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -108,7 +108,7 @@ export class ManifestFile extends YamlFile { } const game = await getGame(title, wikiCache); - wikiCache[title].recentlyChanged = false; + delete wikiCache[title].recentlyChanged; if (game.files === undefined && game.registry === undefined && game.steam?.id === undefined) { delete this.data[title]; continue; @@ -128,5 +128,3 @@ export class ManifestFile extends YamlFile { } } } - - diff --git a/src/wiki.ts b/src/wiki.ts index 788f882a..ffad4819 100644 --- a/src/wiki.ts +++ b/src/wiki.ts @@ -524,4 +524,3 @@ export async function getGame(pageTitle: string, cache: WikiGameCache): Promise< cache[pageTitle].revId = page.revisions?.[0]?.revid ?? 0; return game; } -