mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 01:15:15 +00:00
rename zap_post to streams_post
This commit is contained in:
parent
3d4e8c9f98
commit
ee4837b0fb
1 changed files with 8 additions and 8 deletions
|
@ -3,16 +3,16 @@
|
|||
# Simple, minimalist command line tool to post status to hubzilla via the API. Requires curl.
|
||||
# Put it in your path, and sneeze your statuses to the zot network from your shell.
|
||||
|
||||
CONF=${HOME}/.zap_post
|
||||
CONF=${HOME}/.streams_post
|
||||
|
||||
usage () {
|
||||
echo "usage: util/zap_post [conffile]"
|
||||
echo "Create a conf file, either in .zap_post in your home directory, or supplied as an arg"
|
||||
echo "usage: util/streams_post [conffile]"
|
||||
echo "Create a conf file, either in .streams_post in your home directory, or supplied as an arg"
|
||||
echo " USER=youruserame "
|
||||
echo " PASS=yourpass"
|
||||
echo " HUB=your.hub.domain.org"
|
||||
echo " SITE=your.site.domain.org"
|
||||
echo
|
||||
echo "Type \"zap_post\" (with or without a conf file as an arg), then enter your message. Use ctrl-D to send.."
|
||||
echo "Type \"util/streams_post\" (with or without a conf file as an arg), then enter your message. Use ctrl-D to send.."
|
||||
|
||||
}
|
||||
|
||||
|
@ -27,12 +27,12 @@ CUR=`which curl`
|
|||
|
||||
[ "$USER" ] || { echo "no USER"; usage; exit 1; }
|
||||
[ "$PASS" ] || { echo "no PASS"; usage; exit 1; }
|
||||
[ "$HUB" ] || { echo "no HUB"; usage; exit 1; }
|
||||
[ "$SITE" ] || { echo "no SITE"; usage; exit 1; }
|
||||
|
||||
echo "enter your message to be posted as $USER @ $HUB, then hit Ctrl-D to send."
|
||||
echo "enter your message to be posted as $USER @ $SITE, then hit Ctrl-D to send."
|
||||
|
||||
MSG=$(cat)
|
||||
|
||||
curl -ssl -u${USER}:${PASS} --data-urlencode "body=${MSG}" https://${HUB}/api/z/1.0/item/update
|
||||
curl -ssl -u${USER}:${PASS} --data-urlencode "body=${MSG}" https://${SITE}/api/z/1.0/item/update
|
||||
|
||||
|
Loading…
Reference in a new issue