From fc94501bd6aa696de449321aa41770bc96a4bb34 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 3 Oct 2020 17:08:57 +0200 Subject: Add man page Copied some of the structure and the Makefile recipe from 'git-suggestion'. --- Makefile | 9 ++++++++ doc/git-todo.1 | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/git-todo.1.txt | 31 +++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 doc/git-todo.1 create mode 100644 doc/git-todo.1.txt diff --git a/Makefile b/Makefile index 6b935bf..d8b19c7 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,15 @@ DEPENDENCIES := Cargo.toml DEBUG_PRODUCT := target/debug/git-todo +.PHONY: doc +doc: doc/git-todo.1 + +doc/git-todo.1: doc/git-todo.1.txt + sed 's/`/*/g' $< > $@.transformed + a2x --no-xmllint --format manpage $@.transformed + rm $@.transformed + + .PHONY: test test: $(DEBUG_PRODUCT) prove -v -I./t diff --git a/doc/git-todo.1 b/doc/git-todo.1 new file mode 100644 index 0000000..3bff60b --- /dev/null +++ b/doc/git-todo.1 @@ -0,0 +1,63 @@ +'\" t +.\" Title: git-todo +.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 10/03/2020 +.\" Manual: \ \& +.\" Source: \ \& +.\" Language: English +.\" +.TH "GIT\-TODO" "1" "10/03/2020" "\ \&" "\ \&" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +git-todo \- Output recent TODO lines +.SH "SYNOPSIS" +.sp +\fIgit todo\fR [options] [] +.SH "DESCRIPTION" +.sp +Find TODO lines and output them in a grep\-style format including the name of the file containing them and their line number\&. +.sp +By default, outputs all TODO lines since \fBmaster\fR\&. +.SH "OPTIONS" +.PP +\-h, \-\-help +.RS 4 +Print usage help\&. +.RE +.PP +\-V, \-\-version +.RS 4 +Print the program version\&. +.RE +.SH "EXAMPLES" +.sp +Show TODOs since the \fBv1\&.0\&.0\fR tag: +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ git todo v1\&.0\&.0 +.fi +.if n \{\ +.RE +.\} diff --git a/doc/git-todo.1.txt b/doc/git-todo.1.txt new file mode 100644 index 0000000..61f8627 --- /dev/null +++ b/doc/git-todo.1.txt @@ -0,0 +1,31 @@ +git-todo(1) +=========== + +NAME +---- +git-todo - Output recent TODO lines + +SYNOPSIS +-------- +'git todo' [options] [] + +DESCRIPTION +----------- +Find TODO lines and output them in a grep-style format including the name +of the file containing them and their line number. + +By default, outputs all TODO lines since `master`. + +OPTIONS +------- +-h, --help:: + Print usage help. + +-V, --version:: + Print the program version. + +EXAMPLES +-------- +Show TODOs since the `v1.0.0` tag: + + $ git todo v1.0.0 -- cgit v1.2.3