Re: Problem with Batch mode and ubhcatalog

Guillaume Filion <[email protected]> Sat, 28 Jun 2003 14:17:28 -0400
Newsgroups gmane.network.ubh
Message-ID <[email protected]>
At 16:09 -0600 01/04/03, Shalon Wood wrote:
>ubhcatalog does not output subject lines that work for batch mode; the
>string which is compared against the line is not the same as the line
>output from ubhcatalog.
>
>For example, a ubhcatalog line "blah.mpg (01/31)" gets compared to
>"blah.mpeg" when ubh -b is run.

Here's something that solved the problem for me. The idea is not to 
be smart about figuring out the fileanme from the subject when 
running in batch mode.

RCS file: /cvsroot/ubh/stable3/ubh,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 ubh
1758c1758
<             if (!$opt{'g'}) {
---
>              if (!$opt{'g'} and !$opt{'b'}) {
1870,1878c1870,1881
<             if (defined $subject && $subject =~ /(.+\.($multi_ext))/) {
<                 $title = $1;
<             }
<             else {
<                 # Has an extension we don't want.
<                 if ($opt{'z'}) {
<                     $dbh->do(
<                              "UPDATE assemble SET status = 'EXCLUDE' ".
<                              "WHERE assemble_id = $assemble_id");
---
>              if (!$opt{'b'}) {
>                  if (defined $subject && $subject =~ /(.+\.($multi_ext))/) {
>                      $title = $1;
>                  }
>                  else {
>                      # Has an extension we don't want.
>                      if ($opt{'z'}) {
>                          $dbh->do(
>                                   "UPDATE assemble SET status = 'EXCLUDE' ".
>                                   "WHERE assemble_id = $assemble_id");
>                      }
>                      next;
1880d1882
<                 next;

Damn, the diff is quite ugly... the actual change are:
on line 1758, change
             if (!$opt{'g'}) {
to
             if (!$opt{'g'} and !$opt{'b'}) {

on line 1870, add a
             if (!$opt{'b'}) {
and close the brace with a } on line 1883.

Cheers,
GFK's
-- 
Guillaume Filion
Logidac Tech., Beaumont, Québec, Canada - http://logidac.com/
PGP Key and more: http://guillaume.filion.org/

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Looking for the latest Free IT White Papers?
Visit SearchNetworking.com to access over 500 white papers.
Get instant access at SearchNetworking.com Today
http://us.click.yahoo.com/99UKOC/OLNGAA/fzPGAA/IHFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/