Re: [Mailman-Developers] GSoC 2014 : Proposal for the Mailman CLI project

2014-04-22 Thread Rajeev S
Hi,

My proposal has been successfully accepted into the GSoC 2014 program.I
would like to thank the Mailman community and mentors for their extensive
support during my application process,especially Mr. Stephen Turnbull.

Also I have a few questions as part of the community bonding process.

1.Is the project to be developed as an independent project or as a
part/branch of the Mailman Core repository
2.If it is an Independent project, Is it OK to use the
git+gitorious/savannah or should I stick to bzr+launchpad? I have used git
extensively,naturally more comfortable with git.However, I can pick up bzr
if necessary.
3.Is it necessary for me to hangout in the IRC?If yes, when?
4.Can I start coding right away?

Thank you once again!


*Regards,Rajeev S*
*Government Engineering College,Thrissur*
*http://rajeevs.tk http://rajeevs.tk*


On Thu, Mar 20, 2014 at 6:50 PM, Rajeev S rajeevs1...@gmail.com wrote:

 Hi,

 Made a minor edit upon Meflin's comment, asking to change project title.

 http://myfossblog.blogspot.in/2014/03/yet-another-change.html


 *Regards,Rajeev S*
 *Government Engineering College,Thrissur*
 *http://rajeevs.tk http://rajeevs.tk*


 On Fri, Mar 14, 2014 at 3:50 PM, Rajeev S rajeevs1...@gmail.com wrote:

 Hi,

 I have submitted a proposal for the Mailman CLI project through
 melange.You can find it here


 https://www.google-melange.com/gsoc/proposal/review/student/google/gsoc2014/rajeevs1992/5629499534213120

 (Organisation view only)

 I have gone through the suggestions by Stephen as comments to the
 proposal and revised the proposal accordingly.

 http://myfossblog.blogspot.in/2014/03/gsoc-proposal-to-gnu-mailman.html



 *Regards,Rajeev S*
 *Government Engineering College,Thrissur*
 *http://rajeevs.tk http://rajeevs.tk*



___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] handler to auto detach attachment and link it to a website keeping html

2014-04-22 Thread Sylvain Viart

Hi,

Seems working… Great.

Le 19/04/2014 20:24, Mark Sapiro a écrit :

You don't have to do that. If xxx is the base64 encoded image data, all
you need is

 clip = MIMEImage(xxx, 'png', _encoder=email.encoders.encode_noop)
 clip['Content-Transfer-Encoding'] = 'base64'


Cool!

The working code I produced is:

from email.mime.image import MIMEImage
from email import encoders
#[…]
clip = MIMEImage(ATTACH_CLIP, 'png', _encoder=encoders.encode_noop)
clip['Content-Transfer-Encoding'] = 'base64'
clip.add_header('Content-ID', 'part1.%s' % clip_cid)

Thank you. :-)

List configuration question.

I need to pass some configuration plugin to this handler. Like remote 
ftp parameters. I've seen code like this:


if mlist.convert_html_to_plaintext and 
mm_cfg.HTML_TO_PLAIN_TEXT_COMMAND:



I suppose that I configure it that way:

/etc/mailman/mm_cfg.py
HTML_TO_PLAIN_TEXT_COMMAND = 'path/to/converter'

and in my extend()

mlist.convert_html_to_plaintext = 1

is in /var/lib/mailman/lists/mytestlist/extend.py  [debian base path]

I took it here 
http://wiki.list.org/pages/viewpage.action?pageId=4030615. I used 
extend.py to install my custom handler that way:


import copy
from Mailman import mm_cfg
def extend(mlist):
  mlist.pipeline = copy.copy(mm_cfg.GLOBAL_PIPELINE)
  # The next line inserts MyHandler ahead of Moderate.
  mlist.pipeline.insert(mlist.pipeline.index('Moderate'), 'MyHandler')


Also, it's indicated that there's a kind of caching involved with the 
Handler's code…:


Note however, that the first time Mailman saves the list, the pipeline 
attribute will be saved along with it, so simply removing extend.py 
from lists/test-list/ won't remove the special pipeline.


I do perform a mailman restart to load new handler's code:

/etc/init.d/mailman restart


Is there some documentation about list configuration override order?

I found a topic giving some information for personalizing the list:

4.48 How can I change the HTML (or .txt) templates used by my mailing lists?
http://wiki.list.org/pages/viewpage.action?pageId=4030605


Regards,
Sylvain.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] GSoC 2014 : Proposal for the Mailman CLI project

2014-04-22 Thread Abhilash Raj
Hi Rajeev,

Congratulations! We look forward to a great summer with you.

On Tue, Apr 22, 2014 at 3:47 PM, Rajeev S rajeevs1...@gmail.com wrote:

 Hi,

 My proposal has been successfully accepted into the GSoC 2014 program.I
 would like to thank the Mailman community and mentors for their extensive
 support during my application process,especially Mr. Stephen Turnbull.

 Also I have a few questions as part of the community bonding process.

 1.Is the project to be developed as an independent project or as a
 part/branch of the Mailman Core repository


That is supposed to be an implementation detail of your proposal. What do
you
think would be the best?


 2.If it is an Independent project, Is it OK to use the
 git+gitorious/savannah or should I stick to bzr+launchpad? I have used git
 extensively,naturally more comfortable with git.However, I can pick up bzr
 if necessary.


Even if it is an independent project we strongly encourage you to use bzr,
as
integration and code review might become a problem in later stages of your
project( I am speaking from personal experience). Learning bzr and launchpad
is not at all difficult if you know git.


 3.Is it necessary for me to hangout in the IRC?If yes, when?


It is not *necessary* for you to hangout on IRC. You just need to keep
your mentors updated about what are you doing all the time. If you prefer
email, I don't think that would be a problem. Your only responsibility
is to deliver the project you proposed on time.

4.Can I start coding right away?


You can, but first be sure you know what you want to code. Your proposal
does have a detailed description on working of the tool, however there is
little mention about the details of implementation and design. It would
be best if you first consult with your mentors and decide on something so
that you don't waste time writing code that is not needed.


 Thank you once again!


 *Regards,Rajeev S*
 *Government Engineering College,Thrissur*
 *http://rajeevs.tk http://rajeevs.tk*


 On Thu, Mar 20, 2014 at 6:50 PM, Rajeev S rajeevs1...@gmail.com wrote:

  Hi,
 
  Made a minor edit upon Meflin's comment, asking to change project title.
 
  http://myfossblog.blogspot.in/2014/03/yet-another-change.html
 
 
  *Regards,Rajeev S*
  *Government Engineering College,Thrissur*
  *http://rajeevs.tk http://rajeevs.tk*
 
 
  On Fri, Mar 14, 2014 at 3:50 PM, Rajeev S rajeevs1...@gmail.com wrote:
 
  Hi,
 
  I have submitted a proposal for the Mailman CLI project through
  melange.You can find it here
 
 
 
 https://www.google-melange.com/gsoc/proposal/review/student/google/gsoc2014/rajeevs1992/5629499534213120
 
  (Organisation view only)
 
  I have gone through the suggestions by Stephen as comments to the
  proposal and revised the proposal accordingly.
 
  http://myfossblog.blogspot.in/2014/03/gsoc-proposal-to-gnu-mailman.html
 
 
 
  *Regards,Rajeev S*
  *Government Engineering College,Thrissur*
  *http://rajeevs.tk http://rajeevs.tk*
 
 
 
 ___
 Mailman-Developers mailing list
 Mailman-Developers@python.org
 https://mail.python.org/mailman/listinfo/mailman-developers
 Mailman FAQ: http://wiki.list.org/x/AgA3
 Searchable Archives:
 http://www.mail-archive.com/mailman-developers%40python.org/
 Unsubscribe:
 https://mail.python.org/mailman/options/mailman-developers/raj.abhilash1%40gmail.com

 Security Policy: http://wiki.list.org/x/QIA9




-- 
Abhilash Raj
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] GSoC 2014 : Proposal for the Mailman CLI project

2014-04-22 Thread Rajeev S
Hi Abhilash,

Thank you for the reply.

I will post a write up describing the implementation details of the
project.All other issues stand resolved.I will be using bzr+launchpad,and I
prefer mail to IRC.




*Regards,Rajeev S*
*Government Engineering College,Thrissur*
*http://rajeevs.tk http://rajeevs.tk*


On Tue, Apr 22, 2014 at 7:42 PM, Abhilash Raj raj.abhila...@gmail.comwrote:

 Hi Rajeev,

 Congratulations! We look forward to a great summer with you.

 On Tue, Apr 22, 2014 at 3:47 PM, Rajeev S rajeevs1...@gmail.com wrote:

 Hi,

 My proposal has been successfully accepted into the GSoC 2014 program.I
 would like to thank the Mailman community and mentors for their extensive
 support during my application process,especially Mr. Stephen Turnbull.

 Also I have a few questions as part of the community bonding process.

 1.Is the project to be developed as an independent project or as a
 part/branch of the Mailman Core repository


 That is supposed to be an implementation detail of your proposal. What do
 you
 think would be the best?


 2.If it is an Independent project, Is it OK to use the
 git+gitorious/savannah or should I stick to bzr+launchpad? I have used git
 extensively,naturally more comfortable with git.However, I can pick up bzr
 if necessary.


 Even if it is an independent project we strongly encourage you to use bzr,
 as
 integration and code review might become a problem in later stages of your
 project( I am speaking from personal experience). Learning bzr and
 launchpad
 is not at all difficult if you know git.


 3.Is it necessary for me to hangout in the IRC?If yes, when?


 It is not *necessary* for you to hangout on IRC. You just need to keep
 your mentors updated about what are you doing all the time. If you prefer
 email, I don't think that would be a problem. Your only responsibility
 is to deliver the project you proposed on time.

 4.Can I start coding right away?


 You can, but first be sure you know what you want to code. Your proposal
 does have a detailed description on working of the tool, however there is
 little mention about the details of implementation and design. It would
 be best if you first consult with your mentors and decide on something so
 that you don't waste time writing code that is not needed.


 Thank you once again!


 *Regards,Rajeev S*
 *Government Engineering College,Thrissur*
 *http://rajeevs.tk http://rajeevs.tk*


 On Thu, Mar 20, 2014 at 6:50 PM, Rajeev S rajeevs1...@gmail.com wrote:

  Hi,
 
  Made a minor edit upon Meflin's comment, asking to change project title.
 
  http://myfossblog.blogspot.in/2014/03/yet-another-change.html
 
 
  *Regards,Rajeev S*
  *Government Engineering College,Thrissur*
  *http://rajeevs.tk http://rajeevs.tk*

 
 
  On Fri, Mar 14, 2014 at 3:50 PM, Rajeev S rajeevs1...@gmail.com
 wrote:
 
  Hi,
 
  I have submitted a proposal for the Mailman CLI project through
  melange.You can find it here
 
 
 
 https://www.google-melange.com/gsoc/proposal/review/student/google/gsoc2014/rajeevs1992/5629499534213120
 
  (Organisation view only)
 
  I have gone through the suggestions by Stephen as comments to the
  proposal and revised the proposal accordingly.
 
 
 http://myfossblog.blogspot.in/2014/03/gsoc-proposal-to-gnu-mailman.html
 
 
 
  *Regards,Rajeev S*
  *Government Engineering College,Thrissur*
  *http://rajeevs.tk http://rajeevs.tk*
 
 
 
 ___
 Mailman-Developers mailing list
 Mailman-Developers@python.org
 https://mail.python.org/mailman/listinfo/mailman-developers
 Mailman FAQ: http://wiki.list.org/x/AgA3
 Searchable Archives:
 http://www.mail-archive.com/mailman-developers%40python.org/
 Unsubscribe:
 https://mail.python.org/mailman/options/mailman-developers/raj.abhilash1%40gmail.com

 Security Policy: http://wiki.list.org/x/QIA9




 --
 Abhilash Raj


___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] GSoC 2014 : Proposal for the Mailman CLI project

2014-04-22 Thread Stephen J. Turnbull
Just to follow up quickly (I've got problems I need to deal with
elsewhere over the next couple days).

Abhilash Raj writes:

Hey, thanks for jumping in, maxking!

  Hi Rajeev,
  
  Congratulations! We look forward to a great summer with you.

Definitely!

  I would like to thank the Mailman community and mentors for
  their extensive  support during my application process,

You're very welcome.

  Also I have a few questions as part of the community bonding
  process.
 
  1.Is the project to be developed as an independent project or as a
  part/branch of the Mailman Core repository
  
  That is supposed to be an implementation detail of your
  proposal. What do you think would be the best?

I agree with Abhilash.  You make a proposal, we'll criticize it
(contructively; criticism is not necessarily negative, just as with
literary critics we may give a positive review -- you should know when
you're doing things right).

  2.If it is an Independent project, Is it OK to use the 
  git+gitorious/savannah or should I stick to bzr+launchpad? I have
  used git extensively,naturally more comfortable with git.
  However, I can pick up bzr if necessary.

  Even if it is an independent project we strongly encourage you to
  use bzr, as integration and code review might become a problem in
  later stages of your project( I am speaking from personal
  experience). Learning bzr and launchpad is not at all difficult if
  you know git.

The CLI won't be *that* independent.  It really needs to be on
Launchpad.

Note: It may be possible to use git-bzr to fetch and push from
Launchpad.

  3.Is it necessary for me to hangout in the IRC?If yes, when?
  
  It is not *necessary* for you to hangout on IRC. You just need to
  keep your mentors updated about what are you doing all the time. If
  you prefer email, I don't think that would be a problem. Your only
  responsibility is to deliver the project you proposed on time.

It's generally a good idea to have interaction (brainstorming) when
working on design.  I can generally be available on IRC from about
01:00 UTC to 15:00 UTC.  As Abhilash knows :-) I can often be
convinced to stay around until about 17:00 UTC.  yaseppochi @ freenode

  4.Can I start coding right away?
  
  You can, but first be sure you know what you want to code. Your
  proposal does have a detailed description on working of the tool,
  however there is little mention about the details of implementation
  and design. It would be best if you first consult with your mentors
  and decide on something so that you don't waste time writing code
  that is not needed.

Read Fred Brooks' /The Mythical Man-Month/, especially the essay
Build One to Throw Away.  Then think about whether you really
believe him. :-)

Regards and looking forward to working with you!

Steve

___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] handler to auto detach attachment and link it to a website keeping html

2014-04-22 Thread Mark Sapiro
On 04/22/2014 03:46 AM, Sylvain Viart wrote:
 
 List configuration question.
 
 I need to pass some configuration plugin to this handler. Like remote
 ftp parameters. I've seen code like this:
 
 if mlist.convert_html_to_plaintext and
 mm_cfg.HTML_TO_PLAIN_TEXT_COMMAND:
 
 
 I suppose that I configure it that way:
 
 /etc/mailman/mm_cfg.py
 HTML_TO_PLAIN_TEXT_COMMAND = 'path/to/converter'
 
 and in my extend()
 
 mlist.convert_html_to_plaintext = 1
 
 is in /var/lib/mailman/lists/mytestlist/extend.py  [debian base path]


If you are doing this as a part of content filtering you just set the
list's Content filtering - convert_html_to_plaintext to Yes, but I
suspect you are not.

In that case, don't hijack content filtering settings for your own
purpose. It won't work.

If you are going to hard code some setting for your handler to use, just
hard code it in the handler.


 I took it here
 http://wiki.list.org/pages/viewpage.action?pageId=4030615. I used
 extend.py to install my custom handler that way:
 
 import copy
 from Mailman import mm_cfg
 def extend(mlist):
   mlist.pipeline = copy.copy(mm_cfg.GLOBAL_PIPELINE)
   # The next line inserts MyHandler ahead of Moderate.
   mlist.pipeline.insert(mlist.pipeline.index('Moderate'), 'MyHandler')
 
 
 Also, it's indicated that there's a kind of caching involved with the
 Handler's code…:
 
 Note however, that the first time Mailman saves the list, the pipeline
 attribute will be saved along with it, so simply removing extend.py
 from lists/test-list/ won't remove the special pipeline.


It is not caching per se. Once you access the list once and save it,
your modified pipeline is saved as a list attribute just like any other
setting. Removing extend.py will not remove the pipeline attribute from
the list. That is what the above is trying to tell you.


 I do perform a mailman restart to load new handler's code:
 
 /etc/init.d/mailman restart


Yes. That is correct.


 Is there some documentation about list configuration override order?


Not outside the source code. See the __init__ method of the MailList
class in Mailman/MailList.py. The list's extend.py if any is executed
before the list's configuration is loaded from disk. Thus any list
attribute set in extend.py that also exists in the list's saved
configuration will be overridden by the list config.


 I found a topic giving some information for personalizing the list:
 
 4.48 How can I change the HTML (or .txt) templates used by my mailing
 lists?
 http://wiki.list.org/pages/viewpage.action?pageId=4030605


Which only talks about search rules for the built in templates and has
nothing to do with anything else.

-- 
Mark Sapiro m...@msapiro.netThe highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] handler to auto detach attachment and link it to a website keeping html

2014-04-22 Thread Sylvain Viart

Hi,

Thanks for your helpful answer. :-)

Sorry it seems I don't have explained my needs correctly:

On 04/22/2014 03:46 AM, Sylvain Viart wrote:

List configuration question.

I need to pass some configuration plugin to this handler. Like remote
ftp parameters.


I'm looking for a way to handle my own list's parameter, and I quoted 
some /equivalent/ parameter.

Just some chuck of code I would like to implement for my own handler.

I need to set :

mlist.ftp_remote_host = 'ftp.example.com'
mlist.ftp_remote_login = 'somelogin'
mlist.ftp_remote_pass = 'secretstuff'


I can set site global vars in /etc/mailman/mm_cfg.py but how do I set 
local list parameter exactly?
I wont code web interface to handle this, text file config will be great 
enough.


In that case, don't hijack content filtering settings for your own 
purpose. It won't work. If you are going to hard code some setting for 
your handler to use, just hard code it in the handler. 


Sorry about this quoting introducing a confusion. No hijack here. No 
hard code neither because if I want to open and share the code, I have 
to remove sensible information from it. Code can embed default 
information, but not the config.



Is there some documentation about list configuration override order?


Not outside the source code. See the __init__ method of the MailList
class in Mailman/MailList.py. The list's extend.py if any is executed
before the list's configuration is loaded from disk. Thus any list
attribute set in extend.py that also exists in the list's saved
configuration will be overridden by the list config.


And where do I set list configuration? I'm not familiar enough with this 
code to /see/ where it comes from.


Mailman/MailList.py […] mailman 2.1.15

filename = os.path.join(self.fullpath(), 'extend.py')
dict = {}
try:
execfile(filename, dict)
except IOError, e:
# Ignore missing files, but log other errors
if e.errno == errno.ENOENT:
pass
else:
syslog('error', 'IOError reading list extension: %s', e)
else:
func = dict.get('extend')
if func:
func(self)==  run the 
extend() function found in mylists/extend.py

if lock:
# This will load the database.
self.Lock()  == do some more 
stuff possibly overwriting what was done in extend()

else:
self.Load()



There  should be something about bin/config_list I think. Web config 
seems detailed here:

http://terri.zone12.com/doc/mailman/mailman-admin/node9.html

Is there a room for free parameter as well?

Regards,
Sylvain.

___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9