diff --git a/README.adoc b/README.adoc index 1856eac..eb03ff0 100644 --- a/README.adoc +++ b/README.adoc @@ -104,7 +104,7 @@ plus: |=========================================================== | Code | Explanation -| 1 | Could not send post for unknown reasons +| 1 | Could not send post for unknown reasons. |=========================================================== include::{uri-base}/raw/branch/main/CONTRIBUTING.adoc[] diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt new file mode 100644 index 0000000..fdd941b --- /dev/null +++ b/man/CMakeLists.txt @@ -0,0 +1,13 @@ +include(GNUInstallDirs) + +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.1" + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" + DEPENDS "${PROJECT_NAME}.1.adoc" + COMMAND "${PROJECT_SOURCE_DIR}/man/build_manpage.sh" + ARGS "${PROJECT_VERSION}") + +add_custom_target(man ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.1") + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.1 + DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) diff --git a/man/build_manpage.sh b/man/build_manpage.sh new file mode 100755 index 0000000..c845d94 --- /dev/null +++ b/man/build_manpage.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +name="mastorss" + +if [ -n "${1}" ]; then + dir=$(dirname "${0}") + version=${1} + cp -vf "${dir}/${name}.1.adoc" . + sed -Ei "s/(Revision: +)[0-9]+\.[0-9]\.[0-9]/\1${version}/" "${name}.1.adoc" + a2x --doctype manpage --format manpage --no-xmllint "${name}.1.adoc" +else + echo "usage: ${0} VERSION" >&2 +fi diff --git a/man/mastorss.1.adoc b/man/mastorss.1.adoc new file mode 100644 index 0000000..7216dd8 --- /dev/null +++ b/man/mastorss.1.adoc @@ -0,0 +1,53 @@ += mastorss(1) +:doctype: manpage +:Author: tastytea +:Email: tastytea@tastytea.de +:Date: 2019-12-16 +:Revision: 0.0.0 +:man source: mastorss +:man manual: General Commands Manual + +== NAME + +mastorss - Another RSS to Mastodon bot. + +== SYNOPSIS + +*mastorss* profile + +// == DESCRIPTION + +// == OPTIONS + +// == EXAMPLES + +// == PROTOCOL SUPPORT + +// Currently only HTTP and HTTPS are supported. + +// == PROXY SUPPORT + +== FILES + +* *Configuration file directory*: `${XDG_CONFIG_HOME}/mastorss/` + +`${XDG_CONFIG_HOME}` is usually `~/.config`. + +== ERROR CODES + +[cols=">,<"] +|=========================================================== +| Code | Explanation + +| 1 | Could not send post for unknown reasons. +|=========================================================== + +== SEE ALSO + +*crontab*(1), *crontab*(5) + +== REPORTING BUGS + +Bugtracker: https://schlomp.space/tastytea/mastorss/issues + +E-mail: tastytea@tastytea.de