Posted By

lukaszkorecki on 02/24/08


Tagged

curl Bash zenity blip


Versions (?)

Improved blipsend


 / Published in: Bash
 

Improved blipsend miniapp Requires curl, zenity and sed

  1. #!/bin/bash
  2. # simpliest blip client zenity edition aka blipsendz
  3. # requires: zenity, curl, sed
  4. # put your blip login details (login:password) in ~/.blipdata file
  5. # TODO: support for char's like: ) / etc...
  6. if [ -a ~/.blipdata ]; then
  7.  
  8. curl -H'User-Agent: blipsend 0.1' -H'Accept: application/json' -H'X-Blip-api: 0.02' -u $(more ~/.blipdata) -F "update[body]=$(echo $(zenity --entry --text="New status") | sed 's/ /\ /g')" http://api.blip.pl/updates
  9. zenity --info --text="Your message was sent"
  10. else
  11. zenity --error --text="Missing login data\n Does ~/.blipdata exist?"
  12. fi

Report this snippet  

You need to login to post a comment.