Microblogging for Applications

I’ve been using the open source project Laconica to track my time at work. It is a Twitter clone and aims to support the open micro blogging protocol and is also compatible to the Twitter api.

While doing a little research on command line tools I discovered that posting to Twitter and therefore Laconica was a simple task using cURL. So I threw together a little batch file to test it. Then I decided to add to all my nightly batch jobs. Here is how it works.

Step 1
On an installation of Laconica(or Twitter) register an account for your application.

  • For Nickname use a simple single word
  • Email is optional
  • Full Name can be multiple words and more descriptive
  • If your app has a link put it in the Homepage
  • Add a little description to the Bio section
  • I use the Location field to identify the primary server it is hosted on

That’s it! Log Out

Step 2

  • Create a batch file or script to execute the cURL command
    Windows twittercurl.bat

    @echo off
    :: send a post to a laconica site using curl
    SET CURLPATH=D:\usr\curl\curl.exe
    SET URL=http://site.domain.com/laconica/api/statuses/update.xml
    SET USER=nickname
    SET PASS=pass4nickname
    %CURLPATH% -u %USER%:%PASS% -d status=%1 %URL%

    Bash twittercurl.sh

    # requires curl
    ### CONFIG
    ### COMMAND
    curl -u $USER:$PASS -d status="$*" -s -o /dev/null ${URL}
  • Edit the USER and PASS variables to use the nickname and password

Step 3
Now all you need to do is to CALL your script and pass it a message. In the message you can tag a keyword that you would like to use by appending the # to the word.

Example: CALL twittercurl.bat “#update nightly batch job completed”

Step 4
Track your application by going to the site/ + nickname or use the API for more options:

Now I have a quick review of my nightly jobs and scheduled events during the day.

This is just a start, there are a lot of features and even more possibilities. Since it is a Twitter clone there are all sorts of twitter-like things that you can do, but that is another topic.

My example uses the command line, so if you can type it then you can post it. For advanced use the web API is available to any application progam that can POST to a URL.

Please post any corrections and ideas!


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: