Tags: pyBlag, blog, projects
If you can't already tell, I'm kind of enthused about how well this pyBlag project has turned out. I just spent a few minutes to finish implementing the tag search feature; you can now click on tags to see all posts that are tagged with them! What I find so exciting about pyBlag is how little time it has taken, and how many features I was able to just throw in. For example, you may have noticed that the welcome post is sticky. How did I accomplish this? Well each post has a number associated with it so that the posts get sorted properly. This rather uninteresting feature enabled the addition of two other features: sticky posts and hidden posts. Sticky posts have a huge value (the welcome post's value is 9001, if you were wondering,) and hidden posts have a negative value. These two features cost me no more than three lines of code. I've said it before and I'll say it again: I love Python.
I haven't decided how best to release the pyBlag source code yet, but there's one feature I want to add before I do release it. I want multiple pages of posts. This page is already getting kind of long, which is not only annoying, but it means your browser has to download more stuff, and that's never good. Besides, it has a really Web 1.0 "I'm too lazy to write multiple pages in pure HTML" feel to it. This isn't Web 1.0 or pure HTML; this is Web 2.0 with Python, HTML and CSS. The dilemma is whether to implement this in the storage (i.e. one XML file for current posts and one for older posts) or in the script. I don't like the multiple XML idea, because then something has to maintain the files, and that's just inelegant. But I also don't really want to have to parse every post just to find the recent ones. I may sort the posts file so we can only parse the first three posts or so and ignore the rest, but to do this in an elegant manner, I might need a script to manage the XML file and make sure it's all sorted properly.
One other note, if you know anything about computer science, you're probably now realizing that this XML file is going to get HUGE. I've already said that pyBlag is not Wordpress by any means. That isn't to say that I won't some day implement mySQL support, but if I do, it's going to be after finals, believe you me. Maybe I'll hack the crap out of pyBlag this summer; if the other features I want to implement go as quickly as the ones I've implemented so far, it should take about a week #exaggeration #insane #hashtagsinplacesthatarenotTwitter. Also, at the moment, I have no plans to implement comments. That's a whole other beast that I really don't feel like thinking about right now. It would probably mean implementing a data structure for posts instead of my current approach which is sucking the post data out of the XML file and throwing it directly out to the packets. Again, maybe this summer, but right now I don't even want to think about it.
Ok, back to real work.