GithubHelp home page GithubHelp logo

onako2 / purpurdocs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from purpurmc/purpurdocs

0.0 0.0 0.0 6.69 MB

This is the documentation for Purpur that uses Mkdocs to generate a static site

Home Page: https://purpurmc.org/docs

License: BSD 2-Clause "Simplified" License

Shell 6.61% JavaScript 18.93% Python 59.34% CSS 6.85% HTML 8.27%

purpurdocs's Introduction

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

purpurdocs's People

Contributors

granny avatar encode42 avatar emielderckx avatar billygalbreath avatar roan-v avatar youhavetrouble avatar melncat avatar justdoom avatar rhythmicsys avatar fredster33 avatar poikcue avatar xarius86 avatar 12emin34 avatar 1bytebit avatar pantera07 avatar jlitewski avatar joshuaprince avatar 2stinkysocks avatar theomega24 avatar mrfishcakes avatar slackadays avatar jschenke488 avatar jlyne avatar jazzkuh avatar krakenied avatar mironovmeow avatar oharass avatar owen1212055 avatar rafaelflromao avatar ynfuien avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.