Blame 07c371f68ccc10337fbdd60477bc621bf7cd2a7e.patch

b043d22
From 07c371f68ccc10337fbdd60477bc621bf7cd2a7e Mon Sep 17 00:00:00 2001
b043d22
From: Daniel Moerner <dmoerner@gmail.com>
b043d22
Date: Tue, 17 Jan 2017 11:49:15 -0500
b043d22
Subject: [PATCH] Write manpage based on README.
b043d22
b043d22
---
b043d22
 CMakeLists.txt   |  6 +++-
b043d22
 minetestmapper.6 | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
b043d22
 2 files changed, 96 insertions(+), 1 deletion(-)
b043d22
 create mode 100644 minetestmapper.6
b043d22
b043d22
diff --git a/CMakeLists.txt b/CMakeLists.txt
b043d22
index 255c82f..4b54d64 100644
b043d22
--- a/CMakeLists.txt
b043d22
+++ b/CMakeLists.txt
b043d22
@@ -21,9 +21,10 @@ if(WIN32)
b043d22
 	set(BINDIR ".")
b043d22
 	set(DOCDIR ".")
b043d22
 else()
b043d22
-	set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/minetest") # an extra dir. for just one file doesn't seem useful
b043d22
+	set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/minetest") # reuse Minetest share dir
b043d22
 	set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
b043d22
 	set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}")
b043d22
+	set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
b043d22
 endif()
b043d22
 
b043d22
 set(CUSTOM_SHAREDIR "" CACHE STRING "Directory to install data files into")
b043d22
@@ -215,6 +216,9 @@ install(FILES "AUTHORS" DESTINATION "${DOCDIR}")
b043d22
 install(FILES "COPYING" DESTINATION "${DOCDIR}")
b043d22
 install(FILES "README.rst" DESTINATION "${DOCDIR}")
b043d22
 install(FILES "colors.txt" DESTINATION "${SHAREDIR}")
b043d22
+if(UNIX)
b043d22
+	install(FILES "minetestmapper.6" DESTINATION "${MANDIR}/man6")
b043d22
+endif()
b043d22
 
b043d22
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Overview mapper for Minetest")
b043d22
 set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
b043d22
diff --git a/minetestmapper.6 b/minetestmapper.6
b043d22
new file mode 100644
b043d22
index 0000000..5cdd6d9
b043d22
--- /dev/null
b043d22
+++ b/minetestmapper.6
b043d22
@@ -0,0 +1,91 @@
b043d22
+.TH MINETESTMAPPER 6
b043d22
+.SH NAME
b043d22
+minetestmapper \- generate an overview image of a Minetest map
b043d22
+.SH SYNOPSIS
b043d22
+.B minetestmapper
b043d22
+\fB\-i\fR \fIworld_path\fR
b043d22
+\fB\-o\fR \fIoutput_image\fR
b043d22
+.PP
b043d22
+See additional optional parameters below.
b043d22
+.SH DESCRIPTION
b043d22
+.B minetestmapper
b043d22
+generates an overview image of a minetest map. This is a port of
b043d22
+the original minetestmapper.py to C++, that is both faster and
b043d22
+provides more funtionality than the deprecated Python script.
b043d22
+.SH MANDATORY PARAMETERS
b043d22
+.TP
b043d22
+.BR \-i " " \fIworld_path\fR
b043d22
+Input world path.
b043d22
+.TP
b043d22
+.BR \-o " " \fIoutput_image\fR
b043d22
+Path to output image. (only PNG supported currently)
b043d22
+.SH OPTIONAL PARAMETERS
b043d22
+.TP
b043d22
+.BR \-\-bgcolor " " \fIcolor\fR
b043d22
+Background color of image, e.g. "--bgcolor #ffffff"
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-scalecolor " " \fIcolor\fR
b043d22
+Color of scale, e.g. "--scalecolor #000000"
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-playercolor " " \fIcolor\fR
b043d22
+Color of player indicators, e.g. "--playercolor #ff0000"
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-origincolor " " \fIcolor\fR
b043d22
+Color of origin indicator, e.g. "--origincolor #ff0000"
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-drawscale
b043d22
+Draw tick marks
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-drawplayers
b043d22
+Draw player indicators
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-draworigin
b043d22
+Draw origin indicator
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-drawalpha
b043d22
+Allow nodes to be drawn with transparency
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-noshading
b043d22
+Don't draw shading on nodes
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-min-y " " \fInumber\fR
b043d22
+Don't draw nodes below this y value, e.g. "--min-y -25"
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-max-y " " \fInumber\fR
b043d22
+Don't draw nodes above this y value, e.g. "--max-y 75"
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-backend " " \fIbackend\fR
b043d22
+Use specific map backend; supported: *sqlite3*, *leveldb*, *redis*, *postgresql*, e.g. "--backend leveldb"
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-geometry " " \fIgeometry\fR
b043d22
+Limit area to specific geometry (*x:y+w+h* where x and y specify the lower left corner), e.g. "--geometry -800:-800+1600+1600"
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-zoom " " \fIfactor\fR
b043d22
+Zoom the image by using more than one pixel per node, e.g. "--zoom 4"
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-colors " " \fIpath\fR
b043d22
+Forcefully set path to colors.txt file (it's autodetected otherwise), e.g. "--colors ../minetest/mycolors.txt"
b043d22
+
b043d22
+.TP
b043d22
+.BR \-\-scales " " \fIedges\fR
b043d22
+Draw scales on specified image edges (letters *t b l r* meaning top, bottom, left and right), e.g. "--scales tbr"
b043d22
+
b043d22
+.SH MORE INFORMATION
b043d22
+Website: https://github.com/minetest/minetestmapper
b043d22
+
b043d22
+.SH MAN PAGE AUTHOR
b043d22
+Daniel Moerner