From b6fba6b5ac016f5c950c7e23a02076560067794b Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 20 Apr 2023 17:58:29 +0200 Subject: better idea --- .local/bin/idea | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to '.local/bin') 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

\\\n\\t\\t\\t\\t

#;s#$#\\#;}')" +thought="$(printf "%s" "${thought}" | sed '{s#^#\\t\\t\\t\\t\\t#;s#^\\t\\t\\t\\t\\t$#\\t\\t\\t\\t

\\\n\\t\\t\\t\\t

#;s#$#\\#;}')" date=$(date '+%a, %d %b %Y %H:%M') html_fmt='\t\t\t\t

'"${date}"'

\ \t\t\t\t

\ -'"${thought_html}"' +'"${thought}"' \t\t\t\t

\ ' rss_fmt='\\t\ @@ -20,7 +20,13 @@ rss_fmt='\\t\ \t '"${date} $(date '+%Z')"'\ \t http://jozan.org/thoughts.html\ \t '"$(uuidgen)"'\ -\t '"${thought}"'\ +\t \ +\t\t\ +'"${thought}"' +\t\t\t\t

\ +\t\t]]>\ +\t
\ \t
' @@ -31,10 +37,10 @@ esac $sed -e '/<\/channel>/i '"${rss_fmt}" \ "$HOME"/dev/web/joe-www/thoughts.xml -$sed -e '/$/{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 '/$/{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 -- cgit v1.2.3