GEE/Email version 0.4b0 is available. <http://gna.org/projects/gee> <http://marcomaggi.jottit.com/gee-email/gee-email.html>
This version is tested with Guile 1.8.3. GEE/Email is a C language library extension for Guile, the GNU's Ubiquitous Intelligent Language for Extensions. It implements functions for email processing The lexer and parser for email addresses are a C/Scheme rewriting of the C++ code in librfc822 1.0, Copyright (c) 1998-2002 by Peter Simons <simons/computer.org>, distributed under the terms of the GNU General Public License 2. You can use GEE/Email under the terms of the GNU General Public License version 2, or (at your option) any later version. The module is based on GOOPS. Examples. To avoid spam abuse: in the following '@' is replaced with 'Q'. This script: | (define-module (this-one) | #:use-module (ice-9 pretty-print) | #:use-module (oop goops) | #:use-module (gee misc email-1) | #:duplicates merge-generics) | | (pretty-print | (email-address-lexer | "\"Peter Simons\" <simonsQrhein.de>")) outputs: ((quoted-string . "\"Peter Simons\"") (character . #\<) (atom . "simons") (character . #\Q) (atom . "rhein") (character . #\.) (atom . "de") (character . #\>)) while this script: | (define-module (this-one) | #:use-module (ice-9 receive) | #:use-module (oop goops) | #:use-module (gee misc email-1) | #:duplicates merge-generics) | | (receive (the-address rest) | (email-address-parse-address | (email-address-lexer ": simonsQrhein.de, marcoQlocalhost ;, | Dylan Dog Mailing List : <marcoQthere>, Deep Address <Qalpha.de,Qbeta.de:marcoQqui>, | \"Marco Si\" <marcoQsi>;")) | (let* ((second-group (cadr (elements the-address))) | (group's-phrase (car (elements second-group))) | (second-mailbox (caddr (elements second-group))) | (second's-phrase (phrase second-mailbox)) | (route-addresses (route-address second-mailbox)) | (the-route (route route-addresses)) | (the-first-in-route (car (elements the-route))) | (the-addr-spec (addr-spec route-addresses))) | (format #t "Second group:~/~/'~A'~%" second-group) | (format #t "Group's phrase:~/~/'~A'~%" group's-phrase) | (format #t "Second mailbox:~/~/'~A'~%" second-mailbox) | (format #t "Second's phrase:~/'~A'~%" second's-phrase) | (format #t "Route address:~/~/'~A'~%" route-addresses) | (format #t "The route:~/~/'~A'~%" the-route) | (format #t "The first in route:~/'~A'~%" the-first-in-route) | (format #t "The address spec:~/'~A'~%" the-addr-spec))) outputs: Second group: 'Dylan Dog Mailing List :<marcoQthere>, Deep Address <Qalpha.de,Qbeta.de:marcoQqui>, "Marco Si" <marcoQsi>;' Group's phrase: 'Dylan Dog Mailing List' Second mailbox: 'Deep Address <Qalpha.de,Qbeta.de:marcoQqui>' Second's phrase: 'Deep Address' Route address: '<Qalpha.de,Qbeta.de:marcoQqui>' The route: 'Qalpha.de,Qbeta.de:' The first in route: 'alpha.de' The address spec: 'marcoQqui' I dunno. Maybe a full Email section is worth it if we list the GNU Mailtools bindings, too. <DT><B><A HREF="http://gna.org/projects/gee">GEE/Email</A></B> <DD><TABLE> <TR><TD><I>description</I></TD> <TD>Email processing functions</TD></TR> <TR><TD><I>license</I></TD> <TD>GNU General Public License version 2, or (at your option) any later version.</TD></TR> <TR><TD><I>requires</I></TD> <TD>Guile 1.8</TD></TR> </TABLE><P> -- Marco Maggi "Now feel the funk blast!" Rage Against the Machine - "Calm like a bomb" _______________________________________________ Guile-user mailing list [email protected] http://lists.gnu.org/mailman/listinfo/guile-user
