Commits
Kurt Hindenburg authored e60b7b13d35
1 - | --- imageindex 2007-04-04 15:55:51.000000000 -0400 |
2 - | +++ imageindex 2016-04-01 22:10:01.000000000 -0400 |
3 - | |
4 - | use File::Copy; |
5 - | use English; |
6 - | use Carp; |
7 - | -require 'flush.pl'; |
8 - | +require IO::Handle; |
9 - | |
10 - | # to shut up -w |
11 - | use vars qw($opt_recurse); |
12 - | |
13 - | |
14 - | # Extract info |
15 - | print "Extracting image info"; |
16 - | -flush (STDOUT); |
17 - | +STDOUT->flush(); |
18 - | |
19 - | foreach my $file (@files) { |
20 - | |
21 - | |
22 - | # at the user so that the video regexp might be adjusted |
23 - | if ($retval == -1) { |
24 - | print "\nwarning: $pathname identified by extension as video file but mplayer doesn't recognize it\n"; |
25 - | - flush (STDOUT); |
26 - | + STDOUT->flush(); |
27 - | } |
28 - | } else { |
29 - | &extract_image_info ($filename); |
30 - | |
31 - | my ($arate, $anch, $length, $is_video); |
32 - | |
33 - | print "."; |
34 - | - flush (STDOUT); |
35 - | + STDOUT->flush(); |
36 - | |
37 - | if ($mplayer_prog eq '' || ($do_video_files == 0)) { |
38 - | if (($do_video_files != 0) && $mplayer_prog eq '') { |
39 - | print "\nwarning: Trying to process video files but cannot find mplayer in \$path!\n"; |
40 - | - flush (STDOUT); |
41 - | + STDOUT->flush(); |
42 - | } |
43 - | print "\nSkipping $pathname"; |
44 - | - flush (STDOUT); |
45 - | + STDOUT->flush(); |
46 - | return 0; |
47 - | } else { |
48 - | $object_counter++; |
49 - | |
50 - | my $i; |
51 - | |
52 - | print "."; |
53 - | - flush (STDOUT); |
54 - | + STDOUT->flush(); |
55 - | |
56 - | $retval = $image->Read($pathname); |
57 - | |
58 - | |
59 - | if ($retval ne "") { |
60 - | print "\nSkipping $pathname"; |
61 - | - flush (STDOUT); |
62 - | + STDOUT->flush(); |
63 - | return; |
64 - | } else { |
65 - | $object_counter++; |
66 - | |
67 - | if (defined($lastdate)) { |
68 - | print "<META NAME=\"$enddatemetatag\" CONTENT=\"$lastdate\">\n"; |
69 - | } |
70 - | - if (!defined ($opt_includeall) && defined (@opt_exclude) && scalar (@opt_exclude)) { |
71 - | + if (!defined ($opt_includeall) && (@opt_exclude) && scalar (@opt_exclude)) { |
72 - | my $tmp = join (',', @opt_exclude); |
73 - | my $etmp; |
74 - | |
75 - | |
76 - | } |
77 - | printf ("<META NAME=\"$numimagesmetatag\" CONTENT=\"%d\">\n", $image_counter); |
78 - | |
79 - | - if (defined (@opt_skipmont) && scalar (@opt_skipmont)) { |
80 - | + if ((@opt_skipmont) && scalar (@opt_skipmont)) { |
81 - | my $tmp = join (',', @opt_skipmont); |
82 - | printf ("<META NAME=\"$skipmetatag\" CONTENT=\"%s\">\n", $tmp); |
83 - | } |
84 - | |
85 - | # then process. Check to see if any of the -skipmont options were given as |
86 - | # strings of filenames concatenated with ',' characters. If so, support it. |
87 - | # |
88 - | - if (defined (@opt_skipmont)) { |
89 - | + if ((@opt_skipmont)) { |
90 - | foreach (@opt_skipmont) { |
91 - | (@tokens) = split (/,/, $_); |
92 - | foreach $token (@tokens) { |
93 - | |
94 - | # then process. Check to see if any of the -exclude options were given as |
95 - | # strings of filenames concatenated with ',' characters. If so, support it. |
96 - | # |
97 - | - if (defined (@opt_exclude)) { |
98 - | + if ((@opt_exclude)) { |
99 - | # -includeall takes priority over -exclude on the commandline if they are |
100 - | # used together (wierd, but ...) |
101 - | # |