From: Johnjohn <jj...@us...> - 2004-05-23 07:28:57
|
Update of /cvsroot/ngetsuite/ngetsuite/ngetsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12298/ngetsuite Modified Files: articles.rb downloader.rb group.rb nfo.rb Log Message: misc minor fixes, better release recognition Index: articles.rb =================================================================== RCS file: /cvsroot/ngetsuite/ngetsuite/ngetsuite/articles.rb,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** articles.rb 5 Mar 2004 22:30:46 -0000 1.8 --- articles.rb 23 May 2004 07:28:48 -0000 1.9 *************** *** 50,53 **** --- 50,55 ---- elsif subject =~ /(\d{1,3}) *of *(\d{1,3})/ return $1.to_i, $2.to_i, $2.length + elsif subject =~ /(\d{1,3}) *sur *(\d{1,3})/ + return $1.to_i, $2.to_i, $2.length end end *************** *** 133,143 **** end # look for an existing release which could accept this article # (same poster, nbexpected, and file not already seen) if rls = @@rls[cat] ! if (rls.poster==art._from) and (rls._nbexpected==total)#and ((rls.lastnb<cur) or (rls.lastnb==1 and cur==1)) ! if rls._rlsmap[cur-1] == '#' #NgetSuite::Utils.debug "#{cat}: part #{cur} already there {#{art._subject}}" - end # another art for this release rls.pushart(art,cur) --- 135,146 ---- end + # index numbers found + # look for an existing release which could accept this article # (same poster, nbexpected, and file not already seen) + # or file n° 1/xx as all others if rls = @@rls[cat] ! if (rls.poster==art._from) and (rls._nbexpected==total) and ((rls._rlsmap[cur-1].chr != '#') or (cur == 1 and rls._rlsmap =~ /^#_*$/)) #NgetSuite::Utils.debug "#{cat}: part #{cur} already there {#{art._subject}}" # another art for this release rls.pushart(art,cur) Index: nfo.rb =================================================================== RCS file: /cvsroot/ngetsuite/ngetsuite/ngetsuite/nfo.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** nfo.rb 20 Feb 2004 16:44:39 -0000 1.5 --- nfo.rb 23 May 2004 07:28:48 -0000 1.6 *************** *** 14,18 **** if (groupid != '') ! name = Group.getindex(groupid) req += " and nfos.groupindex='#{groupindex}'" end --- 14,18 ---- if (groupid != '') ! groupindex = Group.getindex(groupid) req += " and nfos.groupindex='#{groupindex}'" end Index: downloader.rb =================================================================== RCS file: /cvsroot/ngetsuite/ngetsuite/ngetsuite/downloader.rb,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** downloader.rb 21 May 2004 09:20:44 -0000 1.30 --- downloader.rb 23 May 2004 07:28:48 -0000 1.31 *************** *** 102,113 **** ldebug "#{green 'Already have'} '#{$1}'" - # What is autopar ? - when /^autopar: (.*) seems like a (par2?) \((.*)\)/ - subject, ft, base = $1, $2, $3 - # ldebug "#{blue 'autopar'}: found a #{ft} file: " + blue(base.length > 4 ? base : subject) - - when /^autopar: .* matches local (par2?)set \((.*)\)$/ - # ldebug "#{blue 'autopar'}: got a #{$1}, set #{blue $2}" - when /^decoded ok/ ldebug "#{green 'Decoded'} #{@curfile._filename}" --- 102,105 ---- *************** *** 160,166 **** --- 152,161 ---- when />> \d\d\d/, /<< (GROUP|AUTHINFO)/ + when /^(autopar|parfile|parset)/ + when /^(?:OK:(.*?))?(?:WARNINGS:(.*?))?(?:ERRORS:(.*?))?$/ return unless $1 or $2 or $3 ok,warn,errs = $1, $2, $3 + errs = nil if errs =~ /^\s*\d+\s*autopar\s*$/ @finish_status = (errs ? 'FAILED' : 'FINISHED') ldebug "Finished:#{' ok'+green(ok) if ok}#{' warnings'+yellow(warn) if warn}#{' errors'+red(errs) if errs}" Index: group.rb =================================================================== RCS file: /cvsroot/ngetsuite/ngetsuite/ngetsuite/group.rb,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** group.rb 21 May 2004 08:42:19 -0000 1.44 --- group.rb 23 May 2004 07:28:48 -0000 1.45 *************** *** 252,256 **** text = `#{$config['yydecode']} #{file} -o - 2>/dev/null `.chomp artindex = Db.dbh.select_one("select `artindex` from `articles` where `mid`='#{mid}'") ! if text and text.length < 15000 and text.length > 800 and artindex sth.execute(artindex[0], text) nb_nfos += 1 --- 252,256 ---- text = `#{$config['yydecode']} #{file} -o - 2>/dev/null `.chomp artindex = Db.dbh.select_one("select `artindex` from `articles` where `mid`='#{mid}'") ! if text and text.length < 15000 and text.length > 100 and artindex sth.execute(artindex[0], text) nb_nfos += 1 |