Gravatar information for the REST of us
Well, I have been digging into this gravatar program ever since I got home tonight. I was able to implement the REST API for gravatars without too many problems. One thing that I did notice is that one of my commenters has a rating that is nil. Usually, people have a rating of G, PG, R or X. If they don’t exist in the system, then the rating element doesn’t show up at all in the XML and I get a status code of 404.
This person had a status code of 200 (meaning ok). My only guess is that this person has a pending gravatar. That is, they are probably registered in the system, but waiting for the great folks over at Gravatar.com too rate them.
In addition to this, I also threw some email validation with regular expressions before asking Gravatar.com if this person is registered. I figure it may help cut down on wasting resources. In addition to that, I also check to see if the domain name is registered through DNS.
I found a few addresses where people had added extra text such as “remove-this” to there emails’ domain name to avoid spam. Since only valid email addresses can be registered through gravatar.com, I can safely assume that these addresses don’t exist.
The last part on this program is to finish moving some code from the front-end to the back-end. There doesn’t seem to be much left. I have been moving sections over a little at a time. It has helped me identify some problem areas during the process.
If anyone is desperate to try this out, I can send the program to you to evaluate. The problem is, you must have a Haloscan “paid” account, or a CAIF file on your hard drive. I’ll be working on being compatible free haloscan accounts after the code has been moved to the back end.
Update
The preliminary work is done. I am now able to set this up in my windows task manager to run without having to start this up myself. This means that I no longer have to manually run this program. Yeah!
I still have some tests to do and some tweaks, but this program is just about ready for beta. I may also be working with Paul Scott to determine how we can grab the comments out of his software as well for this tool.
It may turn out to simply let him create a CAIF file. If that’s the case, I have a CAIF class in .Net that may come in handy as well as a simple object serializer that he could use to turn it into Xml.
March 24th, 2005 at 4:53 am
How does the data come to your from Haloscan? Do they send XML for you to parse?
March 24th, 2005 at 5:05 am
For premium accounts, you can download an exported xml file in CAIF format. My next phase is to start parsing there pages for free accounts.
March 24th, 2005 at 5:38 am
Hmm was just wondering if I could make use of your app.. maybe if I created a similar xml feed for my comments it would work.
March 24th, 2005 at 6:17 am
I hadn’t heard of CAIF before - but apparently it is a standard used for comments and blogs.
http://www.tecknik.net/commenting/caif/
If you can save your comments in that format, then this program can read that xml file without any problems. Perhaps I can tell it to grab the CAIF file from a URL rather then the local file system.
I would like to expand this program to use other commenting systems. The blogger.com folks had said that they are planning on making comments manageable though the ATOM API this summer.
I would also like to see if movable type and word press support such features since they are popular. There are lots of posiblities for this little program.
March 24th, 2005 at 3:10 pm
Test … I’m testing if the program will run on its own from my scheduled tasks while I’m not logged into the operating system.
March 24th, 2005 at 5:05 pm
Lewis can you show me an example of what the Haloscan CAIF looks like? I’ll work on creating a matching output for my comments.
It would be cool to create a generalized version of your app that can be used as a plug-in for any software that offers comment xml in CAIF.
The FTP with Fontend version you have is awesome for people with haloscan, but I’d be more inclined to create a server side solution (though I am in the minority here surely).
March 24th, 2005 at 6:25 pm
Check your email. I made all the emails bogus - but you should get the idea.