bday

changeset 1:8534f0e3a0db

added manpage; adjusted makefile
author meillo@marmaro.de
date Sun, 16 Dec 2007 22:52:15 +0100
parents 22b6e71de68e
children 9ec037775c38
files Makefile bday.1
diffstat 2 files changed, 150 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/Makefile	Sun Dec 16 22:26:48 2007 +0100
     1.2 +++ b/Makefile	Sun Dec 16 22:52:15 2007 +0100
     1.3 @@ -16,11 +16,14 @@
     1.4  	$(CC) $(LDFLAGS) $(OBJ) -o $@
     1.5  
     1.6  
     1.7 -install: birthday birthday.man
     1.8 -	mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/man/man1
     1.9 +install: all
    1.10 +	@echo "installing program in $(DESTDIR)/usr/bin"
    1.11 +	mkdir -p $(DESTDIR)/usr/bin
    1.12  	cp ${EXE} $(DESTDIR)/usr/bin/${EXE}
    1.13  	chmod 0755 $(DESTDIR)/usr/bin/${EXE}
    1.14 -	cp ${EXE}.man $(DESTDIR)/usr/share/man/man1/${EXE}.1
    1.15 +	@echo "installing manpage in $(DESTDIR)/usr/share/man/man1"
    1.16 +	mkdir -p $(DESTDIR)/usr/share/man/man1
    1.17 +	cp ${EXE}.1 $(DESTDIR)/usr/share/man/man1/${EXE}.1
    1.18  	chmod 0644 $(DESTDIR)/usr/share/man/man1/${EXE}.1
    1.19  
    1.20  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/bday.1	Sun Dec 16 22:52:15 2007 +0100
     2.3 @@ -0,0 +1,144 @@
     2.4 +.TH bday 1
     2.5 +.SH NAME
     2.6 +bday \- inform about upcoming birthdays and other events
     2.7 +.SH SYNOPSIS
     2.8 +.BR bday\  [ -f
     2.9 +.IR file ]
    2.10 +.RB [ -W
    2.11 +.IR defwarn ]
    2.12 +.RB [ -M
    2.13 +.IR maxwarn ]
    2.14 +.RB [ -m
    2.15 +.IR minwarn ]
    2.16 +
    2.17 +.SH DESCRIPTION
    2.18 +The 
    2.19 +.B bday
    2.20 +command reads a file, by default
    2.21 +.IR ~/.birthdays ,
    2.22 +which gives a list of birthdays and events (see section
    2.23 +.B FILE FORMAT
    2.24 +for details). It produces a list of events which are coming up within the next few weeks.
    2.25 +
    2.26 +.SH OPTIONS
    2.27 +
    2.28 +.TP
    2.29 +.BI -f\  file
    2.30 +Read the events from
    2.31 +.I file
    2.32 +rather than
    2.33 +.IR ~/.birthdays.
    2.34 +If
    2.35 +.I file
    2.36 +is a single hyphen, read the events from the standard input (usually
    2.37 +the terminal).
    2.38 +
    2.39 +.SS List Options
    2.40 +
    2.41 +.TP
    2.42 +.BI -W\  warn
    2.43 +Warn
    2.44 +.I warn
    2.45 +days in advance, for entries that have no
    2.46 +.B w
    2.47 +flag (see
    2.48 +.BR FILE\ FORMAT ).
    2.49 +If this switch is not specified, it defaults to 21 days.
    2.50 +.TP
    2.51 +.BI -M\  max
    2.52 +Warn at most
    2.53 +.I max
    2.54 +days in advance. This overrides any flag given in the file.
    2.55 +.TP
    2.56 +.BI -m\  min
    2.57 +Warn at least
    2.58 +.I min
    2.59 +days in advance. This overrides any flag given in the file.
    2.60 +
    2.61 +
    2.62 +.SH FILE FORMAT
    2.63 +
    2.64 +Each line beginning with a hash sign, 
    2.65 +.RB ` # ',
    2.66 +is a comment and will be ignored. Lines beginning with an ampersand,
    2.67 +.RB ` & ',
    2.68 +are directives. Currently there is only one such directive,
    2.69 +.B &include
    2.70 +.IR file ,
    2.71 +which reads in a seperate file from your
    2.72 +.I .birthdays
    2.73 +file.
    2.74 +.I file
    2.75 +should be given with an absolute path, which should not use the tilde notation to specify your home directory.
    2.76 +
    2.77 +Any other line specifies the name of a person or event, followed by an equals sign and
    2.78 +a date and finally some extra options. The date has to be in ISO 8601 date format (YYYY-MM-DD).
    2.79 +The extra options are:
    2.80 +.TP
    2.81 +.B bd
    2.82 +This line is a birthday (the default). The year, if given, should be when the person was born. A line designated as a
    2.83 +birthday will produce output like
    2.84 +.B Erin has a birthday in 3 days' time
    2.85 +or
    2.86 +.BR "Jemima is 3 in 2 weeks' time" .
    2.87 +.TP
    2.88 +.B ann
    2.89 +This line is an anniversary. The year, if given, should be the year in which the thing happened, producing output like
    2.90 +.B Pen exploded 3 years ago tomorrow
    2.91 +given a line such as
    2.92 +.BR "Pen exploded=1993-09-12 ann" .
    2.93 +.TP
    2.94 +.B ev
    2.95 +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
    2.96 +be displayed every year. The remaining time is simply appended to the text; for instance, the input
    2.97 +.B Easter=1996-04-07 ev
    2.98 +would give rise to the text
    2.99 +.BR "Easter in 1 week's time" .
   2.100 +.TP
   2.101 +.BI w n
   2.102 +Warn
   2.103 +.I n
   2.104 +days in advance of the date, rather than the default of 21 days or the number given with the
   2.105 +.B -W
   2.106 +flag.
   2.107 +.TP
   2.108 +.BI to date
   2.109 +The event lasts until
   2.110 +.IR date ,
   2.111 +which should be in the same format as for the date of the event.
   2.112 +.TP
   2.113 +.BI for days
   2.114 +The event lasts for
   2.115 +.B days
   2.116 +days.
   2.117 +
   2.118 +.SH DATE SPECIFICATION
   2.119 +
   2.120 +This version of of the programm is patched to only handle standard ISO 8601 date format now.
   2.121 +The intention to do change this behavior was to eliminate all those problems with different date formats.
   2.122 +IMHO we have standards to use them. Backward compatibility is not that important here, in my eyes.
   2.123 +
   2.124 +.SH EXAMPLE
   2.125 +
   2.126 +Joe Blow=1974-04-25
   2.127 +
   2.128 +.SH FILES
   2.129 +
   2.130 +.TP
   2.131 +.I ~/.birthdays
   2.132 +Your default birthdays file.
   2.133 +
   2.134 +.SH SEE ALSO
   2.135 +
   2.136 +.BR birthday (1),
   2.137 +cal (1)
   2.138 +
   2.139 +.SH BUGS
   2.140 +The program cannot warn more than one year in advance of anything.
   2.141 +
   2.142 +.SH CREDITS
   2.143 +
   2.144 +This Program is heavily based on birthday. But without all non essential stuff. Nevertheless, much thanks for birthday, Andy!
   2.145 +
   2.146 +.SH AUTHOR
   2.147 +Andy Mortimer <andy.mortimer@zetnet.co.uk> and markus schnalke <meillo@marmaro.de>