dot

packages and services management
Log | Files | Refs | README

commit c6006f1c2adbe2fc761432aa5b23c1c42762a7cf
parent aaa5d424362da2bb82b9bd7493db2f7d537ec1c2
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri, 23 Feb 2018 16:08:44 +0100

agenda: not be gopher-specific, just plain text

Diffstat:
Mbin/agenda | 20++++++++++----------
Mbin/mv-groupdir | 2+-
2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/bin/agenda b/bin/agenda @@ -165,14 +165,14 @@ BEGIN { print(to_sec(yrs, mth, day, hrs, min, 0) - OFF * 3600); }' -gopher="$date"' +list="$date"' sub("^B:", "") { minimum = ($0 < minimum || minimum == 0) ? $0 : minimum; } END { name = FILENAME; sub(".*/", "", name); - printf("[0|%s - %s|/%s.txt|server|port]\n", + printf("%s - %s - %s\n", to_date("%d/%02d/%02d", minimum + 3600), name, FILENAME); }' @@ -212,16 +212,16 @@ case "$1" in exec $EDITOR "$AGENDA/$2" ;; -(gopher) - find "$AGENDA" -type f ! -name '*.txt' -exec awk "$gopher" {} \; | sort +(list) + find "$AGENDA" ! -type d ! -name '*.txt' -exec awk "$list" {} \; | sort ;; (*) - echo "usage: agenda add <name> <YYYY-MM-DD-HH-MM> <YYYY-MM-DD-HH-MM>" - echo " agenda edit <name>" - echo " agenda import <file.ics> <name> [+-]<HH>" - echo " agenda view <name> [BESCL]" - echo " agenda gopher" + echo "usage: $0 add <name> <YYYY-MM-DD-HH-MM> <YYYY-MM-DD-HH-MM>" + echo " $0 edit <name>" + echo " $0 import <file.ics> <name> [+-]<HH>" + echo " $0 view <name> [BESCL]" + echo " $0 list" echo "" - ls -C "$AGENDA" + "$0" list ;; esac diff --git a/bin/mv-groupdir b/bin/mv-groupdir @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh # usage: mv-groupdir