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
nn1-14/+102 2009-07-26Get rid of the self-implemented file-stuff. Use the normal python-API insteadRené 'Necoro' Neumann2-87/+0 2009-07-24First eix stuffRené 'Necoro' Neumann4-0/+133 2009-07-05Translation and stuffRené 'Necoro' Neumann3-348/+412 2009-07-05TypoRené 'Necoro' Neumann1-1/+1 2009-07-05Allow ':' in expression names. Thus removing the colon as an assignment operatorRené 'Necoro' Neumann2-6/+2 2009-07-05DocRené 'Necoro' Neumann1-1/+14 2009-07-05Install package_details.pyRené 'Necoro' Neumann1-1/+1 2009-07-05Sort plugins in the windowRené 'Necoro' Neumann2-13/+12 2009-07-05Port DependencyDetailRené 'Necoro' Neumann4-129/+118 2009-07-05Also port FilesDetailRené 'Necoro' Neumann3-43/+24 2009-07-05Also ported EbuildDetailRené 'Necoro' Neumann3-27/+14