summaryrefslogtreecommitdiffstats
path: root/.local/bin/idea
diff options
context:
space:
mode:
authorJoe <rrbo@proton.me>2023-03-01 17:22:31 +0100
committerJoe <rrbo@proton.me>2023-03-01 17:22:31 +0100
commitfddaa1d3a389418ceeebb3d10282ba471b53a9a8 (patch)
tree056a57481158260625787a290356e21c1ac35719 /.local/bin/idea
parentup (diff)
downloaddotfiles-bsd-fddaa1d3a389418ceeebb3d10282ba471b53a9a8.tar.gz
dotfiles-bsd-fddaa1d3a389418ceeebb3d10282ba471b53a9a8.tar.bz2
dotfiles-bsd-fddaa1d3a389418ceeebb3d10282ba471b53a9a8.tar.xz
dotfiles-bsd-fddaa1d3a389418ceeebb3d10282ba471b53a9a8.tar.zst
dotfiles-bsd-fddaa1d3a389418ceeebb3d10282ba471b53a9a8.zip
test
Diffstat (limited to '.local/bin/idea')
-rwxr-xr-x.local/bin/idea10
1 files changed, 7 insertions, 3 deletions
diff --git a/.local/bin/idea b/.local/bin/idea
index 0c212dd..b5fc477 100755
--- a/.local/bin/idea
+++ b/.local/bin/idea
@@ -1,19 +1,23 @@
#!/bin/sh -e
if [ -z "$1" ]; then
- thought=$(cat | xargs)
+ thought=$(cat -)
elif [ -f "$1" ]; then
- thought=$(cat "$1" | xargs)
+ thought=$(cat "$1")
else
thought="$*"
fi
+thought_a="$(printf "%s" "${thought}" | sed "s/\n/<br>/")"
+exit
date=$(date '+%a, %d %b %Y %T')
html_fmt='\t\t\t\t<h3>'"${date}"'<\/h3>\
\t\t\t\t<p>\
-\t\t\t\t\t'"${thought}"'\
+\t\t\t\t\t'"${thought_a}"'\
\t\t\t\t<\/p>\
'
+echo "%s" "${html_fmt}"
+exit
case $(hostname -s) in
mother|po-rbo) sed="sed -i" ;;
fbsd-tp) sed="sed -i ''" ;;