git.sr.ht/~lattis/rss/commit/3272cc8939485a0f470cf5aa147a079d5c31febd.patch

Preview meta tags from the git.sr.ht website.

  • General Meta Tags

    1
    • title
      - operate on feeds with this title +-h - what you are reading COMMANDS: fetch - download feeds @@ -21,6 +26,7 @@ list - list all posts list_read - list read posts list_unread - list unread posts pop - read new posts +show - read all posts help - what you are reading EXTENSIONS:" @@ -51,12 +57,15 @@ match_title="" path="${feed_dir}" if [ $# -ge 1 ]; then - while getopts "g:t:" opt; do + while getopts "g:t:h" opt; do case "$opt" in g) match_group="$OPTARG" ;; t) match_title="$OPTARG" ;; + h) printf "%s\n" "$usage" + exit + ;; ?) die "invalid option\n" ;; esac @@ -77,7 +86,7 @@ fetch_feed() { while [ $(jobs -p | wc -l) -ge $concurrent_limit ]; do sleep 0.5; done { - printf "$url - \033[33mfetching\033[0m\n" + printf "%s - \033[33mfetching\033[0m\n" "$url" curl -sS "$url" | \ xsltproc --stringparam target_dir "$dir" \ @@ -90,7 +99,7 @@ fetch_feed() { *) result="\033[31merror ($result)\033[0m";; esac - printf "$url - $result\n" + printf "%s - %s\n" "$url" "$result" }& } @@ -101,7 +110,7 @@ print_feed() { remove_feed() { url="$1" dir="$2" title="$3" - printf "removing $title\n" + printf "removing %s\n" "$title" rm -rf "$dir/$title" } @@ -161,7 +170,7 @@ display_html() { # Builtin commands rss_help() { - printf "${usage}\n" + printf "%s\n" "$usage" } rss_fetch() {