summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
authorJoe <rrbo@proton.me>2023-04-20 17:58:29 +0200
committerJoe <rrbo@proton.me>2023-04-20 17:58:29 +0200
commitb6fba6b5ac016f5c950c7e23a02076560067794b (patch)
treed636a60ecc303c589caddf770d641f22a3c8fc6c /.local/bin
parentideas (diff)
downloaddotfiles-bsd-b6fba6b5ac016f5c950c7e23a02076560067794b.tar.gz
dotfiles-bsd-b6fba6b5ac016f5c950c7e23a02076560067794b.tar.bz2
dotfiles-bsd-b6fba6b5ac016f5c950c7e23a02076560067794b.tar.xz
dotfiles-bsd-b6fba6b5ac016f5c950c7e23a02076560067794b.tar.zst
dotfiles-bsd-b6fba6b5ac016f5c950c7e23a02076560067794b.zip
better idea
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/idea26
1 files changed, 16 insertions, 10 deletions
diff --git a/.local/bin/idea b/.local/bin/idea
index f97e8f7..3e4ee04 100755
--- a/.local/bin/idea
+++ b/.local/bin/idea
@@ -8,11 +8,11 @@ else
thought="$*"
fi
-thought_html="$(printf "%s" "${thought}" | sed '{s#^#\\t\\t\\t\\t\\t#;s#^\\t\\t\\t\\t\\t$#\\t\\t\\t\\t</p>\\\n\\t\\t\\t\\t<p>#;s#$#\\#;}')"
+thought="$(printf "%s" "${thought}" | sed '{s#^#\\t\\t\\t\\t\\t#;s#^\\t\\t\\t\\t\\t$#\\t\\t\\t\\t</p>\\\n\\t\\t\\t\\t<p>#;s#$#\\#;}')"
date=$(date '+%a, %d %b %Y %H:%M')
html_fmt='\t\t\t\t<h3>'"${date}"'</h3>\
\t\t\t\t<p>\
-'"${thought_html}"'
+'"${thought}"'
\t\t\t\t</p>\
'
rss_fmt='\\t<item>\
@@ -20,7 +20,13 @@ rss_fmt='\\t<item>\
\t <pubDate>'"${date} $(date '+%Z')"'</pubDate>\
\t <link>http://jozan.org/thoughts.html</link>\
\t <guid>'"$(uuidgen)"'</guid>\
-\t <description>'"${thought}"'</description>\
+\t <description>\
+\t\t<![CDATA[\
+\t\t\t\t<p>\
+'"${thought}"'
+\t\t\t\t</p>\
+\t\t]]>\
+\t </description>\
\t</item>
'
@@ -31,10 +37,10 @@ esac
$sed -e '/<\/channel>/i '"${rss_fmt}" \
"$HOME"/dev/web/joe-www/thoughts.xml
-$sed -e '/<!-- thoughts here -->$/{n;s#^#'"${html_fmt}"'#;}' \
- "$HOME"/dev/web/joe-www/thoughts.html
-git -C "$HOME"/dev/web/joe-www add -u
-git -C "$HOME"/dev/web/joe-www commit -m "Thought: ${date}"
-git -C "$HOME"/dev/web/joe-www push
-
-vps
+#$sed -e '/<!-- thoughts here -->$/{n;s#^#'"${html_fmt}"'#;}' \
+# "$HOME"/dev/web/joe-www/thoughts.html
+#git -C "$HOME"/dev/web/joe-www add -u
+#git -C "$HOME"/dev/web/joe-www commit -m "Thought: ${date}"
+#git -C "$HOME"/dev/web/joe-www push
+#
+#vps