diff options
author | joe <rbo@gmx.us> | 2025-10-06 22:23:57 +0200 |
---|---|---|
committer | joe <rbo@gmx.us> | 2025-10-06 22:23:57 +0200 |
commit | 767049dda47605b904b49836f281672b7899ca78 (patch) | |
tree | 4b22bb200209158970d503fc9b4cab789acce2e8 /.local/bin | |
parent | up (diff) | |
download | dotfiles-bsd-767049dda47605b904b49836f281672b7899ca78.tar.gz dotfiles-bsd-767049dda47605b904b49836f281672b7899ca78.tar.bz2 dotfiles-bsd-767049dda47605b904b49836f281672b7899ca78.tar.xz dotfiles-bsd-767049dda47605b904b49836f281672b7899ca78.tar.zst dotfiles-bsd-767049dda47605b904b49836f281672b7899ca78.zip |
up
Diffstat (limited to '')
-rwxr-xr-x | .local/bin/idea | 17 | ||||
-rwxr-xr-x | .local/bin/vps | 9 |
2 files changed, 14 insertions, 12 deletions
diff --git a/.local/bin/idea b/.local/bin/idea index c3fc9b4..e4207b7 100755 --- a/.local/bin/idea +++ b/.local/bin/idea @@ -1,22 +1,27 @@ #!/bin/sh -e -if [ -z "$1" ]; then +title="untitled" + +if [ -z "$2" ]; then thought=$(cat -) -elif [ -f "$1" ]; then - thought=$(cat "$1") + title="$1" +elif [ -f "$2" ]; then + thought=$(cat "$2") + title="$1" else - thought="$*" + thought="${*:2}" + title="$1" fi 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>\ +html_fmt='\t\t\t\t<h3>'"${date}"' - '"${title}"'</h3>\ \t\t\t\t<p>\ '"${thought}"' \t\t\t\t</p>\ ' rss_fmt='\\t<item>\ -\t <title>'"${date}"'</title>\ +\t <title>'"${title}"'</title>\ \t <pubDate>'"${date} $(date '+%Z')"'</pubDate>\ \t <link>http://jozan.org/thoughts.html</link>\ \t <guid isPermalink="false">'"$(uuidgen)"'</guid>\ diff --git a/.local/bin/vps b/.local/bin/vps index e2b43aa..128ebe0 100755 --- a/.local/bin/vps +++ b/.local/bin/vps @@ -1,18 +1,15 @@ #!/bin/sh -serv_addr="10.10.10.6" -serv_port="10022" +serv_addr="10.0.0.2" +serv_port="22" # joe-www -rsync -e "ssh -p$serv_port" -avh --no-o --no-g --delete-after \ +rsync -e "ssh -p$serv_port" -avh --progress --no-o --no-g --delete-after \ --exclude '.*' \ --exclude 'README.org' \ --exclude 'LICENSE' \ --exclude 'asm-example.cgi' \ --exclude 'files/' \ - --exclude 'caco' \ - --exclude 'sad' \ - --exclude 'bon_concert' \ "$HOME"/dev/web/joe-www/ \ root@$serv_addr:/var/jail/www/var/www/joe/ # gitjoe-cgit |