changeset 1:8534f0e3a0db

added manpage; adjusted makefile
author meillo@marmaro.de
date Sun, 16 Dec 2007 22:52:15 +0100 (2007-12-16)
parents 22b6e71de68e
children 9ec037775c38
files Makefile bday.1
diffstat 2 files changed, 150 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sun Dec 16 22:26:48 2007 +0100
+++ b/Makefile	Sun Dec 16 22:52:15 2007 +0100
@@ -16,11 +16,14 @@
 	$(CC) $(LDFLAGS) $(OBJ) -o $@
 
 
-install: birthday birthday.man
-	mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/man/man1
+install: all
+	@echo "installing program in $(DESTDIR)/usr/bin"
+	mkdir -p $(DESTDIR)/usr/bin
 	cp ${EXE} $(DESTDIR)/usr/bin/${EXE}
 	chmod 0755 $(DESTDIR)/usr/bin/${EXE}
-	cp ${EXE}.man $(DESTDIR)/usr/share/man/man1/${EXE}.1
+	@echo "installing manpage in $(DESTDIR)/usr/share/man/man1"
+	mkdir -p $(DESTDIR)/usr/share/man/man1
+	cp ${EXE}.1 $(DESTDIR)/usr/share/man/man1/${EXE}.1
 	chmod 0644 $(DESTDIR)/usr/share/man/man1/${EXE}.1
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bday.1	Sun Dec 16 22:52:15 2007 +0100
@@ -0,0 +1,144 @@
+.TH bday 1
+.SH NAME
+bday \- inform about upcoming birthdays and other events
+.SH SYNOPSIS
+.BR bday\  [ -f
+.IR file ]
+.RB [ -W
+.IR defwarn ]
+.RB [ -M
+.IR maxwarn ]
+.RB [ -m
+.IR minwarn ]
+
+.SH DESCRIPTION
+The 
+.B bday
+command reads a file, by default
+.IR ~/.birthdays ,
+which gives a list of birthdays and events (see section
+.B FILE FORMAT
+for details). It produces a list of events which are coming up within the next few weeks.
+
+.SH OPTIONS
+
+.TP
+.BI -f\  file
+Read the events from
+.I file
+rather than
+.IR ~/.birthdays.
+If
+.I file
+is a single hyphen, read the events from the standard input (usually
+the terminal).
+
+.SS List Options
+
+.TP
+.BI -W\  warn
+Warn
+.I warn
+days in advance, for entries that have no
+.B w
+flag (see
+.BR FILE\ FORMAT ).
+If this switch is not specified, it defaults to 21 days.
+.TP
+.BI -M\  max
+Warn at most
+.I max
+days in advance. This overrides any flag given in the file.
+.TP
+.BI -m\  min
+Warn at least
+.I min
+days in advance. This overrides any flag given in the file.
+
+
+.SH FILE FORMAT
+
+Each line beginning with a hash sign, 
+.RB ` # ',
+is a comment and will be ignored. Lines beginning with an ampersand,
+.RB ` & ',
+are directives. Currently there is only one such directive,
+.B &include
+.IR file ,
+which reads in a seperate file from your
+.I .birthdays
+file.
+.I file
+should be given with an absolute path, which should not use the tilde notation to specify your home directory.
+
+Any other line specifies the name of a person or event, followed by an equals sign and
+a date and finally some extra options. The date has to be in ISO 8601 date format (YYYY-MM-DD).
+The extra options are:
+.TP
+.B bd
+This line is a birthday (the default). The year, if given, should be when the person was born. A line designated as a
+birthday will produce output like
+.B Erin has a birthday in 3 days' time
+or
+.BR "Jemima is 3 in 2 weeks' time" .
+.TP
+.B ann
+This line is an anniversary. The year, if given, should be the year in which the thing happened, producing output like
+.B Pen exploded 3 years ago tomorrow
+given a line such as
+.BR "Pen exploded=1993-09-12 ann" .
+.TP
+.B ev
+This line is an event of some sort. If a year is given, the text will be displayed in that year only; otherwise, it will
+be displayed every year. The remaining time is simply appended to the text; for instance, the input
+.B Easter=1996-04-07 ev
+would give rise to the text
+.BR "Easter in 1 week's time" .
+.TP
+.BI w n
+Warn
+.I n
+days in advance of the date, rather than the default of 21 days or the number given with the
+.B -W
+flag.
+.TP
+.BI to date
+The event lasts until
+.IR date ,
+which should be in the same format as for the date of the event.
+.TP
+.BI for days
+The event lasts for
+.B days
+days.
+
+.SH DATE SPECIFICATION
+
+This version of of the programm is patched to only handle standard ISO 8601 date format now.
+The intention to do change this behavior was to eliminate all those problems with different date formats.
+IMHO we have standards to use them. Backward compatibility is not that important here, in my eyes.
+
+.SH EXAMPLE
+
+Joe Blow=1974-04-25
+
+.SH FILES
+
+.TP
+.I ~/.birthdays
+Your default birthdays file.
+
+.SH SEE ALSO
+
+.BR birthday (1),
+cal (1)
+
+.SH BUGS
+The program cannot warn more than one year in advance of anything.
+
+.SH CREDITS
+
+This Program is heavily based on birthday. But without all non essential stuff. Nevertheless, much thanks for birthday, Andy!
+
+.SH AUTHOR
+Andy Mortimer <andy.mortimer@zetnet.co.uk> and markus schnalke <meillo@marmaro.de>