From d0ce2c1f503cd484b0c2e8c991b15b61efbfab84 Mon Sep 17 00:00:00 2001 From: Tuomas Kulve Date: Tue, 2 Mar 2010 09:40:52 +0200 Subject: [PATCH] photos.pl: cleanup. --- scripts/photos.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/photos.pl b/scripts/photos.pl index eb0c446..b86057a 100644 --- a/scripts/photos.pl +++ b/scripts/photos.pl @@ -39,8 +39,8 @@ sub handle_photo { my $msg =""; my $exifmsg =""; - - # Add EXIF info to IRC message + + # Add EXIF info to IRC message if (!open(EXIF, "$cmd |")) { print "Failed to run exiftool: $!"; } else { @@ -120,10 +120,10 @@ sub timeouttest { # TODO: what about videos? Or other non-image files. if (-f "$filename") { my $now = time(); - my $date_string = stat($filename)->mtime; - my $diff = $now - $date_string; + my $date_str = stat($filename)->mtime; + my $diff = $now - $date_str; - # Try to ensure that the whole image is there instead of moving + # Try to ensure that the whole image is there instead of moving # a file that's still being copied. if ($diff > 60) { handle_photo($dir_in, $dir_public, $file); @@ -139,7 +139,7 @@ sub timeouttest { settings_add_str('photos', 'photos_dir_incoming', "$ENV{HOME}/photos_incoming"); # Edit this to be your public www-directory name -settings_add_str('photos', 'photos_dir_public', +settings_add_str('photos', 'photos_dir_public', '$ENV{HOME}/~public_html/'); # Edit this to match your IRC network name settings_add_str('photos', 'photos_notify_server_name', @@ -148,7 +148,7 @@ settings_add_str('photos', 'photos_notify_server_name', settings_add_str('photos', 'photos_notify_channel', '#CHANNEL_NAME_HERE'); # Edit this to match your www address -settings_add_str('photos', 'photos_url_prefix', +settings_add_str('photos', 'photos_url_prefix', "http://WWW.DOMAIN.COM/~$ENV{USER}/"); # Let's poll for new images every 30 secs -- 1.7.9.5