Changeset 5248 in project for mime/trunk/mime.html


Ignore:
Timestamp:
07/29/07 19:16:31 (14 years ago)
Author:
hans
Message:

version 1.3: factored out mime-get-attributes from mime-parse-content-type, added a missing backslash in mime-parse-version regexp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mime/trunk/mime.html

    r5246 r5248  
    11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    2 <!-- Generated by eggdoc Revision: 1.17  -->
     2<!-- Generated by eggdoc Revision: 1.20  -->
    33<html>
    44<head>
     
    2626                    border-top: 1px solid #448;
    2727                    padding-left: 1em;
    28      }
     28                    margin-bottom: 1.2em;
     29     }
     30     DIV.subsubsection {
     31                    border-top: 1px dotted #99c;
     32                    /* border-left: 1px solid #99c; */
     33                    padding-left: 1em;
     34                    margin-bottom: 1.2em;
     35     }
     36     DIV.subsubsubsection {
     37                    border-top: 1px solid #ddf;
     38                    padding-left: 1em;
     39                    margin-bottom: 1.2em;
     40     }
     41
    2942         DIV.section {
    3043                 margin-bottom: 1.5em;
     
    4558                 margin: 0 0 1em 0;
    4659        }
    47         LI {
     60        UL LI {
    4861                list-style: none;
    4962        }
     
    5568                color: #113;
    5669                margin-bottom: 0.5em;
     70        }
     71        H4, H5, H6 {
     72                color: #113;
     73                margin-bottom: 1.0em;
     74        }
     75        H5 {
     76                font-weight: normal;
     77                font-style: italic;
     78                font-size: 100%;
     79                margin-top: 1.2em;
     80        }
     81        H6 {
     82                font-weight: bold;
     83                font-size: 85%;
     84                margin-top: 1.2em;
    5785        }
    5886     DIV#eggheader {
     
    101129       padding: 0.2em;
    102130       border: 1px solid #aac;
     131       border-collapse: collapse;
    103132       width: 100%;
    104133     }
     
    109138     }
    110139     TH {
    111        border-bottom: 1px solid black;
    112      } --></style></head>
     140       text-align: left;
     141       border-bottom: 1px solid #aac;
     142       padding: 0.25em 0.5em 0.25em 0.5em;
     143     }
     144     TD { padding: 0.25em 0.5em 0.25em 0.5em; }
     145     --></style></head>
    113146<body>
    114147<div id="header">
     
    127160<li>1.1 Generating MIME messages</li>
    128161<li>1.2 fixed .setup script to handle change in argument processing of csc</li>
    129 </ul></div>
     162<li>1.3 Added mime-get-attributes (suggested by Moe Aboulkheir)</li></ul></div>
    130163<div class="section">
    131164<h3>Requires</h3>
     
    143176<p>This egg provides utility procedures to handle Multipurpose Internet Mail Extensions (MIME) messages, defined in RFC2045 through RFC2049. This egg is supposed to be used with the <tt>rfc822</tt> egg.</p>
    144177<div class="subsection">
    145 <p><b>Quoted-printable encoding/decoding</b></p>
     178<h4>Quoted-printable encoding/decoding</h4>
    146179<p>A few functions to encode/decode Quoted-printable format, defined in RFC2045, section 6.7.</p>
    147180<dl>
     
    155188<dd>Decodes a Quoted-printable encoded string <tt>STRING</tt> and returns the result as a string.</dd></dl></div>
    156189<div class="subsection">
    157 <p><b>Utilities for header fields</b></p>
     190<h4>Utilities for header fields</h4>
    158191<p>A few utility procedures to parse MIME-specific header fields.</p>
    159192<dl>
     
    161194<dd>If <tt>FIELD</tt> is a valid header field for MIME-Version, returns its major and minor versions in a list. Otherwise, returns <tt>#f</tt>. It is allowed to pass <tt>#f</tt> to <tt>FIELD</tt>, so that you can directly pass the result of <tt>rfc822-header-ref</tt> to it. Given a parsed header list from <tt>rfc822-header-&gt;list</tt>, you can get the MIME version (currently, it should be <tt>(1 0)</tt>) by the following code:
    162195<pre>(mime-parse-version (rfc822-header-ref headers &quot;mime-version&quot;))</pre>Note: simple regexp such as <tt>&quot;\d+\.\d+&quot;</tt> doesn't do this job, for <tt>FIELD</tt> may contain comments between tokens.</dd>
     196<dt class="definition"><strong>procedure:</strong> (mime-get-attributes INPUT)</dt>
     197<dd>Reads an attribute/value list in the form <tt>;attr1=value1;attr2=value2</tt> from <tt>INPUT</tt> (which should be an open input-port) and returns it as an alist.</dd>
    163198<dt class="definition"><strong>procedure:</strong> (mime-parse-content-type FIELD)</dt>
    164199<dd>Parses the &quot;content-type&quot; header field, and returns a list such as:
     
    171206=&gt; &quot;this is some text&quot;</pre></dd></dl></div>
    172207<div class="subsection">
    173 <p><b>Streaming parser</b></p>
     208<h4>Streaming parser</h4>
    174209<p>The streaming parser is designed so that you can decide how to do with the message body before the entire message is read.</p>
    175210<dl>
     
    243278<dd>Reads in the body of mime message, decoding transfer encoding, and returns it as a string or writes it to a file, respectively.</dd></dl></div>
    244279<div class="subsection">
    245 <p><b>Message generator</b></p>
     280<h4>Message generator</h4>
    246281<p>The message generator generates a RFC822/MIME message out of <tt>:mime-part</tt> objects.</p>
    247282<dl>
     
    310345<div class="section">
    311346<h3>License</h3>
    312 <pre id="license">
    313347<pre>Copyright (c) 2000-2004 Shiro Kawai, All rights reserved.
    314348
     
    338372LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    339373NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    340 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</pre></pre></div></div>
     374SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</pre></div></div>
    341375<div id="footer">
    342376<hr /><a href="index.html">&lt; Egg index</a>
Note: See TracChangeset for help on using the changeset viewer.