… | |
… | |
40 | # the following non-trivial FileNameCallback takes care |
40 | # the following non-trivial FileNameCallback takes care |
41 | # of some subject lines not detected properly by uulib: |
41 | # of some subject lines not detected properly by uulib: |
42 | SetFileNameCallback sub { |
42 | SetFileNameCallback sub { |
43 | return unless $_[1]; # skip "Re:"-plies et al. |
43 | return unless $_[1]; # skip "Re:"-plies et al. |
44 | local $_ = $_[0]; |
44 | local $_ = $_[0]; |
45 | |
|
|
46 | return $1 if /(\S+\s+IMG_\d+.jpg)/i; |
|
|
47 | |
45 | |
48 | # the following rules are rather effective on some newsgroups, |
46 | # the following rules are rather effective on some newsgroups, |
49 | # like alt.binaries.games.anime, where non-mime, uuencoded data |
47 | # like alt.binaries.games.anime, where non-mime, uuencoded data |
50 | # is very common |
48 | # is very common |
51 | |
49 | |
… | |
… | |
99 | } |
97 | } |
100 | print "\n"; |
98 | print "\n"; |
101 | } |
99 | } |
102 | |
100 | |
103 | print $uu->filename; |
101 | print $uu->filename; |
|
|
102 | |
|
|
103 | $uu->remove_temp; |
|
|
104 | |
104 | if (my $err = $uu->decode_temp) { |
105 | if (my $err = $uu->decode ()) { |
105 | print " ", strerror $err, "\n"; |
106 | print ", ", strerror $err, "\n"; |
106 | } else { |
107 | } else { |
107 | print " temporarily decoded to ", $uu->binfile; |
|
|
108 | $uu->remove_temp; |
|
|
109 | |
|
|
110 | if (my $err = $uu->decode ()) { |
|
|
111 | print ", ", strerror $err, "\n"; |
|
|
112 | } else { |
|
|
113 | print ", saved as uudst/", $uu->filename, "\n"; |
108 | print ", saved as uudst/", $uu->filename, "\n"; |
114 | } |
|
|
115 | } |
109 | } |
116 | } |
110 | } |
117 | |
111 | |
118 | print "cleanup...\n"; |
112 | print "cleanup...\n"; |
119 | |
113 | |
120 | CleanUp(); |
114 | CleanUp; |