summaryrefslogtreecommitdiff
path: root/bin/feed2imap-cleaner
blob: dc119f6faa9c2334efc34cb69583b7fef0adb2de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/ruby

$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')

require 'feed2imap/feed2imap'
require 'optparse'

configf = ENV['HOME'] + '/.feed2imaprc'
dryrun = false

opts = OptionParser::new do |opts|
  opts.banner = "Usage: feed2imap-cleaner [options]"
  opts.separator ""
  opts.separator "Options:"
  opts.on("-d", "--dry-run", "Dont really remove messages") do |v|
    dryrun = true
  end
  opts.on("-f", "--config <file>", "Select alternate config file") do |f|
    configf = f
  end
end
opts.parse!(ARGV)

config = nil
File::open(configf) { |f| config = F2IConfig::new(f) }
config.imap_accounts.each_value do |ac|
  ac.connect
end
config.feeds.each do |f|
  f.imapaccount.cleanup(f.folder, dryrun)
end
tle='2010-04-15 03:44:46 +0200'>2010-04-15Make the database type choice an info messageRené 'Necoro' Neumann2-7/+13 2010-04-15Renamed es_ES to esRené 'Necoro' Neumann1-0/+0 2010-04-15Fixed dependancy of the new_version plugin from "dev-util/git" to "dev-vcs/gi...Clement Bourgeois1-1/+1 2010-04-14Make some useless info messages being debug statementsRené 'Necoro' Neumann2-34/+17 2010-04-14Improve the C modulesRené 'Necoro' Neumann3-37/+52 2010-04-14Small modifications made to the French translation (typos, grammar).Clement Bourgeois1-69/+69 2010-04-14Fixed the unicode support and stuff ... and also made eix faster :)René 'Necoro' Neumann1-20/+22 2010-04-14Disable debug messages by defaultRené 'Necoro' Neumann1-1/+1 2010-04-13Better eix error inheritance and handlingRené 'Necoro' Neumann1-2/+9 2010-04-13Fix the handling of FilterSets. Fixes bug #558887.René 'Necoro' Neumann2-56/+64 2010-04-12Updated newsRené 'Necoro' Neumann1-0/+1 2010-04-13Added my name to translators list.Clement Bourgeois1-0/+1