[ZWeb] Zope.org feedback: June 6 Zope News

Chris McDonough chrism@zope.com
13 Oct 2002 17:03:33 -0400

Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Sun, 2002-10-13 at 10:16, george donnelly wrote:
> ok, so I'll shoot for an issue in 2 weeks. Let me know if there's anything
> you want included.

Killer, thanks!  Note that I used to write the ZWN in structured text
without "stx links" (for email purposes) then I'd use scripts to
transform it into stx with links (for posting on the website).

Those scripts are attached in case you find them useful

linkmaker.py -- transforms stdin into a document with stx links
stx2html.py -- transforms a stx document into an html document
mailcounter.py -- obtains the top 12 threads (by number of postings)
                  from a mailbox archive of the Zope maillist and prints
                  URLs to the NIP archives for each. 

Monthly Zope maillist mailbox files can be obtained from
http://lists.zope.org/pipermail/zope/ . 

I'm of course not going to dictate what format you write in, what stuff
is included, or anything else, feel free to use these things or not. 
Anything would be wonderful. ;)

This might also be useful to generate a list of new content on the
Zope.org site since the last ZWN:


> btw in the category of futuristic rumination, I wonder if down the road it
> would be more effective to turn ZWN into a multi-user blog something on the
> order of Daily Python URL (http://www.pythonware.com/daily/ ) but not
> necesarily so exclusively link-oriented and using CMF?

That's a great idea.  This is likely a job for the New Zope Org project
http://dev.zope.org/Wikis/DevSite/Projects/ZopeOrgCollaborationEnhancement/FrontPage).  Sidnei DeSilva is likely in charge of this at this point.

Thanks again!

- C

> <-->
> george donnelly - http://zettai.net/ - "We Love Newbies" :)
> Zope Hosting - Dynamic Website Design - Search Engine Promotion
> > From: Chris McDonough <chrism@zope.com>
> > 
> > Wow, cool!
> > 
> > If you could even write one, it would be a start...
> > 
> > I really can't promise any authoring time at the moment, but I can
> > promise that if there's content, I can put it in the right place on
> > Zope.org.
> > 
> > - C
> _______________________________________________
> Zope-web maillist  -  Zope-web@zope.org
> http://lists.zope.org/mailman/listinfo/zope-web

Content-Disposition: attachment; filename=linkmaker.py
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-python; name=linkmaker.py; charset=ISO-8859-15

#!/usr/bin/env python2.1

from string import letters
import re, sys

@\.\,\?\!\/\:\;\-\#\~\=3D\&\%%]+)' % letters)

def makelinks(file):
    while 1:
        line =3D file.readline()
        if not line: break
        line =3D url_expr.sub(r'"\1":\1', line)
if __name__ =3D=3D '__main__':
    f =3D open(sys.argv[1])

Content-Disposition: attachment; filename=mailcounter.py
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-python; name=mailcounter.py; charset=ISO-8859-15

#!/usr/bin/env python2.1

import mailbox
import rfc822
import sys
import re
import string
import urllib

URL =3D ('http://zope.nipltd.com/public/lists/zope-archive.nsf/Main?'
REPLYMATCH =3D re.compile(r'[Rr][Ee][:][\W]*')
d =3D {} # numhits -> [subject, subject...]
t =3D {} # subject -> numhits

def main(filename):
    mb =3D mailbox.UnixMailbox(open(filename))
    while 1:
        message =3D mb.next()
        if not message: break
        subj =3D message.get('Subject', '')
        s =3D REPLYMATCH.sub('', subj)
        if t.get(s):
    for k, v in t.items():
        if d.get(v):
            d[v] =3D [k]
    print "  Maillist Summary\n"
    limit =3D 12
    nums =3D d.keys()
    i =3D 0
    for num in nums:
        if i > limit: break
        l =3D map(lambda x, s=3Dstring: s.strip(s.replace(x, '[Zope]', ''))=
        for x in l:
            url =3D URL % urllib.quote_plus('"%s"' % x)
            print "    %s\n" % x
            print "      %s\n" % url
        i =3D i + len(d[num])

if __name__ =3D=3D '__main__':

Content-Disposition: attachment; filename=stx2html.py
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-python; name=stx2html.py; charset=ISO-8859-15

#!/usr/bin/env python2.1
import StructuredText
import sys

def main(f):
    f =3D open(f).read()
    stx =3D StructuredText.Basic(f)
    doc =3D StructuredText.DocumentWithImages(stx)
    html =3D StructuredText.HTML(doc)
    print html

if __name__ =3D=3D '__main__':