Tidy up readme

This commit is contained in:
est31 2016-01-17 20:03:16 +01:00
parent ed714b2bd6
commit 5eb480b345

View File

@ -3,14 +3,19 @@
Leaftest consists of a bash script that uses [minetestmapper](https://github.com/Rogier-5/minetest-mapper-cpp) to display the map on a leaflet based zoomable sloppy map. As an example, see [VanessaE survival server's map](https://daconcepts.com/vanessa/hobbies/minetest/worldmaps/Survival_World/map.html). Leaftest consists of a bash script that uses [minetestmapper](https://github.com/Rogier-5/minetest-mapper-cpp) to display the map on a leaflet based zoomable sloppy map. As an example, see [VanessaE survival server's map](https://daconcepts.com/vanessa/hobbies/minetest/worldmaps/Survival_World/map.html).
The map is generated in chunks through many invocations of `minetestmapper` instead of one invocation and large file thats cropped later, so that memory requirements for all tools are unrelated to the map size. The map is generated in chunks through many invocations of `minetestmapper` instead of one invocation and large file thats cropped later, so that memory requirements for all tools are unrelated to the map size.
##Dependencies
You will need: ### Dependencies
Ensure that you have:
-bash -bash
-imagemagick -imagemagick
-a web server of some sort
-minetestmapper -minetestmapper
If you want to host the map on the world wide web, you'll need a web server.
### Running the mapper script
Get a clone: Get a clone:
``` ```
git clone --recursive https://github.com/est31/leaftest.git git clone --recursive https://github.com/est31/leaftest.git
@ -21,15 +26,19 @@ To start the mapping, do:
MAPPERDIR=dir/containing/minetestmapper ./mapper.sh path/to/world spawnx,spawny dimension MAPPERDIR=dir/containing/minetestmapper ./mapper.sh path/to/world spawnx,spawny dimension
``` ```
If you have additional parameters for `minetestmapper`, like a `colors.txt` path of your choice, you can add them to the `MAPPERPARAMS` variable.
The `dimension` number specifies the width and height of the map that should be rendered, centering with your spawn position. `dimension` should be a multiple of 8*256 = 2048, 6144 is a good starting value. The `dimension` number specifies the width and height of the map that should be rendered, centering with your spawn position. `dimension` should be a multiple of 8*256 = 2048, 6144 is a good starting value.
The list of parameters passed via the invocation is fixed,
but you can use the environment variable mechanism
to pass further options to the mapper script:
* `MAPPERDIR` must point to the path that contains the minetestmapper executable
* `MAPPERPARAMS` can be used to pass custom parameters to the `minetestmapper` invocation
* `JOBNUM` can be used to enable parallelisation. Set it to a positive number to
After mapping has finished, you can open the `www/map.html` file. If you want to publish your results, you can either symlink the `www` directory into your `/var/www` directory, or copy it. Due to usage of relative symlinks, you should use `rsync -L`, so that the copied directory doesn't contain symlinks. After mapping has finished, you can open the `www/map.html` file. If you want to publish your results, you can either symlink the `www` directory into your `/var/www` directory, or copy it. Due to usage of relative symlinks, you should use `rsync -L`, so that the copied directory doesn't contain symlinks.
You can use the `JOBNUM` environment variable to control the number of parallel jobs used for creating the tiles.
##License ##License
Copyright (c) 2015 est31, License: MIT. Copyright (c) 2015-2016 est31, License: MIT.
Parts base on unilicensed script from [LibertyLand](http://www.ayntest.net/pages/liberty-land-map.html) minetest server, [github here](https://github.com/ayntest/ayntest.github.io). Parts base on unilicensed script from [LibertyLand](http://www.ayntest.net/pages/liberty-land-map.html) minetest server, [github here](https://github.com/ayntest/ayntest.github.io).