Created
July 28, 2013 02:23
-
-
Save jfrobbins/6097081 to your computer and use it in GitHub Desktop.
this will post a simple note to status.net and pump.io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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