summaryrefslogtreecommitdiff
path: root/lib/feed2imap/config.rb
diff options
context:
space:
mode:
authorAndreas Rottmann <a.rottmann@gmx.at>2009-09-03 11:14:42 +0200
committerLucas Nussbaum <lucas@lucas-nussbaum.net>2009-09-03 11:14:42 +0200
commitcbb4e79e91d3d6e61175f50fb5c3ef9c4f5cdd63 (patch)
tree5f1607c1766d6c3244bb13c10edc550ab5a372c5 /lib/feed2imap/config.rb
parent606304b0fe02adcbb127bded67945bab5297a613 (diff)
downloadfeed2imap-cbb4e79e91d3d6e61175f50fb5c3ef9c4f5cdd63.tar.gz
feed2imap-cbb4e79e91d3d6e61175f50fb5c3ef9c4f5cdd63.tar.bz2
feed2imap-cbb4e79e91d3d6e61175f50fb5c3ef9c4f5cdd63.zip
Add support for Maildir
Allow delivering to local Maildir[0] boxes, with URLs specifying the path, like: maildir:/home/rotty/Maildir/.feeds.foobar [0] http://en.wikipedia.org/wiki/Maildir
Diffstat (limited to 'lib/feed2imap/config.rb')
-rw-r--r--lib/feed2imap/config.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/feed2imap/config.rb b/lib/feed2imap/config.rb
index d8f3548..e3df569 100644
--- a/lib/feed2imap/config.rb
+++ b/lib/feed2imap/config.rb
@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require 'yaml'
require 'uri'
require 'feed2imap/imap'
+require 'feed2imap/maildir'
# Default cache file
DEFCACHE = ENV['HOME'] + '/.feed2imap.cache'
@@ -40,12 +41,17 @@ class F2IConfig
@updateddebug = (@conf['debug-updated'] and @conf['debug-updated'] != 'false')
@include_images = (@conf['include-images'] and @conf['include-images'] != 'false')
@imap_accounts = ImapAccounts::new
+ maildir_account = MaildirAccount::new
@conf['feeds'].each do |f|
if f['disable'].nil?
uri = URI::parse(f['target'].to_s)
path = URI::unescape(uri.path)
path = path[1..-1] if path[0,1] == '/'
- @feeds.push(ConfigFeed::new(f, @imap_accounts.add_account(uri), path, self))
+ if uri.scheme == 'maildir'
+ @feeds.push(ConfigFeed::new(f, maildir_account, path))
+ else
+ @feeds.push(ConfigFeed::new(f, @imap_accounts.add_account(uri), path, self))
+ end
end
end
end
2010-07-27Fix sizes of datepickerRené 'Necoro' Neumann1-3/+3 2010-07-27Add jQuery UI -- DatepickerRené 'Necoro' Neumann17-0/+1168 2010-07-27Add category manipulation supportRené 'Necoro' Neumann10-6/+85 2010-07-26Konstante KostenRené 'Necoro' Neumann1-1/+1 2010-07-26Added link to edit the constant stuffRené 'Necoro' Neumann1-1/+1 2010-07-26Added addition and modification of constant stuffRené 'Necoro' Neumann3-8/+106 2010-07-05Only show right nav arrow, if the following month is not in the futureRené 'Necoro' Neumann2-14/+20 2010-07-05Add month navigationRené 'Necoro' Neumann6-5/+35 2010-07-05Add iconRené 'Necoro' Neumann2-1/+2 2010-07-05change cursorRené 'Necoro' Neumann1-0/+5 2010-07-05Some restructuringRené 'Necoro' Neumann3-28/+45 2010-07-05Closed/Open imagesRené 'Necoro' Neumann4-0/+146 2010-05-25Move page templates into their own folderRené 'Necoro' Neumann5-5/+7 2010-05-25Added the ability to edit an expenseRené 'Necoro' Neumann3-9/+34 2010-05-12FixRené 'Necoro' Neumann1-2/+2 2010-05-12Show more detailsRené 'Necoro' Neumann4-19/+42 2010-05-12Create new form each timeRené 'Necoro' Neumann1-24/+26 2010-05-10Fix redirect in AddRené 'Necoro' Neumann1-1/+1 2010-05-10Added the 'add expense' stuffRené 'Necoro' Neumann4-3/+69