|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|