MCPcopy Index your code
hub / github.com/PurpurMC/PurpurDocs

github.com/PurpurMC/PurpurDocs @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
3 symbols 14 edges 2 files 0 documented · 0% updated 6d ago★ 446 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

PurpurDocs

This is the documentation for Purpur that uses Mkdocs to generate a static site hosted on https://purpurmc.org/docs. Included is a Python script that compares the diff of two commit hashes and outputs the config/permission additions/removals into a YAML file.

Building

Create and activate a Python 3 virtual environment

$ pip install --user virtualenv
$ virtualenv env
$ source env/bin/activate

Install the required packages

pip install -r requirements.txt

Preview changes

To preview your changes to the documentation, run mkdocs serve. This will start a web server that will preview the documentation and recompile it as you make changes. More info is shown here: https://www.mkdocs.org/#getting-started

$ mkdocs serve

Compare commits for config/permission additions/removals

Run the compare-commits.sh script to run an interactive script that compares between Purpur commits and generates a file of config option/permission additions/removals.

./compare-commits.sh <prev_hash> <curr_hash>

You can also add two commit hashes as command line arguments and it will skip the interactive aspect of the script.

$ ./compare-commits.sh 885092 22b876
# logs/885092..22b876.yml

config:
  additions:
  - gameplay-mechanics.item.immune.cactus: new ArrayList<>()
  - gameplay-mechanics.player.fix-stuck-in-portal: 'false'
  removals:
  - projectile-load-save-per-chunk-limit: '-1'
permission:
  additions: []
  removals: []

./compare-commits.sh <prev_hash>

Including only one hash will compare it to the latest commit of the branch specified (which is ver/1.16.5 at the time of writing).

$ ./compare-commits.sh 885092
# logs/885092..ver|1.16.5.yml

config:
  additions:
  - gameplay-mechanics.item.immune.cactus: new ArrayList<>()
  - gameplay-mechanics.player.fix-stuck-in-portal: 'false'
  removals:
  - projectile-load-save-per-chunk-limit: '-1'
permission:
  additions: []
  removals: []

./compare-commits.sh --no-commits

Running the script with the option --no-commits or -nc will create a last_commit file that includes the most recent commit at runtime. Running it again will make it use the hash located in last_commit as the first commit hash, replacing it with the most recent commit after generating the file.

# First time running it
$ ./compare-commits.sh -nc
# logs/885092..ver|1.16.5.yml

config:
  additions:
  - gameplay-mechanics.item.immune.cactus: new ArrayList<>()
  - gameplay-mechanics.player.fix-stuck-in-portal: 'false'
  removals:
  - projectile-load-save-per-chunk-limit: '-1'
permission:
  additions: []
  removals: []
# Creates a last_commit file
885092
# Running it again after new commits are pushed to Purpur
$ ./compare-commits.sh -nc
# logs/885092..22b876.yml

config:
  additions:
  - gameplay-mechanics.item.immune.cactus: new ArrayList<>()
  - gameplay-mechanics.player.fix-stuck-in-portal: 'false'
  removals:
  - projectile-load-save-per-chunk-limit: '-1'
permission:
  additions: []
  removals: []
# Modifies the last_commit file
22b876

Core symbols most depended-on inside this repo

find_default_value
called by 2
base.py
compile_diff
called by 1
base.py
main
called by 1
base.py

Shape

Function 3

Languages

Python100%

Modules by API surface

base.py3 symbols

For agents

$ claude mcp add PurpurDocs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact