extension matching works, remove debugging info
This commit is contained in:
parent
7d80240410
commit
9f8bae179c
1 changed files with 1 additions and 19 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/local/bin/ruby -w
|
#!/usr/local/bin/ruby -w
|
||||||
|
|
||||||
# $Dwarf: ripnews.rb,v 1.42 2003/04/18 21:39:29 ward Exp $
|
# $Dwarf: ripnews.rb,v 1.43 2003/04/18 22:27:58 ward Exp $
|
||||||
# $Source$
|
# $Source$
|
||||||
|
|
||||||
require 'date'
|
require 'date'
|
||||||
|
|
@ -249,7 +249,6 @@ def get_multi(subj, group)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return false unless check_ext(group, filename, "m")
|
return false unless check_ext(group, filename, "m")
|
||||||
print " should have a match here else something's wrong\n"
|
|
||||||
return mode, filename, body
|
return mode, filename, body
|
||||||
else
|
else
|
||||||
body = @articles.get_group_body_first(subj)
|
body = @articles.get_group_body_first(subj)
|
||||||
|
|
@ -266,7 +265,6 @@ def get_multi(subj, group)
|
||||||
end
|
end
|
||||||
# in plaats van hier
|
# in plaats van hier
|
||||||
return false unless check_ext(group, filename, "m")
|
return false unless check_ext(group, filename, "m")
|
||||||
print " should have a match here else something's wrong\n"
|
|
||||||
body = fileout.path
|
body = fileout.path
|
||||||
bodybase = body.sub(/\/[^\/]*$/, "")
|
bodybase = body.sub(/\/[^\/]*$/, "")
|
||||||
File.rename(body, "#{bodybase}/ripnewsdecode")
|
File.rename(body, "#{bodybase}/ripnewsdecode")
|
||||||
|
|
@ -317,24 +315,8 @@ def check_ext(group, filename, mode)
|
||||||
print " filename: #{filename}\n";
|
print " filename: #{filename}\n";
|
||||||
case mode
|
case mode
|
||||||
when "s"
|
when "s"
|
||||||
######## debuging
|
|
||||||
print " sould have extension: #{@config[group]["-S"]}\n";
|
|
||||||
if ( @config[group].has_key?("-S") && filename =~ /\.(#{@config[group]["-S"]})$/ )
|
|
||||||
print " extension matches\n"
|
|
||||||
else
|
|
||||||
print " extension doesn't match\n"
|
|
||||||
end
|
|
||||||
######## /debuging
|
|
||||||
return @config[group].has_key?("-S") ? ( filename =~ /\.(#{@config[group]["-S"]})$/ ) : true
|
return @config[group].has_key?("-S") ? ( filename =~ /\.(#{@config[group]["-S"]})$/ ) : true
|
||||||
when "m"
|
when "m"
|
||||||
######## debuging
|
|
||||||
print " sould have extension: #{@config[group]["-M"]}\n";
|
|
||||||
if ( @config[group].has_key?("-S") && filename =~ /\.(#{@config[group]["-M"]})$/ )
|
|
||||||
print " extension matches\n"
|
|
||||||
else
|
|
||||||
print " extension doesn't match\n"
|
|
||||||
end
|
|
||||||
######## /debuging
|
|
||||||
return @config[group].has_key?("-M") ? ( filename =~ /\.(#{@config[group]["-M"]})$/ ) : true
|
return @config[group].has_key?("-M") ? ( filename =~ /\.(#{@config[group]["-M"]})$/ ) : true
|
||||||
else
|
else
|
||||||
print "Illegal mode \"#{mode}\" in check_ext\n"
|
print "Illegal mode \"#{mode}\" in check_ext\n"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue