Further awkify

This commit is contained in:
Case Duckworth 2022-08-08 23:07:33 -05:00
parent 31b7529778
commit 94d96ca4c4
2 changed files with 16 additions and 9 deletions

View File

@ -39,8 +39,8 @@ xmlUrl="https://brainshit.fr/rss" htmlUrl="https://brainshit.fr" description="Si
xmlUrl="https://tilde.town/~lucidiot/ideas/rss.xml" htmlUrl="https://tilde.town/~lucidiot/ideas/" description="random ideas published by ~lucidiot"/>
<outline type="rss" text="#fridaypostcard"
xmlUrl="https://tilde.town/~lucidiot/fridaypostcard.xml" htmlUrl="http://tilde.town/~jumblesale/fp.html" description="to contribute, share a link to an image on irc with the text #fridaypostcard. updated every friday"/>
<outline type="rss" text="m455's blog"
xmlUrl="https://m455.casa/feed.rss" htmlUrl="https://m455.casa" description="A blog about programming and documentation."/>
<outline type="rss" text="m455.casa"
xmlUrl="https://m455.casa/feed.rss" htmlUrl="https://m455.casa" description="RSS feed for m455.casa"/>
<outline type="rss" text="Rick Carlino's Blog"
xmlUrl="https://rickcarlino.com/rss/feed.rss" htmlUrl="https://rickcarlino.com" description="The personal blog of Rick Carlino, a software tinkerer."/>
<outline type="rss" text="lipu pi jan Niko"

View File

@ -95,10 +95,13 @@ orange_pecan_mousse() {
# trim off everything after and before the tags, clean inner html
sprinkle=$(echo -e "$germ" |
awk '/<title/{title=1}
title{sub(/.*<title[^>]*>/,"");
if(sub(/<\/title>.*/,"")) title=0;
title{
match($0,/<title[^>]*>/);
$0 = substr($0, RSTART+RLENGTH);
if(sub(/<\/title>.*/,"")){title=0;seen=1;}
print;}
!title{exit}')
/<\/title/{seen=1}
!title&&seen{exit}')
# RSS
else
sprinkle=$(echo -e "$germ" | grep -m 1 "<title>" |
@ -120,10 +123,14 @@ orange_pecan_mousse() {
test -z "$luncheon" && luncheon="No description available"
echo -e "$__pecan" >>"$_wheremug.tmp"
sed -i "s|{{sprinkle}}|$sprinkle|g" "$_wheremug.tmp"
sed -i "s|{{seed}}|$seed|g" "$_wheremug.tmp"
sed -i "s|{{pearl}}|$pearl|g" "$_wheremug.tmp"
sed -i "s|{{luncheon}}|$luncheon|g" "$_wheremug.tmp"
awk '{
gsub(/{{sprinkle}}/,"'"$sprinkle"'");
gsub(/{{seed}}/,"'"$seed"'");
gsub(/{{pearl}}/,"'"$pearl"'");
gsub(/{{luncheon}}/,"'"$luncheon"'");
print;
}' <"$_wheremug.tmp" >"$_wheremug.tmp.tmp" &&
mv "$_wheremug.tmp.tmp" "$_wheremug.tmp"
sprinkle=""
pearl=""
luncheon=""