aboutsummaryrefslogtreecommitdiffstats
path: root/bashrc
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-01-23 19:16:06 +0000
committerMatthew Lemon <y@yulqen.org>2024-01-23 19:16:06 +0000
commite059aa571165d7068a08ea1fe169473df95256e2 (patch)
tree60e2b3dd34d6bab34f5401a7b5c9c67fbf45672b /bashrc
parentcde5b5d0deab1b9c518d4ea5b32771ea27016987 (diff)
Adds read and review function for taskwarrior
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc17
1 files changed, 17 insertions, 0 deletions
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