Archive for December 1st, 2005

Published by Niels on 01 Dec 2005

Upgrading (just for fun)

I noticed that there was an update to NanoBlogger. So as my last act for today I have upgraded the site to NanoBlogger 3.3 RC3 from RC1. Completely missed about the RC2 version that had a critical bug fix. Oops. I am glad that it didn’t bite me.

Published by Niels on 01 Dec 2005

That wasn’t what I expected at all

Okay, I admit. I have a bit of a weak spot for all movies that Johnny Depp plays in. It is not that they are always great movies. Because they are not. But he always seems to make something special of the part he plays.

So last weekend we rented Charlie and the Chocolate Factory and I enjoyed the movie so much, especially the character of Willy Wonka, that I stopped comparing this version
to the one with Gene Wilder within a couple of minutes after Depp made his first entrance as Willy Wonka (okay, so I like Gene Wilder too, sue me!).

So if you have not seen it yet, go see it! I can really promise you that you will smile at least once or twice, ‘kay!

Published by Niels on 01 Dec 2005

What to do

So I made this script to help me maintain my site. But it only helps me when I upload the site to the remote host. Suppose I want to work on the site from different machines. How can I then keep everything synchronized? The simple answer would be: assume that the remote site is the original and find out what the changes are compared
to the local copy of the site. The workflow would then become:

  1. Retrieve the MD5 checksums and directory list from the remote server a using sftp.
  2. Compare these with the current files and directories.
  3. Get the files that need to be added using sftp.
  4. Delete the files that are no longer needed.
  5. Delete and create local directories as needed.

My problem with this approach is that I need two separate sftp sessions, which means providing the system with at least my password twice. Since I want to
be as efficient as possible (read: I am Lazy :) ) I would rather give it once.

As I currently see it I have the following options:

  1. Find some clever bash-trickery to make sure that I can keep one sftp-session open. But so far that does not seem promising.
  2. Use expect. Very good solution, but the urge to make the program rely on Bash and sftp is very big.
  3. Use something like Perl and Net::SSH. See 2.
  4. Learn more about sftp and ssh2 to see if there is a possibility to keep session information for at least long enough to do all the work.

Decisions, decisions. If anybody out there has some good suggestions, feel free to contact me….