Skip to content

Instantly share code, notes, and snippets.

@jfrobbins
Created July 28, 2013 02:23
Show Gist options
  • Select an option

  • Save jfrobbins/6097081 to your computer and use it in GitHub Desktop.

Select an option

Save jfrobbins/6097081 to your computer and use it in GitHub Desktop.
this will post a simple note to status.net and pump.io
#!/bin/bash
##########
# do what you want with this script,
####
# It will edit a note in an editor and then post it to statusnet and pump.io
# You will need to set up a .netrc:
# # .netrc
# #machine quitter.se
# #login <loginname>
# #password <pw>
################################
#to do:
# add markdown stuff
################################
pumpserver=microca.st
snserver=quitter.se
port=443
user=jrobb
cd /home/$(whoami)/code/pump.io/bin
tmpfile=/tmp/pumpnote.txt
rm $tmpfile
nano $tmpfile
note=$(cat $tmpfile)
if [ -z "$note" ]; then
echo "note is empty"
exit 1
fi
#post to pump.io:
./pump-post-note -s $pumpserver -P $port -p -u $user -n "$note"
#post to SN:
wget http://$snserver/api/statuses/update.xml --post-data="status=$note&source=CLI" > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment