From 9ac06f1421622651a38a5d8bbdbcbdfb80c2968b Mon Sep 17 00:00:00 2001 From: Bauke Date: Mon, 5 Sep 2022 14:34:28 +0200 Subject: [PATCH] Add get-feed-url. --- .functions.zsh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.functions.zsh b/.functions.zsh index 3a2bd90..4a0992c 100644 --- a/.functions.zsh +++ b/.functions.zsh @@ -1,3 +1,12 @@ gtag () { git tag -s -a "$1" -m "Version $1" } + +get-feed-url () { + for input_url in "$@"; do + html=$(curl -fsLS "$input_url") + echo $(echo $html | select-html '[property="og:title"]' -a "content") + echo $(echo $html | select-html '[rel="alternate"][type]' -a "href") + echo + done +}