ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/example-decoder
(Generate patch)

Comparing Convert-UUlib/example-decoder (file contents):
Revision 1.9 by root, Tue Dec 28 14:09:19 2004 UTC vs.
Revision 1.11 by root, Mon May 2 19:58:40 2005 UTC

16 $_[0]=straction($action); 16 $_[0]=straction($action);
17 print "busy_callback(", (join ",",@_), ")\n"; 17 print "busy_callback(", (join ",",@_), ")\n";
18 0; 18 0;
19} 19}
20 20
21SetOption OPT_RBUF, 128*1024;
22SetOption OPT_WBUF, 1024*1024;
23SetOption OPT_IGNMODE, 1;
21SetOption OPT_IGNMODE, 1; 24SetOption OPT_IGNMODE, 1;
22SetOption OPT_VERBOSE, 1; 25SetOption OPT_VERBOSE, 1;
23 26
24# show the three ways you can set callback functions. I normally 27# show the three ways you can set callback functions. I normally
25# prefer the one with the sub inplace. 28# prefer the one with the sub inplace.
40 43
41 # the following rules are rather effective on some newsgroups, 44 # the following rules are rather effective on some newsgroups,
42 # like alt.binaries.games.anime, where non-mime, uuencoded data 45 # like alt.binaries.games.anime, where non-mime, uuencoded data
43 # is very common 46 # is very common
44 47
45 return $1 if /([a-z0-9_]{3,}\.[a-z]{3,4}(?:.\d+))/i;
46
47 # if we find some *.rar, take it as the filename 48 # if we find some *.rar, take it as the filename
48 return $1 if /(\S{3,}\.(?:[rstuvwxyz]\d\d|rar))\s/i; 49 return $1 if /(\S{3,}\.(?:[rstuvwxyz]\d\d|rar))\s/i;
49 50
50 # one common subject format 51 # one common subject format
51 return $1 if /- "(.{2,}?\..+?)" (?:yenc )?\(\d+\/\d+\)/i; 52 return $1 if /- "(.{2,}?\..+?)" (?:yenc )?\(\d+\/\d+\)/i;
54 return $1 if /- "?(\S{3,}\.\S+?)"? (?:yenc )?\(\d+\/\d+\)/i; 55 return $1 if /- "?(\S{3,}\.\S+?)"? (?:yenc )?\(\d+\/\d+\)/i;
55 56
56 # - (xxx) No. 1 sayuri81.jpg 756565 bytes 57 # - (xxx) No. 1 sayuri81.jpg 756565 bytes
57 # - (20 files) No.17 Roseanne.jpg [2/2] 58 # - (20 files) No.17 Roseanne.jpg [2/2]
58 return $1 if /No\.[ 0-9]+ (\S+\....) (?:\d+ bytes )?\[/; 59 return $1 if /No\.[ 0-9]+ (\S+\....) (?:\d+ bytes )?\[/;
60
61 # try to detetc some common forms of filenames
62 return $1 if /([a-z0-9_\-+.]{3,}\.[a-z]{3,4}(?:.\d+))/i;
59 63
60 # otherwise just pass what we have 64 # otherwise just pass what we have
61 return (); 65 return ();
62}; 66};
63 67

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines