sdep

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

commit b68c98a74cec75946eb29ae814da9fe6ae732cf8
parent 23b64e3da1739ffd8f35bb1c88236480a05dd317
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Tue,  1 Mar 2022 10:34:06 +0100

Fixed typo in sdep-list; fixed default directory

Diffstat:
Mscripts/sdep-add | 2+-
Mscripts/sdep-checknow | 2+-
Mscripts/sdep-clear | 2+-
Mscripts/sdep-edit | 2+-
Mscripts/sdep-list | 4++--
5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/scripts/sdep-add b/scripts/sdep-add @@ -8,7 +8,7 @@ # Usage: sdep-add [date] # Example: sdep-add "next monday" -sdepdata="${XDG_DATA_HOME:-$HOME/.local}/sdep" +sdepdata="${XDG_DATA_HOME:-$HOME/.local/}/sdep" file="$sdepdata/once" date="" diff --git a/scripts/sdep-checknow b/scripts/sdep-checknow @@ -14,7 +14,7 @@ # might have to change if you are not on Linux (on some systems you can # accomplish the same with -j). -sdepdata="${XDG_DATA_HOME:-$HOME/.local}/sdep" +sdepdata="${XDG_DATA_HOME:-$HOME/.local/share}/sdep" #notify="notify-send -t 3600000" notify=herbe diff --git a/scripts/sdep-clear b/scripts/sdep-clear @@ -4,7 +4,7 @@ # Usage: sdep-clear [file] -sdepdata="${XDG_DATA_HOME:-$HOME/.local}/sdep" +sdepdata="${XDG_DATA_HOME:-$HOME/.local/share}/sdep" file="$sdepdata/${1:-once}" temp=$(mktemp) diff --git a/scripts/sdep-edit b/scripts/sdep-edit @@ -5,7 +5,7 @@ # Usage: sdep-edit [file] # No options = once -sdepdata="${XDG_DATA_HOME:-$HOME/.local}/sdep" +sdepdata="${XDG_DATA_HOME:-$HOME/.local/share}/sdep" file="$sdepdata/${1:-once}" editor=${VISUAL:-vi} diff --git a/scripts/sdep-list b/scripts/sdep-list @@ -15,7 +15,7 @@ # Usage: sdep-list [today|tomorrow|week|nextweek|past|future] # No options = all -sdepdata="${XDG_DATA_HOME:-$HOME/.local}/sdep" +sdepdata="${XDG_DATA_HOME:-$HOME/.local/share}/sdep" from="" to="" @@ -55,7 +55,7 @@ esac tempfile=$(mktemp) cat "$sdepdata/once" > "$tempfile" -sed "s/^/$(date +%Y-%m-%d) /" <"$sdepdata/daily" | >> "$tempfile" +sed "s/^/$(date +%Y-%m-%d) /" <"$sdepdata/daily" >> "$tempfile" while read line; do weekday=$(echo "$line" | sed "s/ .*$//") echo "$line" | sed "s/^[ ]*[^ ]* /$(date -d $weekday +%Y-%m-%d) /"