From 1406b016da4b49742bb068db2a66cfdba17d3b4f Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Wed, 4 Jan 2023 23:37:26 +0100 Subject: [PATCH] bin: extend jrnl-tag --- .local/bin/scripts/jrnl-tag | 12 ++++++++++-- .local/bin/scripts/sy | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.local/bin/scripts/jrnl-tag b/.local/bin/scripts/jrnl-tag index dd3d84a..713c1d7 100755 --- a/.local/bin/scripts/jrnl-tag +++ b/.local/bin/scripts/jrnl-tag @@ -1,2 +1,10 @@ -#!/bin/sh -e -rpl "\(^\|[^@]\)\b$1\b" "\1@$1" $JOURNAL/*.txt +#!/bin/sh +# Find terms in jrnl and turn them into tags +# Check with jrnl --tags +if test $# -eq 0 +then $0 sleep nap health tech read dev phone Zinc run bike tour laptop computer PC CB piano faith journal +else + for arg + do rpl "\(^\|[^@]\)\b$arg\b" "\1@$arg" $JOURNAL/*.txt + done +fi diff --git a/.local/bin/scripts/sy b/.local/bin/scripts/sy index 9188873..4df6339 100755 --- a/.local/bin/scripts/sy +++ b/.local/bin/scripts/sy @@ -14,3 +14,4 @@ case "$1" in (*) sudo -E sysyadm "$@";; esac sudo chown -R $USER /etc/yadm +sudo chmod ugo+rw /tmp/git -R