Monday, February 16, 2009

How to posting to Identi.ca from the CLI

terminal - cli
Hi :)

Identi.ca is an open source social networking and micro-blogging service.
I like Ideni.ca. It's good service.

I use CLI (command line) everyday. I like to dented from it. It's simple.
Just install cURL:
$ sudo apt-get install curl


And type:
$ curl -u username:password -d status="message" http://identi.ca/api/statuses/update.xml


You will receive a response containing the XML coding for your post which acts as a confirmation that your post was submitted.

Also you can create a shell file for this
Open a new text document and add the following, save it as identica.sh (or anything ending in sh):
#!/bin/bash
curl -u username:password -d status=″$1" http://identi.ca/api/statuses/update.xml


Make sure you change the chmod to 777 using the following command.
$ chmod 777 /path/to/file/


When you located the file (or add a bash prompt) it makes it simplier to identi.ca the rules. For example you can type the following to command to link to the file.
$ ./path/to/idetica.sh "Message"

1 comment:

  1. Salam,
    I update my microblog from cli too. I use bti which is really fun to use.
    http://gregkh.github.com/bti/

    ReplyDelete