diff options
author | Matthew Lemon <y@yulqen.org> | 2024-01-23 19:16:06 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-01-23 19:16:06 +0000 |
commit | e059aa571165d7068a08ea1fe169473df95256e2 (patch) | |
tree | 60e2b3dd34d6bab34f5401a7b5c9c67fbf45672b /bashrc | |
parent | cde5b5d0deab1b9c518d4ea5b32771ea27016987 (diff) |
Adds read and review function for taskwarrior
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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 |