06.07.09

Using Python to access the RolePlayGateway API

Posted in Technical at 8:54 pm by Olrik

The past week or so, I have been playing around with the APIs of a site called RolePlayGateway through Python. This blog post will be all about those APIs and how to work with it using Python. In this blog post I am going to assume you have some coding knowledge, Python is not hard to understand so anyone with a decent coding background would be able to read the following example. Keep in mind I am not a genius and some of this code could probably have written in a better way. Feel free to show me how in the comments section!

The Experience

My experience with the API is great. I am working directly with the owner of the site, Eric Martindale, who is actively maintaining RolePlayGateway. Actually accessing and manipulating XML in python was easier then I thought it would be and bringing it into practice was a lot of fun. With a bit of creativity you can do a whole lot with the API of RolePlayGateway. In this blog post though, I will only be covering how to access the API through Python and working in the Python Interpreter.

The APIs

Of course, If you want to work with the APIs, you will have to know where to look. In my case (as stated above) I worked directly with Eric who told me about the APIs. The following APIs are available on the site:

Member Information:
/api/member/<name>
/api/member/<id>

Character Information:
/api/character/<id>

Through these APIs you can retrieve information and use that in your Python application.

Example Code

To retrieve the XML from the site I used a module called “urllib”. This module has to do with urls, but the only function we’ll be using is urllib.urlopen(url). Then we’ll need something to parse the XML, this is done using the module “xml.dom.minidom”. Below is a link to the code of the full example I will be using.

Full Example Code

If I would run this through the Python Interpreter I would get the following output.

As you can see in the example , Unicode / ASCII is a small issue you will have to keep in account. I found / edited a ‘translations’ module that I use to edit names from Unicode to ASCII as the URL will require ASCII but the actual site will show Unicode.

Conclusion

I really like the APIs that Eric showed me, and he keeps adding more / refining it actively. I personally am still working on an application with these APIs that might be considered useful by the community. I hope this article was of use to some of you, others might have just enjoyed the read and some might have even thought “Oookay?”, But I tell you, these APIs are great!

Regards,
Olrik

05.04.09

EtherPad, A ‘live’ notebook.

Posted in Technical at 9:06 pm by Olrik

It’s been a while since I last wrote about something Technical, so it’s about time that I wrote another article more aimed towards the technical side of things. As many of you will know, I am developing a tool. At times I have wanted to show some people bits of my code without them seeing the whole thing. In those cases, I would have to copy the bit of code, save it to a text file and send the text file to them. If they would then edit certain bits I wasn’t sure what was edited, it required lots of effort. Now the other day, I got invited to something I found really handy. It’s called “EtherPad”.

EtherPad is a ‘live’ (online) notebook (or notepad) that offers real-time collaboration. Multiple people can work on the same text simultaneously which it really attractive to me as a developer when I want to show other people bits of code without revealing all of my source code. The best part of it all. It’s FREE! You can find this amazing service at http://etherpad.com/ .

Regards,
Olrik

03.19.09

A PowerPoint to Flash Test

Posted in Technical at 5:17 pm by Olrik

This post will be dedicated towards a test that I want to do regarding a PowerPoint to Flash converter. This post will contain a simple flash video that I converted using a PowerPoint to Flash converting program. Lets see what it turns out to be.

Here is a link to the flash movie.

12.19.08

Vista Repair Utilities

Posted in Technical at 11:03 am by Olrik

I thought I’d write up another technical post on my blog. Today I want to write about the repair utilities built into Windows Vista. A lot of people already know about the fact that Microsoft had built a few repair utilities into Windows XP. The “Windows Repair” and “Recovery Console” are tools that are frequently used by technicians to get machines running again.

Now Microsoft did a great job with the recovery tools they built into the Vista disks. A few weeks ago I had a crashing hard drive and had to replace it with another one. After copying my data across my Master Boot Record was broken. In Windows XP a Technician would have to go into the Recovery Console and use the ‘fixmbr’ command usually paired with the ‘fixboot’ command.

Now I never worked with the Vista repair utilities until then. I was looking around for the Recovery Console, or something similar, and found a little graphical menu that I could do all my work with. There was one simple selection “Fix Boot” which fixed the MBR and made me able to boot into Windows Vista again without any extra fuss. I was really pleased with the way it worked and I am sure that it would make a technician’s life a lot easier.

I will probably be writing a few “How To” guides in the future and this will probably be one of the parts I will be covering. It is defenitily an advance in making the complicated commands easier for the ‘average joe’.

Regards,
Olrik

12.03.08

Registry Cleaners… Why do people use them?

Posted in Rant, Technical at 1:41 pm by Olrik

A question that has been tormenting a lot of technicians and malware removal experts. I guess it’s the constant adds /everywhere/ that scream: “Click here to fix all your problems!”. Most of the times, people don’t even know what they are fixing, or why. Sometimes, people know they are ‘cleaning’ (note the quotes) the registry, but don’t know what consequences it can have.

Registry Cleaners, are bad!

I just can’t say it enough. There are so many people that run a registry cleaner at the first sight of an error. If you’re experiencing an error, either trace down the problem and fix it, or ask help on a tech site. (A few links to Tech Sites are at the bottom of this blog) Running a Registry Cleaner isn’t the ‘cure to all’ and will most likely not fix your problem.

Miekiemoes (A valued expert) wrote an interesting article on her blog here.
Please take the time to read through it and solve your problems the correct way, and don’t use Registry Cleaners.

Regards,
Olrik

12.02.08

Blue Screen Madness!

Posted in Technical at 3:51 am by Olrik

Right, the first technical post on my blog. I hope there will be more in the future.

I want to talk about blue screens, or ‘Blue Screen of Death’ as most techies say. I think most of the people reading this would know what I am talking about, One of the really pretty blue screens with black text and it’s all jibba jabba to you. Well, today I shall tell you that to a lot of the techies this ‘jibba jabba’ is actually useful. I don’t know how many times I have ran into some people that ask me for help with their computer and didn’t write down the information on the blue screen. (And this not only counts for blue screens, this counts for ANY error they get).

To us the stop codes that blue screens show (the part that says: STOP: 0×0000000A (0×009F1465, 0×00000002, 0×00000001, 0×81CADC56)) are the most usefull information a technician could get when you are having a blue screen of death. Aside from the Stop Code that you get, there is a possibility that the screen will show something like “IRQL_NOT_LESS_OR_EQUAL” (the same format, uppercase letters with underscores in between words). If you can see this on the Blue Screen, please write this down too. The more information we get the better. And finally, on the same blue screen, it might show a filename. This is usually the file causing the issue, or the file has to do with it. If you can find a filename in your blue screen, please write it down.

As a final note, I want to ask everybody that reads this to PLEASE (if I could make this flashing red with big exclemation marks, I would) write down error codes if you get them. It makes our life so much easier!

Regards,
Olrik