[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [approved] Function mapping messages to IDs?



Hello.

> You do not specify if  you were processing MH-style folders are
> not.

Yes, I'm processing MH-style folders (maildir folders).

> If the input  is from a MH-style folder,  mhonarc will actually
> do a  numeric sort on  the directory contents first  to provide
> some  parallel  to  filename numbers.   However,  if  MHPATTERN
> resource is customized,  the order the files  are processed are
> somewhat arbitrary.

I'm using

$ mhonarc -rcfile $file -mhpattern '^[^\.]' $maildir/{cur,new}

to generate the archive and the same command with -add to keep it
up to date.

Would it be  too hard to have MHonArc sort  the messages by their
date  (rather than  by their  filename) and  use that  order when
assigning them IDs?

> BTW, MHonArc is  designed where the message  number really does
> not  mean  much.   Why  is  the  message  numbering  assignment
> important to you?

Because the URL given to each  message depends on the number.  If
the order is  somewhat arbitrary one could run  into trouble when
regenerating the archive from different sources as the URLs would
change and links from other locations would break.

I think it would be best to use some criteria that allows MHonArc
to  always  give  the  same  file  names  to  the  same  messages
regardless of whether  the archive is generated from a  MBox or a
Maildir.

This  criteria  should also  give  the  messages the  same  names
regardless  of whether  the archive  has been  constantly updated
using the ``-add'' argument or is  rebuilt from the ground up and
the only criteria  I can think of to make  this possible is using
the date (actually the date of arrival to the archive, hmm).

I recently  had to  rebuild my  HTML archive  (as I  changed some
options and also as I converted  my archive from Mbox to Maildir)
and I noticed that the URLs had changed.

Thank you very much for your help, Earl.

Alejo.
http://bachue.com/alejo

--
The mere formulation of a problem is far more essential than its solution.
      -- Albert Einstein.

$0='!/sfldbi!yjoV0msfQ!sfiupob!utvK'x44;print map{("\e[7m \e[0m",chr ord
(chop$0)-1)[$_].("\n")[++$i%77]}split//,unpack'B*',pack'H*',($F='F'x19).
"F0F3E0607879CC1E0F0F339F3FF399C666733333CCF87F99E6133999999E67CFFCCF3".
"219CC1CCC033E7E660198CCE4E66798303873CCE60F3387$F"#Don't you love Perl?

Attachment: pgp00007.pgp
Description: PGP signature


[Index of Archives]     [Bugtraq]     [Yosemite News]     [Mhonarc Home]