dot

packages and services management
Log | Files | Refs | README

commit 2af72d39c4058fec9293566c25bec3a01ce6caa3
parent 2d32e37697942a4593f123c3f07d9c647c6f8869
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat, 23 Dec 2017 19:37:09 +0100

adding a man page

Diffstat:
Mbin/agenda | 9++++-----
Abin/clip | 19+++++++++++++++++++
Aman/agenda.1 | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 129 insertions(+), 5 deletions(-)

diff --git a/bin/agenda b/bin/agenda @@ -1,7 +1,7 @@ #!/bin/sh # plain text agenda reading ical with its own simpler format -AGENDA="$HOME/var/cal" +AGENDA="${AGENDA:-$HOME/.config/agenda}" awk_date=' function leap(yrs) @@ -180,11 +180,10 @@ case $1 in exec $EDITOR "$AGENDA/$2" ;; (*) - printf 'usage: agenda import ics_file name [+-]HH\n' - printf ' agenda show name [BESCL]\n' - printf ' agenda add name YYYY-MM-DD-HH-MM YYYY-MM-DD-HH-MM\n' + printf 'usage: agenda add name YYYY-MM-DD-HH-MM YYYY-MM-DD-HH-MM\n' printf ' agenda edit name\n' - printf 'B: Begin - E: End - S: Summary - C: Category - L: Location\n' + printf ' agenda import ics_file name [+-]HH\n' + printf ' agenda show name [BESCL]\n' printf '\n' ls -C "$AGENDA" ;; diff --git a/bin/clip b/bin/clip @@ -0,0 +1,19 @@ +#!/bin/sh -e + +CLIP=${CLIP:-$HOME/.cache/clip} + +touch "$CLIP" +chmod 600 "$CLIP" + +case $1 in +(-i) + shift + cat "$@" > "$CLIP" + ;; +(-o) + cat "$CLIP" + ;; +(*) + printf 'usage: clip [-i [file]] [-o]\n' + ;; +esac diff --git a/man/agenda.1 b/man/agenda.1 @@ -0,0 +1,106 @@ +.Dd $Mdocdate: December 23 2017$ +.Dt AGENDA 1 +.Os +.Sh NAME +.Nm agenda +.Nd plain text agenda with ical support +.Sh SYNOPSIS +.Nm Ic add Ar name Ar begin Ar end +.Nm Ic edit Ar name +.Nm Ic show Ar name Op Ar sort +.Nm Ic import Ar ics_file Ar name Op +- Ns Ar HH +.Sh DESCRIPTION +.Nm +displays +.Xr agenda 5 +files created by +.Nm , +by hand, or imported from an +.Pa ics +file. +.Ss Nm Ic add Ar name Ar begin Ar end +Create a new +.Xr agenda 5 +entry in the +.Ar name +agenda in the +and open this file with an editor. +.Ar begin +and +.Ar end +are dates formatted as +.Ql YYYY-MM-DD-HH-MM . +.Ss Nm Ic edit Ar name +Open the +.Ar name +agenda with an editor. +.Ss Nm Ic show Ar name Op Ar sort +Render the +.Ar name +agenda to standard output with events sorted according to the +.Ar sort +characters, among: +.Bl -tag -compact +.It Ql B +for begin date, +.It Ql E +for end date, +.It Ql S +for summary, +.It Ql C +for category, +.It Ql L +for location. +.El +By default, +.Ar sort +is +.Ql BECLS +.Ss Nm Ic import Ar ics_file Ar name Op +- Ns Ar HH +Convert +.Ar ics_file +to the +.Xr agenda 5 +format and store it in the +.Ar name +agenda, replacing its content. +.Ar HH +is the timezone offset of the agenda imported, optionnaly preceded by a +.Ql - +or +.Ql + . +.Sh ENVIRONMENT +.Bl -tag +.It Ev AGENDA +Path th the agenda dir, defaults to +.Pa ~/.config/agenda . +.It Ev EDITOR +Started to edit the agenda file with the +.Ic add +and +.Ic edit +commands. +.It Ev TZ +Timezone to use for printing the dates. +.Sh EXAMPLES +Import an ical agenda from a gopher uri: +.Dl % curl gopher://url | agenda import - fosdem +01 +.Pp +Print the time offset corresponding to the Europe/Brussels timezone: +.Dl % TZ=Europe/Brussels date +%z | cut -c -3 +.Pp +Print the travel agenda with times expressed in the Japan timezone: +.Dl % TZ=Japan agenda show travel +.Pp +Print the fosdem agenda sorted by +.Dq location , +then by +.Dq begin date : +.Dl % agenda show fosdem LB +.Sh STANDARDS +Only a subset of ical format is supported. +.Sh CAVEATS +Events spanning across multiple month will be displayed poorly. +Other multiple-day events are displayed properly. +.Sh AUTHORS +.An Josuah Demangeon Aq Mt mail@josuah.net