This probably reveals something of my own conceit, but I have fun collecting statistics on how many of my photos are downloaded each day. I've written a clumsy script to grab my photomanagement page and parse the HTML that is returned for the information I want; my script then records the number of photos currently published and downloaded against the date, so I can plot graphs... I know, slightly sad....
I haven't bothered here yet, partly because the numbers of photos being downloaded is currently comparatively small, but at SXC I grabbed per-photo data and so was able to track how individual photos were "performing". But parsing HTML is clumsy, and prone to error when the page generation code changes...
It got me wondering whether there was a way download stats could be presented to contributors in a flexible way, perhaps so they could generate their own graphs or whatever. And without putting much strain on the site either... (ie less load than a script page-crawling through multiple images, say)
Just thinking out loud...
C
Yup...........slightly sad....
Now where did you say the script was? :0)
LOL!
http://www.colinbrough.pwp.blueyonder.co.uk/count_rgbdownloads
http://www.colinbrough.pwp.blueyonder.co.uk/count_downloads (for SXC)
These run on my Ubuntu install, and depend on 'wget' to grab pages, 'cookies-sql2text' to generate a cookies file (to allow the script to use my login), and then 'sed', 'grep', 'tail' to process the HTML that comes back. The information is saved in files locally, all in simple formats of my own design. (I use the 'rcs' tools - 'co' and 'ci' to store past versions of the files in case the script breaks things.)
http://www.colinbrough.pwp.blueyonder.co.uk/DownloadLog contains the data I've collected for my photos here - first column is obviously a date; second column is total number of downloads, and third column is the number of my photos then uploaded...
I post-process with 'gnuplot' to draw graphs...
I Love your script Colin :)
How do you think we import a SXC gallery......
Most of the statistic information is available but at the moment we only provide this simple page: http://www.rgbstock.com/recent
Maybe it is a good idea to create a statistics page per user. I will think about it.
That's was a great idea to make a script like that.
I think might have even learned some new shell script tricks ;-)
Just since its been of interest, here are the kinds of graphs I can generate from the data collected by the above scripts:
http://www.colinbrough.pwp.blueyonder.co.uk/RGB1.gif
http://www.colinbrough.pwp.blueyonder.co.uk/SXC1.gif
The RGBstock graph only has total number of shots downloaded and number of photos online against date. The SXC graph I chose has the downloads for my top 45 photos at SXC - the implementation is poor, so the colour of the line changes as one photo "overtakes" another...
I wish you people would speak simple English... LOL!
I am sorry. I wished I could speak better English ;)
The graphs looks good Colin, well done.