summaryrefslogtreecommitdiff
path: root/data/man/man1/feed2imap.1
diff options
context:
space:
mode:
authorBernie Maier <feed2imap@lists.blurk.net>2010-06-28 23:01:13 +1000
committerLucas Nussbaum <lucas@lucas-nussbaum.net>2010-07-05 08:56:34 +0200
commit94dc1db641f98242496a32409e823920f4e700e9 (patch)
treee4b0852848183a9b058f13fb916f7459ef6cd2f8 /data/man/man1/feed2imap.1
parentc5d45c75e5a81c9eb86821b20f42a63ffe179c96 (diff)
downloadfeed2imap-94dc1db641f98242496a32409e823920f4e700e9.tar.gz
feed2imap-94dc1db641f98242496a32409e823920f4e700e9.tar.bz2
feed2imap-94dc1db641f98242496a32409e823920f4e700e9.zip
Patch to use feed item pubDate in Maildir file names
Hi! I've just subscribed to the list, having downloaded feed2imap a few days ago. Since I want to just write RSS feeds to a local Maildir, this looked like just what I needed. Unfortunately, the release 1.0 version seems to randomise the order of the feed items when doing the first fetch for a new feed. Looking at maildir.rb, there is a "TODO: handle `date'" comment and it looks like the code is just generating maildir filenames using the timestamp at the time the items are being written into the maildir. Since all the initial items are written at the same time, and the maildir file name has a random element, this loses the original ordering from the mail feed. The solution is to use the timestamp corresponding to the pubDate in the feed item as the initial component of the maildir file name. Also, instead of using a random integer to force uniqueness in the second component of the file name, I think it is better to use a sequence number for each feed item, which will still be unique for the feed and also preserve item order. My patch follows (it's the first piece of Ruby code I've ever written / modified)... Cheers, Bernie
Diffstat (limited to 'data/man/man1/feed2imap.1')
0 files changed, 0 insertions, 0 deletions