Python Programming, news on the Voidspace Python Projects and all things techie.
Creating the comments system should be reasonably straightforward - most of the work is already done in the guestbook. Speaking of which - Mark Andrews has written something called smiley.py, which I will probably integrate into the guestbook (and comment system) in order to add emoticons.
And another thing.. I had two mentions in the Pythonware Daily URL yesterday. I've had about 4000 refferals from them this month - flippy neck. The editors must like me or something ??!?!? According to how much I earn from google adsense - I owe someone there about 2 beers !
Name, Rank, and Number
Another quick hack with the google api. A short piece of code I've named googlerank.
It uses the google api  to do a search using terms you provide. It looks for results in your domain name. This tells you how highly ranked your website is for particular search terms.
Because each search only returns 10 results, and you're limited to 1000 searches per license key, it looks to see if your domain is in the first 200 results. This is easily configurable of course.
It returns results like :
For the search term "cyberpunk" :Out of an estimated 298000 results.Your website came at position "154".With URL - "http://www.voidspace.org.uk/cyberpunk/index.shtml"For the search term "python cookies" :Out of an estimated 176000 results.Your website came at position "7".With URL - "http://www.voidspace.org.uk/python/recipebook.shtml"
Since adding the rel="nofollow" tag to links added in my guestbook, I've had much less spam.
Adding google ads to my website seems to be a success. Click through rate is around 1%, and I'm earning  about $1 per thousand impressions. This seems high to me - but at around half this, Voidspace will still cover it's costs.
Using CSS for layout hasn't been too successful though. I have a problem with IE that would be so simple to solve by using a table for layout. I'm very tempted to do it.
Don't forget to check out my latest PyZine article. It's free to view and about writing Python CGI applications. I have several more articles due to be published. I'm really enjoying writing for PyZine - I just hope people read the articles !
rest2web is coming on very nicely. Huge swathes of this website ought to be autogenerated soon (and converted over to the new style).
I've actually got a job to produce a website for someone. Possibly with a Python gallery application thrown in. This might give me access to a decent hosting account. You never know !
|||http://googlepy.sourceforge.net - a nice high level layer over the SOAP interface to google. You'll also need a google license key of course.|
|||Allegedly earning anyway.|
I Have a Cunning Plan
Want a Free Website ?
Finding a free web host without adverts is difficult. Finding a reliable one, so that you know your site will still be up in six months time, is next to impossible.
What if I told you that you could get a free website, hosted by an internationally renowned host - who isn't about to disappear or start charging ? Not only that but they offer unlimited bandwidth, free publicity tools, and a built in content management system ! Impossible ?
It's not only possible, but you've already heard of them - our friends www.blogger.com. They allow you to archive posts by subject and by date. By making clever use of the templates and archives, it's possible to use these as sections and subsections for a website. It also makes it very easy to post new articles ! To see what I mean have a look at fuchsiashockz.blogspot.com .
Anyone Really Want a Free Website ?
I do actually have a bit of spare bandwidth and hard drive space here at Voidspace. I'd be interested in hosting a personal site for anyone who wanted to do a Python related blog, using firedrop as a client, and also experiment with Python CGI. These are both areas in which I'm keen to build community.
Whilst We're On the Subject
rest2web built a whole section of my website yesterday, including automatically creating navigation trails, and building the index page. There's still too much of the 'display logic' in the templates , but most of it's working.
It reads a small index file from the start of each page of content, and uses that to build the page and the entry in the index page.
All I have to do now is convert my content from horrible HTML 4 to reST !!
|||My partner in Cyberpunk crime.|
|||i.e. lots more polishing to do.|
Served by a Snake
It's a real testimony to the quality of the Python standard library, that a new server  can be hacked together in less than an hour and less than a hundred lines of code.
I'm still working on rest2web, which will build my website for me from reST content, and templates. I use SSI  with my website. This means just viewing them doesn't work, they have to be delivered by a server to look right. This in turn meant I either needed to generate all my test pages straight into the server directory, or use something like SimpleHTTPServer to serve them from wherever I would rather generate them.
Unfortunately SimpleHTTPServer doesn't do SSI processing. With a little bit of hacking, CGIHTTPServerWithSSI was born. Hurrah. It's actually based on CGIHTTPServer and it only supports two SSI instructions so far , but I'm already finding it dead handy. Simply drop it in a directory and it will serve webpages, with directory as the root directory. Any pages that end in .shtml or .shtm, it does SSI processing on.
Just in case anyone else might find it useful (or just wants to look) - it's up on the recipebook page.
I like it because I feel like I'm starting to get to grips with making good use of regular expressions. I've got a lot to learn, but at least I don't avoid them at all costs now.
rest2web is coming along nicely. It will now autogenerate pages and the breadcrumbs navigation trails. Just the index pages to do, and the first working version will be ready.
|||Even if it is a simple one.|
|||Server Side Includes - processing instructions for the server, in the html.|
|||include and flastmod. If anyone wanted more instructions implementing, it would be very easy to extend - and I'd be happy to do it.|
This work is licensed under a Creative Commons Attribution-Share Alike 2.0 License.