RE: Discussion List Style - Request For Comments

 
From: "Dada Mail" <dada@PROTECTED>
Date: May 31st 2006

Oh this is cool -

I was playing around with the aforementioned Mail::Thread CPAN module
available that takes, basically, a computer genius's algorithm,
ported to Perl and makes it available to people like me :) and see if
I can hook it into Dada Mail

Took about 3 minutes

Here's my hacked script - it only looks at the last 25 entries:

[snip]

!/usr/bin/perl -w

use strict;

use lib qw( /home/justin/perllib / /DADA /DADA/perllib );

use CGI::Carp "fatalsToBrowser"; use CGI qw(:standard); use Mail::Thread;

my $list = 'dadadev';

use DADA::MailingList::Archives; use DADA::MailingList::Settings;

my $ls = DADA::MailingList::Settings->new(-List => $list); my $ah = DADA::MailingList::Archives->new(-List => $ls->get);

my $entries = $ah->get_archive_entries;

my @messages;

my $i = 0; foreach my $key(@$entries){ $i++; my ($subject, $message, $format, $raw_msg) = $ah-

get_archive_info($key, 1); my $entity = $ah->entityfrom_raw_msg($raw_msg); push(@messages, $entity); last if $i >= 25; }

print header();

print '

';

my $threader = new Mail::Thread (@messages);

$threader->thread;

dump_em($_,0) for $threader->rootset;

sub dump_em { my ($self, $level) = @; print ' \-> ' x $level; if ($self->message) { print $self->message->head->get("Subject") , "\n"; } else { print "[ Message $self not available ]\n"; } dumpem($self->child, $level+1) if $self->child; dump_em($self->next, $level) if $self->next; }

[/snip]

If you notice, the last part of the program is lifted directly from:

http://search
cpan
org/~simon/Mail-Thread-2
5/Thread
pm#SYNOPSIS

And the first half is just getting the messages in the correct format
for this thing to work with, ie:

 my ($subject, $message, $format, $raw_msg) = $ah- 

get_archive_info($key, 1); my $entity = $ah->entityfrom_raw_msg($raw_msg); push(@messages, $entity);

Which is pretty freakin' cool Here's what it'll output if we're
using this here list (currently)

 [dadadev] Test2


 test test test test




 [dadadev] Re: Discussion List Style - Request For Comments
  \-> [dadadev] Re: Discussion List Style - Request For Comments
  \-> [dadadev] Re: Discussion List Style - Request For Comments
 [dadadev] test



 [dadadev] test test test 3
 [dadadev] Test




 [dadadev] Re: *****SPAM*****  *****SPAM***** Re:  SpamAssassin/ 

dada_bridge pl integration update -> [dadadev] Re: SpamAssassin/dada_bridge pl integration update -> -> [dadadev] Re: SpamAssassin/dada_bridge pl integration
update [dadadev] Discussion List Style - Request For Comments -> [dadadev] Re: Discussion List Style - Request For Comments -> -> [dadadev] Re: Discussion List Style - Request For
Comments -> -> -> [dadadev] Re: Discussion List Style - Request For
Comments -> -> -> -> [dadadev] Re: Discussion List Style -
Request For Comments -> -> -> -> -> [dadadev] Re: Discussion List Style -
Request For Comments -> -> -> -> -> [dadadev] Re: Discussion List Style -
Request For Comments -> -> -> -> [dadadev] Re: Discussion List Style -
Request For Comments -> -> -> -> -> [dadadev] Re: Discussion List Style -
Request For Comments -> -> -> -> -> -> [dadadev] Re: Discussion List
Style - Request For Comments -> [dadadev] RE: Discussion List Style - Request For Comments -> -> [dadadev] RE: Discussion List Style - Request For
Comments -> -> [dadadev] RE: Discussion List Style - Request For
Comments -> -> -> [dadadev] RE: Discussion List Style - Request For
Comments -> -> -> [dadadev] RE: Discussion List Style - Request For
Comments

Which, in its primitive form, is in fact, the last 25 messages, in
some sort of thread :)

So that's some pretty cool navigation, for minimal work and I'm
psyched I'm sure I can make some sort of threading navigation per
message fairly easily in the time it takes me to drink a cup of coffee

Before I do that, I'm going to package the next alpha

Cheers,

  • This mailing list is a public mailing list - anyone may join or leave, at any time.
  • This mailing list is a group discussion list (unmoderated)
  • Start a new thread, email: dadadev@dadamailproject.com

This is the developer discussion mailing list for Dada Mail.

If you are just looking for support Dada Mail, consult the message boards at:

https://forum.dadamailproject.com

Documentation for Dada Mail:

https://dadamailproject.com/d

Specifically, see the Error FAQ:

https://dadamailproject.com/d/FAQ-errors.pod.html

To post to this list, send a message to:

mailto:dadadev@dadamailproject.com

All subscribers of this list may post to the list itself.

Topics that are welcome:

  • Constructive critiques on the program (I like, "x", but, "y" needs some work - here's an idea on how to make this better...)
  • Bug/Error reports
  • Bug fixes
  • Request For Comments on any changes to the program
  • Help customizing Dada Mail for your own needs
  • Patches
  • Language Translations
  • Support Documentation/Doc editing, FAQ's, etc.
  • Discussion of any changes that you would like to be committed to the next version of Dada Mail -

Dada Mail is on Github:

https://github.com/justingit/dada-mail/

If you would like to fork, branch, send over PRs, open up issues, etc.

Privacy Policy:

This Privacy Policy is for this mailing list, and this mailing list only.

Email addresses collection through this mailing list are used explicitly to work within this email discussion list.

We only collect email addresses through our Closed-Loop Opt-In system.

We don't use your email address for any other purpose.

We won't be sharing your email address with any other entity.

Unsubscription can be done at any time. Please contact us at: justin@dadamailproject.com for any help regarding your subscription, including removal from the mailing list.

All mailing list messages sent from us will include a subscription removal link, which will allow you to remove yourself from this mailing list automatically, and permanently.

All consent to use your email address for any other purpose stated at the time of the mailing list subscription will also be revoked upon mailing list removal.