July 24, 2008

Playlog Displayer

Written by theY4Kman at 5:23 am under Python and Programming

I never did show you the full source code for the playlog page, so here you go! One day I’ll comment it for you :D
(more…)

July 23, 2008

Ubuntu and more!

Written by theY4Kman at 6:30 am under Ubuntu, Linux, Python and Programming

Recently, I had to compile and package my SourceMod extension, Viper, on Linux. I’ve had Ubuntu on my other hard drive since the first day I used it, so I just booted into it. I never really appreciated Ubuntu, mostly because my stays in it were short. I wanted my games, and my games were on Windows, kicking it on Steam, running natively with great FPS (if you didn’t catch that, I’m saying I get bad FPS under wine). Plus, it takes six hours to boot Vista, so if I switched over to Ubuntu for a day, it meant I’d have to wait for Vista to load up later.

For about 6-8 hours, I worked on Viper. I was having the same trouble as I was on Windows with it: getting my Python library to load. After 7 hours and 58 minutes of searching Google for some answers or documentation, I tried a few things to get it working. Failed miserably. At least it compiles :)

When the extension wouldn’t load, I just slacked off. I downloaded Shrek and watched it. After that, I was aching for some music. Google and the Ubuntu forums being my advisor, I picked up Amarok. It’s a great player, but something was terribly wrong with it: it was slow as hell. Opening up a context menu took 5-10 seconds. I looked around Amarok’s menus and settings, and I found the Script Manager. A music player with a scripting interface? That’s awesome!

That reminded me XChat (an IRC client; my favorite on Linux, but the Windows version is horrible) had plugins, too. Google found me the documentation for xchat-python (http://labix.org/xchat-python), and I set forth to make a Steam ID to Community ID converter. Good fellow CShadowRun had created a similar script for mIRC, but it was lacking something I really wanted: the ability to find user names, too. With his script, you could only exchange “STEAM_0:1:337” or “http://steamcommunity.com/profiles/762827591735028491” with each other. It was great for what it did, but a lot of the time, one only knows a person’s user ID.

Luckily, one can find a person’s user ID through this URL: http://steamcommunity.com/id/USER/. Bada-bing, bada-boom, I had a working script. With some more tweaks, it was almost perfect, save that if I use the command (”!steam user”), it replies with the answer before it sends my original message, so I get an output like this:
<theY4Kman> theY4Kman -> STEAM_0:1:10553940
<theY4Kman> !steam theY4Kman

Next, I wanted to see what scripts there were for Amarok. With their snazzy script manager, I found a neat script called “Playlog” that uploaded song information and play times to a MySQL database. Wow! Unfortunately, it was written in Perl, which I have no experience in, but my general programming experience allowed me to edit it quite easily (without errors, too. It was quite the phenomenon.) I setup the MySQL database and got the script running. All that I needed was a web page to display it all.

I love Python (AND YOU WILL USE IT), so I picked up mod_python (which I hear is inferior to mod_wsgi) for the Apache2 webserver. A few tests and bizarre errors later, I had it all working. With my handy KDevelop, I started working on the page to display it all. An hour or so later, the page displayed the time a song was played, its title, artist (if one was set), album (if one was set), and cover art. The cover art was a bitch to write, but it worked well enough to display everything correctly. Plus, I stole the default cover art from Amarok :P

Admiring my work, I noticed that I’d been on Ubuntu for days now, and I hadn’t played one single game. I never thought that was possible. There was so much to do on Linux that I hadn’t even cared to play a game.

July 11, 2008

Vegas Videos

Written by theY4Kman at 3:10 am under Vegas and Video

I picked up Sony Vegas a while back. Vegas is a video editing software, and it’s damn good. Video editing is a skill I’d like to have, as it can be very useful for tech demos, frag videos, and just some screwing around, like so:


Saving Private Ryan: Where Is My Mind?


Saving Private Ryan: Where Is My Mind? (Take 2)

These videos are a product of my boredom and struggle quest for knowledge. I learned some valuable stuff in making them; one of those things being that the Pixies kick ass :)

Powered by WordPress. Driven by caffeine.