RSS Feed as Wallpaper
Pre-Req convert utility :sudo apt-get install imagemagick curl utility :sudo apt-get install curl Any wallpaper :it’s called rss.jpg here
The idea is pretty native : Step 1 : Get the rss feed URL Step 2 : Scrap for the data Step 3 : Set the data as wallpaper
Code template
“
!/bin/bash
convert -font helvetica -fill white -pointsize 36 -draw \ ‘text 500,500 “This is the data from the rss feed”’ \ rss.jpg rss-current.jpg while [ 1 ]; do
COUNTER=0
while [ $COUNTER -lt 10 ]; do
<b># grep for text as per your requiremnet</b>
text=`curl -s $URL | grep CDATA`
<b>cmd="convert -font helvetica -fill white -pointsize 40 -draw 'text 500,500 \"$text\"' rss.jpg rss-current.jpg"</b>
eval $cmd
temp=$(stat -c%s black-current.jpg)
if [[ $temp > 1000 ]]
then
eval $cmd
break
fi
sleep 5
let COUNTER=COUNTER+1
done
sleep 3
done Now just run the coe as background process : _$ ./rss.sh & _ You will find a new image called rss-current.jpg in the same path as your script, set it as a wallpaper and stay updated.
About Hemanth HM
Hemanth HM is a Sr. Machine Learning Manager at PayPal, Google Developer Expert, TC39 delegate, FOSS advocate, and community leader with a passion for programming, AI, and open-source contributions.