The New Utovsky Bolshevik Show

Tue, 10 Mar 2009

Automated Blog Posting With Pyblosxom

As some naysayers in #wuglug this (Sunday) evening suggested after three blog posts in a two hour span, I'm going to start posting to my blog once a day automatically, unless I really, really want to get around this. This should be posted Tuesday morning at 6am (famous last words).

I'm using PyBlosxom as my blogging engine, which is essentially based around dropping files into a directory. As such, it's almost trivial to write a script that will do the moving into place which can then be automated by cron. As it's only almost trivial, here's my script:

#!/bin/sh

set -e
set -u

FROMDIR=/home/daniel/pending-blogposts
TODIR=/home/daniel/test

next_post=`ls -t $FROMDIR | tail -n1`
if [ z != z$next_post ]; then
    echo $TODIR/$next_post
    if [ -e $TODIR/$next_post ]; then
        echo "Already a post with that name."
        exit 1
    else
        echo "Posting '$next_post'"
        mv $FROMDIR/$next_post $TODIR
        touch $TODIR/$next_post
    fi
fi

Just change FROMDIR and TODIR to match your needs, drop the resulting script somewhere on your server and add something like

  0 6    *   *   *   /home/daniel/bin/blog-post
to your crontab and you should be away.

Posted: Tue, 10 Mar 2009 12:21 | Comments: 2

Comments

Here is a list:

rad7 : 30% off domains
gda348s : 30% off domains
pf25 : 25% off if $75 or more

Godaddy hosting promo codes:
chn20 : 20% Off Hosting (1,2,3 yr accounts)
rush1 : 10% Off Monthly hosting accounts

Random ones:
rush2 : $5 off order of $30 or more
buckoff : $10 off if $40 or more
gda3315 : $15 off if $50 or more
rad5 : 10% off any order
ne75b : 20% off if $60 or more

Unique
radssl : $12.99 SSL ( 56% Off )
auction12 : 50% Off auction accounts

Used some of these for a while now. Print these out.
Posted by Eromehobneree at Thu Apr 8 16:48:45 2010

A complete godaddy coupons list:

UKTop10: 30% off domains
UKTop251 : 25% off if $90 or more
UKTop9 : 20% Off Orders over $50 dollars
UKTop8 : 10% off anything
UKTop20H1 : 20% Off Hosting
UKTopSSL :  $12.99 SSL Certificates

Used some of these for a while now. Print these out.
Posted by Exparapet at Fri Jun 25 15:56:51 2010

Name:


E-mail:


URL:


Comment: