filtering on poster
This commit is contained in:
parent
7720fca967
commit
67d17ba6ef
5 changed files with 36 additions and 3 deletions
|
|
@ -570,6 +570,14 @@ def output_data(subject, mode, filename="", body="")
|
|||
if outfile.length > @maxfilelength
|
||||
outfile = filename[0...@maxfilelength]
|
||||
end
|
||||
elsif @config[group].has_key?("-CP") and @config[group]["-CP"]
|
||||
print "combinedname\n" if Debuglevel > 1
|
||||
poster = @articles.get_group_poster(subject)
|
||||
outfile = sub[0...@maxfilelength-poster.length-filename.length-6]
|
||||
outfile = "#{outfile} [#{poster}] [#{filename}]"
|
||||
if outfile.length > @maxfilelength
|
||||
outfile = filename[0...@maxfilelength]
|
||||
end
|
||||
else
|
||||
print "shortname\n" if Debuglevel > 1
|
||||
outfile = filename[0...@maxfilelength]
|
||||
|
|
@ -704,15 +712,23 @@ def main
|
|||
|
||||
for subj in @articles.get_group_subjects.sort{|a, b| ward_sort(a, b)}
|
||||
print "#{subj}\n" if Debuglevel > 2
|
||||
poster = @articles.get_group_poster(subj)
|
||||
# explicitly mark as read
|
||||
if @config[group].has_key?("-MR") and subj =~ /#{@config[group]["-MR"]}/
|
||||
print "Marking '#{subj}' as read\n"
|
||||
_mark_read(subj)
|
||||
# get the juicy bits
|
||||
elsif @config[group].has_key?("-MRF") and poster =~ /#{@config[group]["-MRF"]}/
|
||||
print "Marking poster '#{poster}' as read\n"
|
||||
_mark_read(subj)
|
||||
elsif !(@config[group].has_key?("-X") and subj =~ /#{@config[group]["-X"]}/) and
|
||||
subj =~ /#{@config[group]["-I"]}/
|
||||
print "Match: #{subj}\n" if Debuglevel > 0
|
||||
_get_article(subj, group)
|
||||
elsif !(@config[group].has_key?("-XF") and poster =~ /#{@config[group]["-XF"]}/) and
|
||||
@config[group].has_key?("-IF") and poster =~ /#{@config[group]["-IF"]}/
|
||||
print "Poster match: #{poster}\n" if Debuglevel > 0
|
||||
_get_article(subj, group)
|
||||
else
|
||||
_mark_remaining(subj, group)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue