summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 ''" ;;