Skip to content

This is the documentation for Purpur that uses Mkdocs to generate a static site hosted on https://purpur.pl3x.net/docs

License

Notifications You must be signed in to change notification settings

Roan-V/PurpurDocs

This branch is 164 commits behind PurpurMC/PurpurDocs:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

36ca6c5 · Aug 12, 2021
May 20, 2021
Aug 12, 2021
Jan 10, 2021
May 19, 2021
May 11, 2021
Jan 5, 2021
Aug 12, 2021
Jul 26, 2021
Jan 27, 2021
Jun 30, 2021
Jun 29, 2021

Repository files navigation

PurpurDocs

This is the documentation for Purpur that uses Mkdocs to generate a static site hosted on https://purpur.pl3x.net/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

About

This is the documentation for Purpur that uses Mkdocs to generate a static site hosted on https://purpur.pl3x.net/docs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 74.0%
  • HTML 9.2%
  • CSS 8.4%
  • Shell 8.4%