add screenshot

This commit is contained in:
Massimo Scagliola 2024-04-28 15:41:43 +02:00
parent b360eb2018
commit 82136e3719
3 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
# Get Last RSS Post
![Screenshot](screenshot.jpg)
Simple script to get the latest post link from a RSS feed (usually, the second occurence of the `<title>` tag).
It provides a quick way to copy/paste the title and URL for social media.

4
get-last-rss-post.sh Normal file → Executable file
View File

@ -44,8 +44,8 @@ wget -q -O feed.xml $1
if ! [[ $? == "0" ]]; then echo "Error."; cleanup 1; else echo "Done."; fi
# Check if downloaded file has <rss> tag
grep '<rss' feed.xml
if ! [[ $? == "0" ]]; then echo "This is not a RSS feed. Exiting."; cleanup 1; else echo "Done."; fi
grep -q '<rss' feed.xml
if ! [[ $? == "0" ]]; then echo "This is not a RSS feed. Exiting."; cleanup 1; fi
# Find 2nd clean title (1st post) and replaces / with \/

BIN
screenshot.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB