Was reading about Computers that's tweets they're status. So i've throw together a script to tweet the temperatur of my MBWE.

You need:
And a twitter account

Install Curl

Move to the folder you got your packages.

$ wget
$ tar zxvf curl-7.19.6.tar.gz
$ cd curl-7.19.6

Now we must install curl

$ ./configure
$ make
$ make install

Then we need to make the script that connect and post a tweet to

Place it where you want.

$ touch

Now we made the file, but you need to edit the file with your favorite text editor. Mine is VI, So i'll use that.

$ vi
//Then hit "i" so you enter Insert mode
//then copy the code 
//If you use Putty as i, just right click inside the window
//else if you use ubutu, right click and choose paste
//now we have pasted the code, so hit esc and write :W (write to file) and so :Q (quit editor)

Code for tweeting the temperature

curl -u Username:password -d status="Temp is $(/usr/sbin/smartctl -d ata -A /dev/sda | grep Temp | sed "s/^.*\(.[0-9]\)$/\1/")°C"

Make it executable.

$ chmod 755

Test it with

$ ./

If you see lots of rubbish, it probably works.
If no, try to run the curl code to see what kind of errors you've got.

Any comments are welcome.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License