summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriadna Vigo <arivigodr@gmail.com>2020-07-04 12:46:47 +0200
committerAriadna Vigo <arivigodr@gmail.com>2020-07-04 12:46:47 +0200
commit4ab5874117d1a663019d8dc7ed937cac2199fe09 (patch)
tree91a08f1e29a89844c93ad7081be4f6b6617f6444
parentb89dbe00ecc7a64e57a9293077edc7dbe734e2d7 (diff)
Added manpage
-rw-r--r--Makefile6
-rw-r--r--config.mk1
-rw-r--r--cras.144
3 files changed, 50 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ffa54b7..c35893d 100644
--- a/Makefile
+++ b/Makefile
@@ -33,8 +33,12 @@ install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f cras ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/cras
+ mkdir -p ${DESTDIR}${MANPREFIX}/man1
+ sed "s/VERSION/${VERSION}/g" cras.1\
+ > ${DESTDIR}${MANPREFIX}/man1/cras.1
+ chmod 644 ${DESTDIR}${MANPREFIX}/man1/cras.1
uninstall:
- rm -f ${DESTDIR}${PREFIX}/bin/cras
+ rm -f ${DESTDIR}${PREFIX}/bin/cras ${DESTDIR}${MANPREFIX}/man1/cras.1
.PHONY: all options clean install uninstall
diff --git a/config.mk b/config.mk
index affaddb..f7fee3b 100644
--- a/config.mk
+++ b/config.mk
@@ -5,6 +5,7 @@ VERSION = 0.0.0
# Paths
PREFIX = /usr/local
+MANPREFIX = ${PREFIX}/share/man
# Flags
CPPFLAGS = -DVERSION=\"${VERSION}\" -D_POSIX_C_SOURCE=200809L
diff --git a/cras.1 b/cras.1
new file mode 100644
index 0000000..ba1a18f
--- /dev/null
+++ b/cras.1
@@ -0,0 +1,44 @@
+.TH CRAS 1 cras\-VERSION
+.SH NAME
+Cras - The Anti-Procrastination Tool
+.SH SYNOPSIS
+.B cras
+.RB [ \-osv ]
+.RB [ \-tT\ num ]
+.RB file
+.SH DESCRIPTION
+Cras is an unapologetic daily task planner and manager for your terminal and WM
+status bar. It holds your tasks only for a limited amount of time (24 hours, by
+default) and doesn't allow you to edit the task list after set up, except for
+marking a task as done.
+.SH OPTIONS
+.TP
+.B \-o
+Switch to short-form output.
+.TP
+.B \-s
+Save from standard input into file.
+.TP
+.B \-t\ num
+Mark task num as done.
+.TP
+.B \-T\ num
+Mark task num as pending.
+.TP
+.B \-v
+Show version information and exit.
+.SH USAGE
+To set up a new task list, call Cras using the -s option. Cras will read each
+new line from standard input as a new task, until EOF is reached.
+
+The newly created task list will be readable by Cras only up to the expiry
+date, which under the default configuration is 24 hours after originally saving
+it. Use -t to mark a task as done and -T to mark it back as pending.
+
+Running Cras with no options outputs the task list. For a summary, use the -o
+flag; this short-form output is suitable for printing to WM status bars.
+.SH CONFIGURATION
+Cras is configured by creating a custom config.h and recompiling the source
+code.
+.SH BUGS
+Report bugs to https://todo.sr.ht/~emvigo/cras \ No newline at end of file