Editorial Echoes #2 Stupid Belconnen Architects

No Editorial Echoes Today

March 15th, 2006 at 06:59am

I have to inform you that there will be no Editorial Echoes today, for the same reason that there has been no new posts on this blog over the last 24 hours…hayfever, and a rather nasty dose of it too!

There was really no point in me trying to record a podcast with a blocked nose and a sore throat, and as I spent most of the day asleep anyway, I didn’t have much to talk about. I am feeling better now, and will have to travel out to Bruce today to hand in an assignment which was due yesterday, the same one I nearly handed in last week (and to the person who emailed me with a non-working email address, no it wasn’t Requirements Analysis, it was Client Support).

Anyway, I will take this opportunity to explain the automation which is enabling you to receive Editorial Echoes each morning at 6am, even though I may still be asleep.

The night before the episode goes online I do a quick bit of editing (noise reduction and adding in the music) before saving the MP3 and uploading it. I also write the update for the RSS feed, and the sidebar listing, these also get uploaded.

Before I go any further, I should explain a thing or two about the directory structure of this website. This website is hosted on Bluehost‘s “Box 35” along with many other websites. On that server, I have a directory located at /home/samuelgo/ this is my “home directory” and is effectively my root directory (aka my / directory)thanks to the use of a “chroot jail”. (It is worthwhile pointing out that the server is Linux based, and you can type those terms into Google for more info).

Everything you see on this website is located in my /public_html/ directory, which is effectively the / directory of the website (aka the https://samuelgordonstewart.com/). (Technically most of this site is generated dynamically by pulling stuff out of a database, and most of the URLs don’t physically exist but are understood by the server with the help of some modrewrite rules in the .htaccess file.)

OK, if I were to upload these files straight into the Editorial Echoes directory (/public_html/wp-content/EditorialEchoes/) it would be possible for people to download them earlier than the release date, and would result in podcast software downloading it very early, so a bit of automation and trickyness is necessary.

Instead of uploading the files to the public Editorial Echoes directory, I upload them to a hidden Editorial Echoes directory outside of the /public_html/ directory, and effectively not accessable by the public. This directory is the /echoes/ directory.

As I said, that file isn’t publically accessable, so that doesn’t really solve anything as there’s no point having a podcast that people can’t download…that’s where the automation kicks in. I have a couple cron jobs (cron being the Linux task scheduling program) set up to automatically copy the various files to their public locations. These three files are

  1. The updated sidebar
  2. The updated RSS feed
  3. The MP3 file

The cron jobs look like this:

55 11 * * * mv /home/samuelgo/echoes/echo*.mp3 /home/samuelgo/public_html/wp-content/EditorialEchoes/

0 12 * * * cp /home/samuelgo/echoes/echoes.xml /home/samuelgo/public_html/wp-content/EditorialEchoes/echoes.xml

0 12 * * * cp /home/samuelgo/echoes/sidebar.php /home/samuelgo/public_html/wp-content/themes/blix/sidebar.php

Each cron job is one line, but the webpage forces line wrapping. The server is somewhere in the mountian timezone of the US, which is currently 18 hours behind Canberra. I will have to modify the times when the difference changes.

I should probably explain these cron jobs.

The first one says “at minute 55 of hour 11 of every day of every month on every day of the week, move /home/samuelgo/echoes/echo*.mp3 to /home/samuelgo/public_html/wp-content/EditorialEchoes/

The asterisk is very important there as the mp3 files will have different names each day, but will conform to the “echo(episode number).mp3” format. The move command is also important as it means I don’t have to delete the old mp3 files each night, and the command isn’t going to recopy old files. The time (which works out to 5:55am Canberra time) is very very important. The mp3 file must be available before anything else is online, otherwise podcast software will fail to download the new episode, which will result in them either giving up or constantly retrying (which would, with enough podcast clients, create a distributed denial of service due to the excessive number of concurrent connections), make WordPress provide incorrect information in the blog’s RSS feed about the mp3 file, and give people who manually download the file “404” errors until the file is online.

The second one says “at minute 0 of hour 12 of every day of every month on every day of the week, copy /home/samuelgo/echoes/echoes.xml to /home/samuelgo/public_html/wp-content/EditorialEchoes/echoes.xml

The only real differences here are the time (Midday server time, 6am Canberra time), the command (copy instead of move) and the filenames. I’ll let you use your imagination for the third one.

Also overnight, I write the post for the Editorial Echoes episode, which I schedule to appear at 6am. WordPress will ultimately make it appear slightly earlier or later, which again emphasises the need for the MP3 to be online before 6am.

The only thing which cannot be automated is the Editorial Echoes website, which I manually update when I get around to it. It is normal for it to be a bit behind from time to time.

I hope that sheds some light on the automation which makes this all possible without me having to be up at 6am every morning.


Entry Filed under: Editorial Echoes

Print This Post Print This Post


  • 1. cunninglinguist  |  March 15th, 2006 at 10:31 am

    No wonder you’ve no time for normal romance.

    You are very busy indeed.

  • 2. Chuck A. Spear  |  March 15th, 2006 at 12:42 pm

    Well I hope you feel better promptly Samuel. I need a daily dose of Editorial Echoes.

  • 3. wonko the sane  |  March 15th, 2006 at 7:11 pm

    I think it’s helpful for your readers to gain a better understanding of the finer points of website maintenance just in case they get stuck in a lift with a computer programmer and run out of topics for light conversation.

    I think that rather than learning another language like French, Italian or Japanese, one should learn to converse entirely in html. Maybe in 100 years time it will be considered one of the ‘romantic’ languages.

  • 4. wonko the sane  |  March 15th, 2006 at 7:12 pm

    And yes, like Chuck, I’m relying on my daily does of Sam’s EE to get me through the day.

  • 5. demented_cupcake  |  March 15th, 2006 at 11:21 pm

    actually, that stuff is kind of handy. Then again, my OWN linux box, I haven’t tried doing cron jobs yet.

    I actually got a cheap second hand Apple Imac at the weekend…and I’m in LOVE.

    Actually, I once had a girlfriend who said I was more interested in the computers than her.

    Ah, Apple Imac with Apple OS X, 10.3…makes Windows look the non-event it really is.

    Apple AND LINUX are way more fun and do the computing one truly wants.

    By the way, Sam, Kooky and Flakey are crying. Be mean to them a day more…it makes you more attractive to them.

  • 6. demented_cupcake  |  March 15th, 2006 at 11:26 pm

    The part I really like most about Linux myself is where you do the startx command to bring up a SECOND or THIRD login to desktop…and where you can switch screens.

    Ah, there’s much more fun in computers when you’ve got a decent OS.

  • 7. Chuck A. Spear  |  March 16th, 2006 at 12:15 am

    Well just wait until you update to OS X 10.4 Tiger Cupcake. You will want to make love to your iMac.

  • 8. Chuck A. Spear  |  March 16th, 2006 at 12:56 am

    Next time I am standing in a gondola working my oar in the Venetian canals, I will be expressing my affection to my love by saying

    ‘ 55 11 * * * mv /home/samuelgo/echoes/echo*.mp3 /home/samuelgo/public_html/wp-content/EditorialEchoes/

    0 12 * * * cp /home/samuelgo/echoes/echoes.xml /home/samuelgo/public_html/wp-content/EditorialEchoes/echoes.xml

    0 12 * * * cp /home/samuelgo/echoes/sidebar.php /home/samuelgo/public_html/wp-content/themes/blix/sidebar.php’

  • 9. demented_cupcake  |  March 16th, 2006 at 1:01 am

    it’s SO different and more pleasant an experience than that other OS from master bill.

  • 10. Chuck A. Spear  |  March 16th, 2006 at 1:24 am

    It is as easy as using a toaster or opening the fridge. No need to pull your hair out anymore. It does what you want it to do. Windows is sub-standard and a rip off.

  • 11. demented_cupcake  |  March 17th, 2006 at 1:52 am

    I’ll definately agree with you, Chuck.

    Since getting the three-year-old imac at the weekend, my ONLY problems have been the fact it’s second hand and needs a new backup battery.

    Software-wise…Apple OS X is a DREAM.

    And to think I masochistically played on Windows for SO long before getting one of these old imacs!!!!!!!!!

  • 12. Chuck A. Spear  |  March 17th, 2006 at 2:05 am

    I just updated to iLife 06. It’s a fantastic suite. Are you running 10.3 Panther or 10.4 Tiger for your OS X?

  • 13. demented_cupcake  |  March 19th, 2006 at 7:05 pm

    Running 10.3 panther on a three-to-four year-old imac egg shaped. 6 gig hard drive, 266 Mhz processor, 160mb memory G3.

  • 14. wonko the sane  |  March 20th, 2006 at 3:25 am

    Running three fried eggs on a sesame seed bun(TM).


March 2006

Most Recent Posts


Blix Theme by Sebastian Schmieg and modified for Samuel's Blog by Samuel Gordon-Stewart.
Printing CSS with the help of Martin Pot's guide to Web Page Printability With CSS.
Icons by Kevin Potts.
Powered by WordPress.
Log in