diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index c1321c0..f54ec76 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -58,7 +58,7 @@ jobs: base_path="${{ steps.pages.outputs.base_path }}" base_url="${{ steps.pages.outputs.base_url }}" - bundle exec htmlproofer _site --swap-urls "^$base_path/:/,^${base_url/:/\\:}/:/" + bundle exec htmlproofer _site --swap-urls "^$base_path/:/,^${base_url/:/\\:}/:/" --ignore-files "/_site\\/mods/" - name: Upload artifact if: github.ref == 'refs/heads/master' && github.repository == 'bl-sdk/willow2-mod-db' diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000..a5e5adc --- /dev/null +++ b/.typos.toml @@ -0,0 +1,4 @@ +[files] +extend-exclude = [ + "_mods/" +] diff --git a/_mods/BackpackManager.md b/_mods/BackpackManager.md index 1073be6..fb3fe26 100644 --- a/_mods/BackpackManager.md +++ b/_mods/BackpackManager.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/bl-sdk/former-default-mods/raw/master/BackpackManager/BackpackManager.zip legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 - TPS diff --git a/_mods/BorderlandsCommander.md b/_mods/BorderlandsCommander.md index 4a29b11..c0d8cc5 100644 --- a/_mods/BorderlandsCommander.md +++ b/_mods/BorderlandsCommander.md @@ -5,9 +5,7 @@ dependencies: - UserFeedback>=1.5 download: https://github.com/mopioid/Borderlands-Commander/releases/tag/2.5 legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 - TPS diff --git a/_mods/CleaningUpPandora.md b/_mods/CleaningUpPandora.md index fe7d880..8cbed85 100644 --- a/_mods/CleaningUpPandora.md +++ b/_mods/CleaningUpPandora.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/Decept1x/Borderlands-Cleaning-Up-Pandora/releases/tag/1.1 legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 - TPS diff --git a/_mods/ComboCounter.md b/_mods/ComboCounter.md index 9812b61..cca868d 100644 --- a/_mods/ComboCounter.md +++ b/_mods/ComboCounter.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/Sartick/bl-sdk-mods/blob/main/ComboCounter/ComboCounter.zip legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 - TPS diff --git a/_mods/CrossClassSkillRandomizer.md b/_mods/CrossClassSkillRandomizer.md index 92a79b8..d9f3570 100644 --- a/_mods/CrossClassSkillRandomizer.md +++ b/_mods/CrossClassSkillRandomizer.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/bl-sdk/former-default-mods/raw/master/SkillRandomizer/SkillRandomizer.zip legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 title: Cross Class Skill Randomizer diff --git a/_mods/CustomScopedSensitivity.md b/_mods/CustomScopedSensitivity.md index 156bd69..bb85d16 100644 --- a/_mods/CustomScopedSensitivity.md +++ b/_mods/CustomScopedSensitivity.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/Decept1x/Borderlands-Custom-Scoped-Sensitivity/releases/tag/1.0 legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 - TPS diff --git a/_mods/EasyReadOnly.md b/_mods/EasyReadOnly.md index 5bcf7d7..1d39aee 100644 --- a/_mods/EasyReadOnly.md +++ b/_mods/EasyReadOnly.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/bl-sdk/former-default-mods/raw/master/ReadOnly/ReadOnly.zip legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 - TPS diff --git a/_mods/ExpAdjuster.md b/_mods/ExpAdjuster.md index 3e2894c..42d7f63 100644 --- a/_mods/ExpAdjuster.md +++ b/_mods/ExpAdjuster.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/plu5/p-borderlands/releases/latest legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 title: Exp Adjuster diff --git a/_mods/ItemLevelUncapper.md b/_mods/ItemLevelUncapper.md index 47decdf..2b23b17 100644 --- a/_mods/ItemLevelUncapper.md +++ b/_mods/ItemLevelUncapper.md @@ -20,5 +20,5 @@ This mod is useless by itself, it should be used alongside the hexedit to increa Fixes the level cap of most items so that they continue spawning past level 100. -Note that past level 127, items cannot be serialized corrently, and will revert to a lower level on SQ. Use [Sanity Saver](/mods/SanitySaver) to fix this. +Note that past level 127, items cannot be serialized corrently, and will revert to a lower level on SQ. Use [Sanity Saver]({{- "/mods/sanitysaver" | relative_url -}}) to fix this. Also note that there may still be various other issues with an increased level cap, this only fixes that most items stop spawning. \ No newline at end of file diff --git a/_mods/KeepAnarchy.md b/_mods/KeepAnarchy.md index 7f4a9da..71c8af4 100644 --- a/_mods/KeepAnarchy.md +++ b/_mods/KeepAnarchy.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/Sampletext282/bl2-mods/blob/main/KeepAnarchy/KeepAnarchy.zip?raw=true legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 title: KeepAnarchy diff --git a/_mods/KeyboardChange.md b/_mods/KeyboardChange.md index ee324ea..eaede3f 100644 --- a/_mods/KeyboardChange.md +++ b/_mods/KeyboardChange.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://gitlab.com/Ceiyne/borderlands-mods/-/raw/main/Keyboard%20Change/KBChange.zip?inline=false legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 - TPS diff --git a/_mods/LiveFeed.md b/_mods/LiveFeed.md index 7b173e2..f3d9f02 100644 --- a/_mods/LiveFeed.md +++ b/_mods/LiveFeed.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/mopioid/Borderlands-Live-Feed/releases/tag/1.2 legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 title: Live Feed diff --git a/_mods/LootRandomizer.md b/_mods/LootRandomizer.md index 5b70d8d..974ca14 100644 --- a/_mods/LootRandomizer.md +++ b/_mods/LootRandomizer.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/mopioid/Borderlands-Loot-Randomizer/releases/tag/1.5.2 legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 - TPS diff --git a/_mods/MapReloader.md b/_mods/MapReloader.md index 9c523fa..0453b31 100644 --- a/_mods/MapReloader.md +++ b/_mods/MapReloader.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/bl-sdk/former-default-mods/raw/master/Quickload/Quickload.zip legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 - TPS diff --git a/_mods/ReignOfGiants.md b/_mods/ReignOfGiants.md index 02edc08..c134104 100644 --- a/_mods/ReignOfGiants.md +++ b/_mods/ReignOfGiants.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/mopioid/Borderlands-Reign-Of-Giants/releases/tag/1.2 legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 title: Reign Of Giants diff --git a/_mods/SavesBackuper.md b/_mods/SavesBackuper.md index 0912d8a..1c1a5fb 100644 --- a/_mods/SavesBackuper.md +++ b/_mods/SavesBackuper.md @@ -5,9 +5,7 @@ dependencies: - UserFeedback>=1.5 download: https://github.com/plu5/p-borderlands/releases/latest legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 title: Saves Backuper diff --git a/_mods/SkinRandomizer.md b/_mods/SkinRandomizer.md index ed99921..4fc83f5 100644 --- a/_mods/SkinRandomizer.md +++ b/_mods/SkinRandomizer.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/Cae-l/bl-sdk-mods/raw/master/SkinRandomizer/SkinRandomizer.zip legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 title: Skin Randomizer diff --git a/_mods/SprintAdjuster.md b/_mods/SprintAdjuster.md index 5bcb0d7..e32d515 100644 --- a/_mods/SprintAdjuster.md +++ b/_mods/SprintAdjuster.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/plu5/p-borderlands/releases/latest legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 title: Sprint Adjuster diff --git a/_mods/SprintSetandForget.md b/_mods/SprintSetandForget.md index 3eccab0..8940143 100644 --- a/_mods/SprintSetandForget.md +++ b/_mods/SprintSetandForget.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://gitlab.com/Ceiyne/borderlands-mods/-/raw/main/Sprint%20Set-and-Forget/Sprint_Set-and-Forget.zip?inline=false legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 - TPS diff --git a/_mods/TwitchLogin.md b/_mods/TwitchLogin.md index 21fdf0a..2b2e0cf 100644 --- a/_mods/TwitchLogin.md +++ b/_mods/TwitchLogin.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/mopioid/Borderlands-Twitch-Login/releases/tag/1.0 legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 - TPS diff --git a/_mods/VisualTriggers.md b/_mods/VisualTriggers.md index e461d22..c3bd5c2 100644 --- a/_mods/VisualTriggers.md +++ b/_mods/VisualTriggers.md @@ -4,9 +4,7 @@ coop_support: Unknown dependencies: [] download: https://github.com/GameChanger97/Bl2-Mods/blob/main/VisualTriggers/VisualTriggers.zip?raw=true legacy: true -license: - name: Unknown - url: '' +license: {} supported_games: - BL2 title: Visual Triggers diff --git a/_mods/_download_legacy.py b/_mods/_download_legacy.py index bc12ce2..0f5588b 100644 --- a/_mods/_download_legacy.py +++ b/_mods/_download_legacy.py @@ -8,7 +8,9 @@ MOD_FOLDER = Path(__file__).parent LEGACY_MODS_JSON_URL = "https://bl-sdk.github.io/mods.json" + YT_TAG_REGEX = re.compile(r"!\[yt\]\((.+?)\)", flags=re.I) +LOCAL_MOD_LINK_REGEX = re.compile(r"\[(.+?)\]\(/mods/(.+?)\)") def arr_to_sentence(arr: list[str], joiner: str = "and") -> str: @@ -23,8 +25,13 @@ def arr_to_sentence(arr: list[str], joiner: str = "and") -> str: return ", ".join(arr[:-1]) + f", {joiner} " + arr[-1] -def replace_yt_tags(data: str) -> str: - return YT_TAG_REGEX.sub(lambda match: f"\n\n{{% youtube {match.group(1)} %}}", data) +def fixup_description(data: str) -> str: + data = YT_TAG_REGEX.sub(lambda m: f"\n\n{{% youtube {m.group(1)} %}}", data) + data = LOCAL_MOD_LINK_REGEX.sub( + lambda m: f'[{m.group(1)}]({{{{- "/mods/{m.group(2).lower()}" | relative_url -}}}})', + data, + ) + return data def convert_mod_data(mod: dict[str, Any]) -> None: @@ -41,7 +48,7 @@ def convert_mod_data(mod: dict[str, Any]) -> None: "url": mod["license"][1], } if len(mod["license"]) > 0 - else {"name": "Unknown", "url": ""} + else {} ), "dependencies": [ name + version for name, version in mod["requirements"].items() @@ -60,7 +67,7 @@ def convert_mod_data(mod: dict[str, Any]) -> None: "---\n" + yaml.dump(converted_data) + "---\n" - + replace_yt_tags(mod["description"]) + + fixup_description(mod["description"]) ) diff --git a/developing/index.md b/developing/index.md index 3edc284..b9f051f 100644 --- a/developing/index.md +++ b/developing/index.md @@ -39,7 +39,7 @@ Work in progress - `mod_manager.extra_folders` - This is a list of extra mod folders, which lets you keep your development folder seperate from + This is a list of extra mod folders, which lets you keep your development folder separate from other mods. 3. Download the latest version of debugpy, and extract to one of your mods folders such that it's diff --git a/index.md b/index.md index eb1c043..74edfd8 100644 --- a/index.md +++ b/index.md @@ -40,7 +40,7 @@ nav_order: 1 5. The SDK should be installed now. You should see a new `MODS` option on the main menu. You can click this to start configuring your mods. - ![The mods menu](/assets/images/installation/03-mod-menu.png) + ![The mods menu](https://bl-sdk.github.io/assets/images/posts/mod-install1.5.png) 6. To install SDK mods, navigate back to the `sdk_mods` folder you extracted during step 3. SDK mods come in two forms: