This repository has been archived on 2021-11-29. You can view files and clone it, but cannot push or open issues or pull requests.
rsstube-bash-old/scripts/url-extractors/chirbit

17 lines
402 B
Plaintext

# can only extract feed from URL if it's chirbit.com
if [[ $url == *"chirbit.com/"* ]]
then
# get username (cut off https://www.chirbit.com/ from front)
username=${url##*chirbit.com/}
# cut off any extra stuff from end
username=${username%%/*}
if [[ -n $username ]]
then
# prepend chirbit URL and append /rss to form feed
rss="https://www.chirbit.com/${username}/rss"
url_ext=$rss
fi
fi