From 08507b8d533522df7ffb83efd1985fe6e9923ae8 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 8 Dec 2025 22:29:38 +0900 Subject: [PATCH] README: improve sections on getting started --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8a9fbb6..1088ea1 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Map markers for PVV's minecraft server This project is meant to let PVV members contribute map data for PVV's minecraft server, like coordinates for bases, cities, and other points of interest. These markers are written in python so that we can do things like generating points in a loop, calculating distances, and other types of automation. -There is also a cli tool that we use to export these points into the formats of several minecraft map implementations. +The codebase includes a CLI tool that we use to export this data into the formats of several minecraft map implementations. ## Marker sets @@ -37,6 +37,47 @@ Here is an overview of the different marker sets, and what they are meant for. - Other: anything that doesn't fit into the other categories - Portals: end portals that send you back to the center of the map +## How to run the python code + +You can either use `uv`, `nix` or the bundled `Makefile` with a bare python installation to run the project. + +There should be no external dependencies to run the code. + +In the following sections of the readme, we will assume that you are using `uv`, but the other methods can also be adapted to the instructions. + +### Using uv + +If you have [uv](https://docs.astral.sh/uv/) installed, running the code is as easy as executing + +```bash +uv run mckart +``` + +### Using the Makefile + +The makefile will validate the map data, and generate both types of map exports in a directory named `out` + +You can invoke it with: + +```bash +make +ls out +``` + +### Using nix + +```bash +# Run the cli tool +nix run .# + +# Build the exports +nix build .#bluemap-export +nix build .#mapcrafter-export + +# Get a python environment with development tooling +nix develop +``` + ## How to add a point marker 1. Find the correct marker set file in `src/marker_sets/`. @@ -48,7 +89,7 @@ uv run mckart verify uv run mckart print ``` -4. Open a PR +4. Open a pull request at https://git.pvv.ntnu.no/Projects/minecraft-kartverket/pulls ## How to add a railway / road