Dec
7
2007
0

Google Charts

Google have released an new API to enable embedded charts on your web site, the article featuring this is here.

I have embedded this in my media server reporting package, and I am amazed at the speed of it.

My charts that took 20 seconds in php with my under-powered server now take less than a second.

Consequently, a new release 1.08 is now available for download.

Addendum 08-Dec-2007:
After closer inspection, the values passed to the API must be between 0 and 100.

Clearly this causes me a few issues, especially when dealing with larger numbers :-(

After some lateral thinking, I realised that I had to normalise the data. So I have written this php function

function normaliseData($data, $maxScale)
{
    $value="";

    // Normalize values to 0-100 for Chart API
    foreach  (explode("," , $data)as$v)
    {
        $v = ((($v 1.0000) / ($maxScale 1.0000)) * 100);
        $value .= "$v". ",";
    }
    $value = substr($value,0,strlen($value)-1);

    return$value;
}


When integrated with Firefly it looks cool see this Example screenshot
Twitter Facebook Google Bookmarks FriendFeed Technorati Google Charts Bookmark Google Charts  at reddit.com Bookmark using any bookmark manager! Stumble It! Print this article! E-mail this story to a friend!
Dec
6
2007
0

Bash Podder

I wanted to find a way of pulling my favourite podcasts from the BBC web site automagically and store them on my slug music server.

I decided to use the bashpodder scripts from here, and applied a few tweaks to fit my requirements.

I added a feature to remove podcasts after a number of days (35 by default).

Additionally, if there are any downloads/deletions then I send a request to my Firefly Media Server to rescan and update the podcast playlist.

Finallly, I set up a cron job to run 4 times a day to pull the latest files down.

My script and config files are attached bashpodder.sh and bp.conf
Twitter Facebook Google Bookmarks FriendFeed Technorati Bash Podder Bookmark Bash Podder  at reddit.com Bookmark using any bookmark manager! Stumble It! Print this article! E-mail this story to a friend!
Dec
4
2007
0

Firefly Statistics

Whilst I am between jobs at the moment I decided to create some usage statistics for my Firefly Media Server serving my Roku Soundbridge from my Linksys NSLU2 (Slug).

The statistics are html based, and are generated using php and a fantastic Open Source chart library (libchart PHP).

The source code for version 1.06 is now available here to download.

I have tidied up the code again, and tried to theme it as closely as possible to the existing Firefly web pages.

My live stats are here.
Twitter Facebook Google Bookmarks FriendFeed Technorati Firefly Statistics Bookmark Firefly Statistics  at reddit.com Bookmark using any bookmark manager! Stumble It! Print this article! E-mail this story to a friend!