#!/bin/bash
# Title......: rss2md
# Description: Creates a markdown formatted out put from a listing of rss feeds
# Author.....: Mitchell Johnston - uid 0
# Contact....: mitch@crn.hopto.org
# Updated....: Sun Sep 20 08:03:43 AM CDT 2026
#----------------------------------
# Sections: Changes variables functions setup main cartoon
# use '#' in vi/vim to jump to word under cursor
: ' Changes:
Sun Sep 20 2026 Fixed links to Thats in the Bible
Wed Jun 11 2025 Added Thats In The Bible?
Sun Mar 23 2025 Rm Activist post, they started to block my links.
Fri Mar 21 2025 Added NWS Radar map
Thu Feb 20 2025 Added national forecast map to Weather
'
# variables
#----------------------------------
[ "$1" == "-D" ] && DEBUG=1 && shift 1 # -D to turn on debug mode
[ "$DEBUG" == 1 ] && echo "---Variables---" && set -x
PS4='$SECONDS $LINENO: ' # debug prompt
DOW=$(date +%a) # day of week: Thu
TODAY=$(date +%m/%d) # month/day: 03/25
DOM=$(date +%d) # day of month: 25
OS=$(uname -s) # OS type: SunOS Linux
NAME=${0##*/} # name of the script
COUNT=5 # number of articles to pull
PIC=$(cat /var/tmp/ctoon.txt) # sets the cartoon for the day
# Colors - uncomment if needed
R=$1 # red
BR=$1 # bold red
G=$2 # green
BG=$2 # bold green
Y=$3 # yellow
BY=$3 # bold yellow
B=$4 # blue
BM=$5 # bold magenta
BC=$6 # bold cyan
C=$6 # cyan
BL=$7 # bold light grey
BLD=$ # bold
N=$0 # normal
SIT=$ # italics
RIT=$ # remove italics
UL=$ # turn underline on
NL=$ # turn underline off
RV=$ # turn on reverse mode
ROWS=$
COLS=$
[ "$DEBUG" == 1 ] && set +x && read -p "${N}-Continue-" -n 1 x
# functions
#----------------------------------
rss{ ## simple rss reader
# use: rss {url} {optional count}
[ "$#" -eq 2 ] && COUNT=${2}
if $-3-$1>//2>&1
then
rsstail --time-format '%r %m/%d/%Y' --initial "$COUNT" -e 1 --format '#. [{title}]({link}) {updated:>10}\n' "$1" 2>/dev/null
else
echo "___Site is down___"
fi
}
bl{ ## write a blank line
# Use: bl
[ "$DEBUG" == "1" ] && set -x
echo ""
}
html{ ## mark up code
vim -f +"syn on" +"set nonu" +"set foldenable!" +"set nospell" +"run! syntax/2html.vim" +"wq" +"q" $1
}
log{ ## creates a basic log entry $LOG must be defined
# Use: log {entry}
[ "$DEBUG" == "1" ] && set -x
logger -i -t "$NAME" "$*"
}
pause{ ## simple pause routine
# Use: pause {optional number of seconds} or "-nt" for no time out
[ "$DEBUG" == "1" ] && set -x
[ "$1" == "-nt" ] && TMOUT="" && shift
echo "$BY";
if [ $# -gt 0 ]
then
read -t $1 -r -p "${C}Hit any key (${BY}$1${C} second timeout)${N}" -n 1 FOO;
else
read -r -p "${C}Hit any key${N}" -n 1 FOO;
fi;
bl
}
strip-tags{ ## remove HTML tags
# Use: curl https://linuxhint.com/bash_cut_command/ --silent | strip-tags
sed -e 's/<[^>]*.//g' -
}
xtitle{ ## set window title
# Use: xtitle "Text to display"
printf "\033]0;%s\007" "$*"
}
version{ ## display version and change history
grep -E '^# Updated' $0
bl
sed -n "/' Changes/,/^ *$/p" <$0 |grep -E -v 'sed -n|exit 0|}'
exit 0
}
# setup
#----------------------------------
# this provides a quick way to edit all my scripts on the fly
if [ "$1" == "-E" ]
then
vim $0
sed -i -e "7s/.*/# Updated....: $(date)/" $0
log "Updated $0"
html $0
cp $0 /var/www/unix
mv $0.html /var/www/unix
scp $0 mitch@mitch-desktop:/home/mitch/bin/
exit
fi
# display help if needed
if [ "$1" == "-h" ] || [ "$1" == "--help" ]
then
fmt -s -w $ <<END
$NAME
No options - This is called from the "files" command
END
exit
fi
# display version and change history
if [ "$1" == "-v" ] || [ "$1" == "--version" ]
then
version
fi
# listing of required apps
command -v bash >/dev/null || sudo apt install bash -qyy
command -v rsstail >/dev/null || sudo pip install rsstail
# main
#---------------------------
[ "$DEBUG" == 1 ] && echo "---Functions---" && typeset -F && read -p "${N}-Continue-" -n 1 x
[ "$DEBUG" == 1 ] && echo "---Main---" && set -x
case $1 in
-o) # OpEd
cat <<EOL
## π° __OpEd__ {#oped}
#### _In an empire of lies, truth is treason._
#
[__corbettreport.com__]https://www.corbettreport.com/ _Opensource Intelligence News_
$https://www.corbettreport.com/feed/3
[__Eric Peters__]https://www.ericpetersautos.com/ _Automobiles, Motocycles, and Libertarian Politics_
$https://www.ericpetersautos.com/feed/3
[__The Organic Prepper__]https://www.theorganicprepper.com/ _The Official Blog of the Apocalypse_ [(__Classes and Books__)]https://selfrelianceandsurvival.com/
$https://www.theorganicprepper.com/feed/3
[π]#
<HR>
## π§ __Podcasts__ {#podcasts}
#### _Words will always retain their power. Words offer the means to meaning, and, for those who will listen, the enunciation of truth._ -V for Vendetta
##### [π Mises Institute]https://mises.org/{target="blank"} _Austrian Economics, Freedom, and Peace_
[The Human Action Podcast]https://mises.org/podcasts/human-action-podcast
$https://mises.org/podcast-feed/1271683
[Radio Rothbard]https://mises.org/podcasts/radio-rothbard
$https://mises.org/podcast-feed/1272253
##### [π That's In The Bible?]https://www.thatsinthebible.com/{target="blank"} _All scripture contained in this podcast is from the King James Bible _ i
>[__Mp3/Thats In The Bible__]/3/---/ _Archives_
$$///3/---\-*3|-3
do
cat /var/www/mp3/thats-in-the-bible/${FILE%.mp3}.md
mkln $FILE
done)
## π° Metals Prices {#metals}
<div style="text-align: center;">
### US Dept
<iframe src="http://www.USADebtClock.com/us-debt-clock-widget.php" height="80" width="350" scrolling="no" frameborder="0">
</iframe>
<p>Visit <a href="http://www.USADebtClock.com/" target="_blank">USADebtClock.com</a> to learn more!</p>
</div>
<iframe src="https://goldbroker.com/widget/live/XAG?currency=USD&height=320" scrolling="no" frameborder="0" width="100%" height="320" style="border: 0; overflow: hidden;"></iframe><br>Silver price by <a href="https://goldbroker.com/" style="text-transform: uppercase">GoldBroker.com</a>
<iframe src="https://goldbroker.com/widget/live/XAU?currency=USD&height=320" scrolling="no" frameborder="0" width="100%" height="320" style="border: 0; overflow: hidden;"></iframe><br>Gold price by <a href="https://goldbroker.com/" style="text-transform: uppercase">GoldBroker.com</a>
<script type="module" src="https://widgets.tradingview-widget.com/w/en/tv-market-overview.js"></script>
<tv-market-overview symbol-sectors='[{"sectionName":"Indices","symbols":["FOREXCOM:SPXUSD","FOREXCOM:NSXUSD","FOREXCOM:DJI","VELOCITY:BRENT","FOREXCOM:XAUUSD","TVC:GOLDSILVER"]},{"sectionName":"Stocks","symbols":["NASDAQ:AAPL","NASDAQ:ADBE","NASDAQ:NVDA","NYSE:IBM","NYSE:HPQ","NYSE:F","NYSE:GM","NASDAQ:AMZN","NASDAQ:AMD"]}]'></tv-market-overview>
[π]#"Top" [β¬οΈ]#"Bottom" [π]:. "Back")
EOL
;;
-t) # tech news
cat <<EOL
<hr class="pacman">
## π° __Tech News__ {#tech}
#### _If you can not live without technology, it is no longer a convenience;its enslavement._
[__Distrowatch__]../ _Put the fun back into computing, use Linux & BSD_
$https://distrowatch.com/news/dw.xml
[__Hacker News__]https://news.ycombinator.com/news _News for Nerds_
$https://news.ycombinator.com/rss
[__Tech Crunch__]https://techcrunch.com/ _Startup and Technology News_
$https://techcrunch.com/feed/
[__Tom's Hardware__]https://www.tomshardware.com/ _For The Hardcore PC Enthusiast_
$https://www.tomshardware.com/feeds/all
[π]#"Top" [β¬οΈ]#"Bottom" [π]:. "Back")
---
## β
Weather in North Dakota {#weather}
<a href="https://time.is/Lisbon,_North_Dakota" id="time_is_link" rel="nofollow">Time is:</a>
<span id="Lisbon__North_Dakota_z123"></span>
<script src="//widget.time.is/en.js"></script>
<script>
time_is_widget.init{____123:{:"TIME<br>DATE<br>SUN",_:"dayname, monthname dnum, year, week",_:"Sunrise: srhour:srminute Sunset: sshour:ssminute<br>Day length: dlhoursh dlminutesm",:"46.4416300,-97.6812100"}};
</script>
$
$-5060162---|-'s/Weather in Lisbon/Temp/g'-'s/- / \n/g'
$-5060162------4|-'s/Lisbon forecast => //g'-'s/- / \n/g'|-4
#### National Forecast Map
<div style="text-align: center;">
[!["National Forecast Map"]https://www.wpc.ncep.noaa.gov//noaa/noaa.gif{width=100% height=auto}]https://www.wpc.ncep.noaa.gov/national_forecast/natfcst.php{width=auto% height=auto target="blank"}
</div>
[π]#"Top" [β¬οΈ]#"Bottom" [π]:. "Back")
---
#### NWS Radar
<div style="text-align: center;">
[!["NWS Radar"]https://radar.weather.gov/ridge/standard/CONUS_loop.gif{width=100% height=auto}]https://radar.weather.gov/ridge/standard/CONUS_loop.gif{width=auto% height=auto target="blank"}
</div>
[π]#"Top" [β¬οΈ]#"Bottom" [π]:. "Back")
---
## βοΈ Crossword {#puzzle}
<div style="text-align: center;">
<script type="text/javascript">
boatload_puzzles_format = 'Portrait';</script>
<p>Loading <a href="https://www.boatloadpuzzles.com/playcrossword">
crossword puzzle</a>. One moment please.</p>
<script type="text/javascript"
src="//www.boatloadpuzzles.com/Crossword.js"></script>
[Crossword Nexus]https://www.crosswordnexus.com/"Crossword Dictionary"{target="blank"}
[___New Jigsaw Puzzle___]//{target="blank"}
</div>
[π]#"Top" [β¬οΈ]#"Bottom" [π]:. "Back")
---
## π¨ Cartoon of the day {#cartoon}
<div style="text-align: center;">
[!["Cartoon of the day"]${}{width=85% height=auto}]///"Cartoon of the day"
</div>
EOL
;;
*) # default
echo " "
echo "<p class="blue" >π __Please remember you are not alone. More and more people are waking up. And once theyβre awake they donβt go back to sleep. Distrust the Government, avoid mass media and fight the lies. Remember: if youβre not paranoid by now then youβve not been paying attention.__ [_- Dr Vernon Coleman_](https://www.vernoncoleman.com/)</p> "
cat <<EOL
## π° __Alternative News__ {#altnews}
#### \`Mat 24:7\` _For nation shall rise against nation, and kingdom against kingdom: and there shall be famines, and pestilences, and earthquakes, in divers places._
[__Antiwar.com__]https://www.antiwar.com/ _News_
$http://news.antiwar.com/feed/
[__Reason.com__]https://reason.com/ _Free Minds and Free Markets_
$https://reason.com/latest/feed/
[__Retraction Watch__]https://retractionwatch.com/feed/ _Tracking retractions as a window into the scientific process_
$https://retractionwatch.com/feed/
[__π§ M4.5+ Earthquakes:__]https://earthquake.usgs.gov/earthquakes/map/?extent=-43.58039,-188.4375&extent=71.69129,5.625"USGS Magnitude 2.5+ Earthquakes, Past Day"
$https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_day.atom
\`Ephesians 6:12\` _For we wrestle not against flesh and blood, but against principalities, against powers, against the rulers of the darkness of this world, against spiritual wickedness in high places._
EOL
;;
esac
# That's all folks!
cat <<ENDING
<hr class="three">
ENDING
exit