Archive for May, 2011

May 27-28, 2011

May 28, 2011 Leave a comment
  • Modified archive-ui code to substitute templates using new string substitution feature which is used in mm3.
  • Made a little modification in adding an article to the database
  • Finally, for the first time, on adding a new message to the archives, I can see conversation-list page and each conversation page – both working perfectly!!
  • But in most of the code, I have used little hacks to just make it work. So, its time to go through the archive-ui and pipermail code once again, and then, write a good code to achieve that basic functionality. Have already started working in this direction.
  • After that, next thing would be to make some new changes and add more features to the archive-ui for mm3.

May 26, 2011

May 27, 2011 Leave a comment

[Written on May 27]

  • ¬†Archive-ui was written on top of systers’ implementation of mailman, which supports some extra mailman extensions e.g. DList and conversations view also shows email address corresponding to the conversation. But Dlist has not been ported to mm3. So, I got confused but later realised that conversation view can be shown without DList feature. Overall, it took some time to search mailman and systers archives to learn more about DList and its current status.
  • Progressed a little more in modifying archive-ui code for mm3. It turned out I needed very minor changes to make account for the changed MailingList structure(from mm2.1 to mm3). It will be a good idea to understand what major changes have been done in mailman while going from mm2.1 to mm3.
  • Currently, working on substitution of templates to generate static htmls. mm2.1 and mm3 have different ways to substitute values inside templates from a dictionary.

25 May, 2011

May 26, 2011 Leave a comment
  • Continued with debugging and making code of archive-ui suitable for mm3 (earlier, I merged archive-ui’s some components with minor changes)
  • Took me quite a time to understand how to add new templates.. and later, found that information written in mm3 docs. ūüė¶¬† ..But in the end, i18n->find() was able to locate new templates added by archive-ui.
  • In-between, started learning more about database component of mm3. Will require more time.
  • archive-ui has completely different structure for some major components e.g. MailingList class. So, moving onto making changes in archive-ui to make it synchronized with mm3.

May 24, 2011

May 24, 2011 Leave a comment

I started merging archive-ui code with pipermail. Basically, created the new class HyperHyperArchive and added additional fields to Article Class. The good part is that both archive-ui and pipermail use similar way(mbox file) to insert a message into Archives.

  • archive-ui: Uses a script bin/arch to open the mbox file(which it takes as input), opens it and call these: archiver.processUnixMailbox(fp, start, end)
  • pipermail: archiving/ create a temporary mbox file, add message to it and call¬†¬† archiver.processUnixMailbox(fp, start, end)

After finishing the merging of the code, I make a call to¬†archiver.processArchives(mbox=True) when archive_message() is called (archive_message() is the function that has to do all the work, and is described by archiver API in mm3).¬† I see a bunch of new files (conversation.html), directory (‘all’). But, they are all broken. So, it will require some more time (debugging + perfect understanding of archive-ui) to finish.

Also, I noticed that I haven’t gone through the database part of archivers. I’ll try to read it too.

Tags: , ,

May 23, 2011

May 23, 2011 Leave a comment

Today was the first day of official GSOC coding period. I’ll try to write a small blog post everyday. For all my future posts, I will use these terms:

archive-ui -> Yian’s work on archive-ui as part of last year’s GSOC on mailman 2.1

pipermail-> Pipermail on mailman 3

Previous Status: I’ve already setup Pipermail UI. I have gained a basic idea of how things are done in pipermail implementation. I have also started reading archive-ui source code.

Today: Earlier, I thought of installing mailman 2.1 and integrating archive-ui with it. But it was not clear how to go about it and also, it seemed to be a time consuming task. So, I decided to leave it atleast for now.

In order to understand archive-ui’s implementation, I basically followed:

  • GSOC demo of Yian’s work
  • Source code

These two resources were enough for the purpose. At the end of the day, things are much more clearer. Now, I understand the execution flow of pipermail and archive-ui and the differences between them. Most important, the notions of ‘conversation’ in archive-ui and ‘generating static htmls’ are clear. So, I hope to quickly get started with writing code to bring archive-ui functionality to mm3.

Tags: , ,

Getting Started with Pipermail web Interface on mailman 3

May 22, 2011 Leave a comment

Apache Configuration (Reference):

Create a new file: /etc/apache2/mods-available/mailman.conf

Alias /pipermail/ <path to var_dir>/var/archives/public/
<Directory <path to var_dir>/var/archives/public>
Options +FollowSymLinks

Add a symlink in /etc/apache2/mods-enable
# cd /etc/apache2/mods-enabled
# ln -s /etc/apache2/mods-available/mailman.conf mailman.conf

Actually, there was one more problem. Pipermail was not generating static html files in the correct way.
Each of the static html files just contained the path to the required template files.

In function quick_maketext(), in file Archiver/
template, filepath = find(templatefile, mailing_list=mlist, language=lang.code)

Here, find() just returns the path of template file to the ‘template’ variable whereas, it should return the contents of the template file.

In version 2.1, Utils.findtext() works fine.
template, filepath = Utils.findtext(templatefile, lang=lang, raw=True, mlist=mlist)

So, after modifying find(), I can see Pipermail archives through a web interface. Now, I’ll start looking at Yian’s code on UI.

Tags: ,