aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rw-r--r--config.mk4
-rw-r--r--wcli.146
3 files changed, 56 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index dd9869f..3c87b3d 100644
--- a/Makefile
+++ b/Makefile
@@ -13,11 +13,16 @@ install: build
chmod 755 ${PREFIX}/bin/wcli
chmod 755 ${PREFIX}/bin/wcli-gen
chmod 755 ${PREFIX}/bin/wcli-query
+ mkdir -p $(MANPREFIX)/man1
+ sed "s/VERSION/${VERSION}/g" < wcli.1 > ${MANPREFIX}/man1/wcli.1
+ chmod 644 ${MANPREFIX}/man1/wcli.1
+
uninstall:
rm -f ${PREFIX}/bin/wcli\
${PREFIX}/bin/wcli-gen\
- ${PREFIX}/bin/wcli-query
+ ${PREFIX}/bin/wcli-query\
+ ${MANPREFIX}/man1/wcli.1
clean:
rm wcli wcli-gen
diff --git a/config.mk b/config.mk
index 79c37b0..75093f8 100644
--- a/config.mk
+++ b/config.mk
@@ -1,2 +1,6 @@
+# wcli version
+VERSION = 0.1
+
PREFIX = ~/.local
+MANPREFIX = ${PREFIX}/share/man
CC = cc
diff --git a/wcli.1 b/wcli.1
new file mode 100644
index 0000000..c7c80e3
--- /dev/null
+++ b/wcli.1
@@ -0,0 +1,46 @@
+.TH WCLI 1 wcli\-VERSION
+.SH NAME
+wcli \- print weather information
+.SH SYNOPSIS
+.B wcli
+.RB [FORMAT]
+.SH DESCRIPTION
+Display weather information in the given FROMAT.
+.PP
+FORMAT controls the output. Interpreted sequences are:
+.TP
+%%
+a literal %
+.TP
+%c
+temperature in Celsius
+.TP
+%f
+temperature in Fahrenheit
+.TP
+%C
+felt temperature in Celsius
+.TP
+%F
+felt temperature in Fahrenheit
+.TP
+%s
+wind speed in km/h
+.TP
+%g
+wind gust
+.TP
+%d
+wind direction (e.g., N, NW, SW)
+.TP
+%D
+wind direction in degrees
+.TP
+%v
+visibility
+.TP
+%w
+weather code (used by wttr.in)
+.TP
+%W
+weather description (given by wttr.in)