photos.pl: cleanup.
[sharing-cli] / scripts / photos.pl
index eb0c446..b86057a 100644 (file)
@@ -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