add twtxt client

This commit is contained in:
opfez 2021-10-10 00:25:02 +02:00
parent e9ff6c7efc
commit 637857a6fe
1 changed files with 23 additions and 0 deletions

23
twt Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
PORT=420
USER=erik
SERVER=fixedpoints.zapto.org
usage() {
>&2 echo "usage: twt post \"your post\"
twt show"
}
remote() {
ssh -p $PORT $USER@$SERVER $1
}
case $1 in
post) remote "echo -e '`date -Im`\t$2' >> ~/twtxt.txt"
;;
show) remote "cat ~/twtxt.txt"
;;
*) usage
;;
esac