From e059aa571165d7068a08ea1fe169473df95256e2 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 23 Jan 2024 19:16:06 +0000 Subject: Adds read and review function for taskwarrior --- bashrc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'bashrc') diff --git a/bashrc b/bashrc index a487cf3..2f0d65b 100644 --- a/bashrc +++ b/bashrc @@ -101,6 +101,23 @@ tickle () { shift task add wait:$deadline $@ } + +# taskwarrior read and review (ensure you have html-xml-utils package installed) +webpage_title (){ + curl -s "$@" | hxselect -s '\n' -c 'title' 2>/dev/null +} + +read_and_review (){ + link="$1" + title=$(webpage_title $link) + echo $title + descr="\"Read and review: $title\"" + id=$(task add pro:h.reading "$descr" | sed -n 's/Created task \(.*\)./\1/p') + task "$id" annotate "$link" +} + +alias rnr=read_and_review + # fzf source /usr/share/fzf/key-bindings.bash source /usr/share/fzf/completion.bash -- cgit v1.2.3