feat(docs): add nexus page BBCode generator#15
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a small documentation toolchain to keep Nexus Mods page BBCode in sync with the user-facing README content, reducing duplication between README.md and docs/nexus-page.md.
Changes:
- Added a Python script to extract a marked README block, convert limited Markdown to BBCode, and inject it into a Nexus page template.
- Added a
<!-- nexus:start/end -->block inREADME.mdcontaining Requirements/Installation/Compatibility intended for Nexus. - Added
<!-- generated:start/end -->markers inside the BBCode fence indocs/nexus-page.mdto define the injection region.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| scripts/generate-nexus-page.py | New generator script: README block extraction, Markdown→BBCode conversion, and template injection to stdout. |
| README.md | Adds the Nexus-specific user-facing block (requirements/install/compatibility) bounded by markers. |
| docs/nexus-page.md | Adds generated block markers inside the BBCode template to support automated injection. |
Comments suppressed due to low confidence (1)
scripts/generate-nexus-page.py:139
- Same issue as above: if the end marker is before the start marker, the error only references the start marker constant. Please include both markers (or indices) to make the failure actionable when the template is malformed.
if start >= end:
sys.exit(f"error: end marker appears before start marker: {GEN_START!r}")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
codepuncher
force-pushed
the
feat/nexus-page-sync
branch
from
May 20, 2026 17:38
0988c9c to
acc672f
Compare
codepuncher
force-pushed
the
feat/nexus-page-sync
branch
from
May 20, 2026 17:39
acc672f to
8a43473
Compare
codepuncher
force-pushed
the
feat/nexus-page-sync
branch
2 times, most recently
from
May 20, 2026 17:41
99d65df to
90fd2ff
Compare
codepuncher
force-pushed
the
feat/nexus-page-sync
branch
from
May 20, 2026 17:48
90fd2ff to
f0b087d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
scripts/generate-nexus-page.py:146
inject_generated()findsGEN_ENDwithbbcode_content.find(GEN_END)from the beginning of the BBCode block. If<!-- generated:end -->appears earlier than the intended region (or if multiple regions exist), this can select the wrong end marker and break injection. FindGEN_ENDstarting afterGEN_START(e.g.,bbcode_content.find(GEN_END, start + len(GEN_START))) and consider checking for multiple occurrences to avoid ambiguous templates.
def inject_generated(bbcode_content: str, generated: str) -> str:
start = bbcode_content.find(GEN_START)
end = bbcode_content.find(GEN_END)
if start == -1:
sys.exit(f"error: marker not found: {GEN_START!r}")
if end == -1:
sys.exit(f"error: marker not found: {GEN_END!r}")
if start >= end:
sys.exit(f"error: end marker {GEN_END!r} appears before start marker {GEN_START!r}")
return (
bbcode_content[:start]
+ GEN_START + "\n"
+ generated + "\n"
+ bbcode_content[end:]
)
codepuncher
force-pushed
the
feat/nexus-page-sync
branch
from
May 20, 2026 19:42
f0b087d to
d71bb5a
Compare
codepuncher
force-pushed
the
feat/nexus-page-sync
branch
from
May 20, 2026 19:53
d71bb5a to
6f35adf
Compare
codepuncher
force-pushed
the
feat/nexus-page-sync
branch
2 times, most recently
from
May 20, 2026 19:54
778b9bf to
271ddf6
Compare
codepuncher
force-pushed
the
feat/nexus-page-sync
branch
from
May 20, 2026 19:59
271ddf6 to
468b35d
Compare
codepuncher
force-pushed
the
feat/nexus-page-sync
branch
from
May 20, 2026 20:06
468b35d to
5be1558
Compare
- README.md: add user-facing Requirements, Installation, Compatibility block wrapped in nexus:start/end markers before dev Prerequisites - docs/nexus-page.md: wrap generated sections in generated:start/end markers - scripts/generate-nexus-page.py: extract nexus block from README, convert Markdown to BBCode, inject into nexus-page.md template, print to stdout
codepuncher
force-pushed
the
feat/nexus-page-sync
branch
from
May 20, 2026 20:06
5be1558 to
5a0a66f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Python script that generates Nexus Mods BBCode from the user-facing section of
README.md, so requirements, installation, and compatibility only need to be maintained in one place.scripts/generate-nexus-page.py: reads README nexus block, converts Markdown→BBCode, injects into template, prints to stdoutUsage:
Testing
Ran the script and verified output matches expected BBCode structure.
Breaking Changes
Related