projects
/
sharing-cli
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3443303
)
photos.pl: cleanup.
author
Tuomas Kulve
<tuomas@kulve.fi>
Tue, 2 Mar 2010 07:40:52 +0000
(09:40 +0200)
committer
Tuomas Kulve
<tuomas@kulve.fi>
Tue, 2 Mar 2010 07:40:52 +0000
(09:40 +0200)
scripts/photos.pl
patch
|
blob
|
history
diff --git
a/scripts/photos.pl
b/scripts/photos.pl
index
eb0c446
..
b86057a
100644
(file)
--- a/
scripts/photos.pl
+++ b/
scripts/photos.pl
@@
-39,8
+39,8
@@
sub handle_photo {
my $msg ="";
my $exifmsg ="";
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 {
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();
# 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);
# 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_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',
'$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_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
"http://WWW.DOMAIN.COM/~$ENV{USER}/");
# Let's poll for new images every 30 secs