About Archive Tags RSS Feed

 

Entries tagged comments

I have finally found my place in everything

20 May 2007 21:50

Sorry to everybody on Planet Debian who have been forced to see a lot of older posts of mine.

I switched from Typo to Mephisto - another Ruby on Rails blog.

The reason? Typo seems to suck memory like a .. big sucky thing.

Posting a new comment would take the system-load on my VM up to 2, which is not acceptible. I'm prepared to suffer a little with my decision to never install, host, or admin a PHP-based application, but not that much.

Mephisto seems nice, although the importing of old posts was a little fraught with peril. Thankfully the system, when used with Mongrel and an Apache proxy seems fast, stable and not too memory intensive.

The only thing that didn't happen properly was the closing of comments on all the older entries. Comments on new entries appeared to be correct in the sense that they should be automatically disabled after 7 days.

Here's how I fixed that:

skx@skx:~$ script/console production
1
2
3
Article.find(:all).each do |a|
 a.update_attribute :comment_age, -1
end

| No comments

 

Children Of The Dammed

13 December 2007 21:50

After a lot of hacking I've now got chronicle displaying comments upon entries.

Since my blog is compiled on my home desktop machine and comment submission happens upon a remote machine the process involves a bit of a hack:

Publish Blog

The blog is compiled and uploaded to the live location using rsync.

Wait For Comments

Once the blog is live there are embedded forms which may be used to receive comments.

The CGI script which is the target of the forms will then write each comment out to a text file, located outside the HTTP-root.

Sync Them

Prior to rebuilding the blog the next time I update I rsync the comments directory to my local machine - such that the comments posted are included in the output

This my local tree looks something like this:

~/blog/
|-- comments/
|-- data/
|-- output/
|-- Makefile
`-- chroniclerc

Here I have a Makefile to automate the import of the comments from the live site to the local comments/ directory, rebuild, and finally upload.

All this means that I can rebuild a blog created by a combination of plain text post files and plain text comment files.

It also means that there is a fair lag between comment submission and publication - though I guess there is nothing stopping me from auto-rebuilding and syncing every hour or two via cron...

I'll make a new release with this comment.cgi script and changes once the package hits Debian unstable...

| 4 comments

 

I saw momma kissing santa claus

24 December 2007 21:50

Well I've been in Devon for the past week, and will remain here for another week. During that time I've averaged about ten minutes of online time a day!

So far things are going well, but it will be wierd spending time with another family over Christmas.

Still I've been vaguely productive. I've released a new version of chronicle - which has the CGI support for leaving comments upon my entries.

(TODO: Reinstate some previous comments for Martin Krafft)

One thing I'd not anticipated was the amount of spam I'd start recieving. The peak so far was 40+ comments a day, all with random URLs. I deleted them manually for the first day - but now I've written a shell script or two to classify comments via the spamfilter I use for handling email.

I'm not 100% sure I should have done that. I suspect that over time I will find better results if I actually have a distinct "blog spam" and "blog ham" corpus - rather than risk confusion over "email" and "blog" texts to classify. Still I shall wait and see.

The only thing that I think I want to do now is add a bit more fine control over the comment process, so the choice is not just between comments being globally on, or globally off. A nice middle-ground where I could say "Comments enabled for entries posted within the past two weeks or so".

Anyway thats my quota for today. Now I have to walk the family dog ..

| No comments