sdep

A simple "date+event" line parser
git clone https://git.tronto.net/sdep
Download | Log | Files | Refs | README | LICENSE

commit 12758e9484429ca6d013b15e22af84827ae37700
parent 2124cd25740fb5a4081ef20305e9b8fdbdfa47f6
Author: Sebastiano Tronto <sebastiano.tronto@gmail.com>
Date:   Wed, 19 Jan 2022 09:13:38 +0100

Small fixes

Diffstat:
MMakefile | 2+-
Ascripts-build/sdep-checkpast | 21+++++++++++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -50,7 +50,7 @@ scripts: > scripts-build/$$s ;\ done -scriptsinstall: +scriptsinstall: scripts for s in ${SCRIPTS}; do\ cp -f scripts-build/$$s ${DESTDIR}${PREFIX}/bin ; \ chmod 755 ${DESTDIR}${PREFIX}/bin/$$s ;\ diff --git a/scripts-build/sdep-checkpast b/scripts-build/sdep-checkpast @@ -0,0 +1,21 @@ +#!/bin/sh + +# Run this at boot to receive a notification about past events that you might +# have missed +# +# The events are read from the following files in /home/sebastiano/.local/share/sdep folder: +# once: events that only happen once; full date needs to be specified +# daily: events that happen every day; only specify the time in HH:MM format +# weekly: only specify Weekday + time +# monthly: only specify day of the month + time + +# Requires: notify-send. + +notify="notify-send -t 3600000" + +sdep-list past | \ +while read text; do + date=$(echo "$text" | sed 's/\t.*//') + event=$(echo "$text" | sed 's/.*\t//') + $notify "$date" "$event" +done