aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2020-10-26 13:24:46 +0100
committerPřemysl Eric Janouch <p@janouch.name>2020-10-26 14:53:55 +0100
commit5cb95590b00c7190eaeb5a66b9dab4c6d45c945a (patch)
treefd0969956348c669823440908a27c44b657991d5
parent4c8c0f831b2b689140236a9f56a9cde385680337 (diff)
downloadnncmpp-5cb95590b00c7190eaeb5a66b9dab4c6d45c945a.tar.gz
nncmpp-5cb95590b00c7190eaeb5a66b9dab4c6d45c945a.tar.xz
nncmpp-5cb95590b00c7190eaeb5a66b9dab4c6d45c945a.zip
WIP: Add a real manual page
WIP: need to actually write it WIP: some content may be eligible to be moved from the README Closes #3
-rw-r--r--CMakeLists.txt18
-rw-r--r--README.adoc2
-rw-r--r--nncmpp.adoc39
3 files changed, 50 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 15f769d..64afffc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,19 +63,21 @@ include (GNUInstallDirs)
install (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
-# Generate documentation from program help
-find_program (HELP2MAN_EXECUTABLE help2man)
-if (NOT HELP2MAN_EXECUTABLE)
- message (FATAL_ERROR "help2man not found")
-endif (NOT HELP2MAN_EXECUTABLE)
+# Generate documentation from text markup
+find_program (ASCIIDOCTOR_EXECUTABLE asciidoctor)
+if (NOT ASCIIDOCTOR_EXECUTABLE)
+ message (FATAL_ERROR "asciidoctor not found")
+endif (NOT ASCIIDOCTOR_EXECUTABLE)
foreach (page ${PROJECT_NAME})
set (page_output "${PROJECT_BINARY_DIR}/${page}.1")
list (APPEND project_MAN_PAGES "${page_output}")
add_custom_command (OUTPUT ${page_output}
- COMMAND ${HELP2MAN_EXECUTABLE} -N
- "${PROJECT_BINARY_DIR}/${page}" -o ${page_output}
- DEPENDS ${page}
+ COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage
+ -a release-version=${PROJECT_VERSION}
+ "${PROJECT_SOURCE_DIR}/${page}.adoc"
+ -o "${page_output}"
+ DEPENDS ${page}.adoc
COMMENT "Generating man page for ${page}" VERBATIM)
endforeach (page)
diff --git a/README.adoc b/README.adoc
index 9b588d0..ef50828 100644
--- a/README.adoc
+++ b/README.adoc
@@ -24,7 +24,7 @@ a package with the latest development version from Archlinux's AUR.
Building and Running
--------------------
-Build dependencies: CMake, pkg-config, help2man, liberty (included),
+Build dependencies: CMake, pkg-config, asciidoctor, liberty (included),
termo (included) +
Runtime dependencies: ncursesw, libunistring, cURL
diff --git a/nncmpp.adoc b/nncmpp.adoc
new file mode 100644
index 0000000..0514bc6
--- /dev/null
+++ b/nncmpp.adoc
@@ -0,0 +1,39 @@
+nncmpp(1)
+=========
+:doctype: manpage
+:manmanual: nncmpp Manual
+:mansource: nncmpp {release-version}
+
+Name
+----
+nncmpp - an MPD client
+
+Synopsis
+--------
+*nncmpp* [_OPTION_]...
+
+Options
+-------
+*-d*, *--debug*::
+ Adds a "Debug" tab showing all MPD communication and other information
+ that help debug various issues.
+
+*-h*, *--help*::
+ Display a help message and exit.
+
+*-V*, *--version*::
+ Output version information and exit.
+
+Files
+-----
+_~/.config/nncmpp/nncmpp.conf_::
+ The configuration file.
+
+// TODO: I'll have to describe the contents. It seems like liberty should
+// contain an includable snippet about the format. At least it'd be good
+// to include an example file, such as the one in the README.
+
+Reporting bugs
+--------------
+Use https://git.janouch.name/p/nncmpp to report bugs, request features,
+or submit pull requests.