diff options
author | Joe <rrbo@proton.me> | 2023-03-01 17:22:31 +0100 |
---|---|---|
committer | Joe <rrbo@proton.me> | 2023-03-01 17:22:31 +0100 |
commit | fddaa1d3a389418ceeebb3d10282ba471b53a9a8 (patch) | |
tree | 056a57481158260625787a290356e21c1ac35719 /.local/bin/idea | |
parent | up (diff) | |
download | dotfiles-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/idea | 10 |
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 ''" ;; |