sb_sfeed_new (409B)
1 # Get number of feeds that are recently published 2 # Gets location as first argument 3 # Defaults to ~/.sfeed/feeds 4 # Gets name as second argument 5 # Defaults to "Feed" 6 7 sfeed_new() { 8 LOCATION="$1" && [ -z "$LOCATION" ] && LOCATION="$HOME/.sfeed/feeds" 9 NAME="$2" && [ -z "$NAME" ] && NAME="Feed" 10 printf "$NAME: " 11 sfeed_plain "$LOCATION"/* | grep '^N' | wc -l | tr '\n' ' ' || return 1 12 printf "$DELIMITER " 13 }