Changeset 10535

Show
Ignore:
Timestamp:
02/04/2008 05:52:40 PM (11 months ago)
Author:
dave
Message:

modify docutils beps.py to use pep_base_url.

I tried using bep_base_url to disambiguate the base URL for beps and peps, but this required reaching
into the source code for restructured text (which has some hard-coded notion of PEPs). I decided
not to touch that code just now.

regenerate updated html files.

Location:
dotorg/trunk_fixed
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • dotorg/trunk_fixed/docutils/docutils/transforms/beps.py

    r10307 r10535  
    3333    default_priority = 360 
    3434 
     35    # NOTE: There is no bep_base_url.  The base of the BEP directory is specified with pep_base_url 
     36    # because changing this requires modifying the rst repository.   This value can be changed with the pep-base-url 
     37    # argument.  For now, I don't want to modify restructured text parsing code.  It means we cannot currently 
     38    # disambiguate between peps and beps for specifying the base url. 
    3539    bep_url = 'bep-%04d' 
    3640    bep_cvs_url = ('https://svn.bittorrent.com/trac.cgi/browser/dotorg/trunk/html/beps/bep_%04d.rst') 
    37     //bep_cvs_url = ('http://svn.bittorrent.com/view/*checkout*' 
    38     //               '/peps/trunk/bep-%04d.txt') 
     41    #bep_cvs_url = ('http://svn.bittorrent.com/view/*checkout*' 
     42    #               '/peps/trunk/bep-%04d.txt') 
    3943    rcs_keyword_substitutions = ( 
    4044          (re.compile(r'\$' r'RCSfile: (.+),v \$$', re.IGNORECASE), r'\1'), 
     
    120124                    newbody.append(nodes.reference( 
    121125                        refbep, refbep, 
    122                         refuri=(self.document.settings.bep_base_url 
     126                        refuri=(self.document.settings.pep_base_url 
    123127                                + self.bep_url % bepno))) 
    124128                    newbody.append(space) 
     
    131135            elif name == 'content-type': 
    132136                bep_type = para.astext() 
    133                 uri = self.document.settings.bep_base_url + self.bep_url % 12 
     137                uri = self.document.settings.pep_base_url + self.bep_url % 12 
    134138                para[:] = [nodes.reference('', bep_type, refuri=uri)] 
    135139            elif name == 'version' and len(body): 
     
    269273                try: 
    270274                    bep = int(text) 
    271                     ref = (self.document.settings.bep_base_url 
     275                    ref = (self.document.settings.pep_base_url 
    272276                           + self.bep_url % bep) 
    273277                    p[0] = nodes.reference(text, text, refuri=ref) 
  • dotorg/trunk_fixed/html/beps/bep_0000.html

    r10530 r10535  
     1<?xml version="1.0" encoding="utf-8" ?> 
     2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
     4<head> 
     5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
     6<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" /> 
     7<title></title> 
     8<link rel="stylesheet" href="../css/bep.css" type="text/css" /> 
     9</head> 
     10<body> 
     11<div class="document"> 
     12 
     13<div id="upper" class="clear"> 
     14<div id="wrap"> 
     15<div id="header"> 
     16<h1><a href="../index.html">BitTorrent<span>.org</span></a></h1> 
     17</div> 
     18<div id="nav"> 
     19<ul> 
     20<li><a href="../index.html">Home</a></li> 
     21<li><a href="../introduction.html">For Users</a></li> 
     22<li><span>For Developers</span></li> 
     23<!-- <li><a href="./blog">Blog</a></li> --> 
     24<li><a href="../donate.html">Donate!</a></li> 
     25</ul> 
     26</div> <!-- nav --> 
     27<!-- ### Begin Content ### --> 
     28<div id="second"> 
     29 
     30 
     31 
     32<table class="rfc2822 docutils field-list" frame="void" rules="none"> 
     33<col class="field-name" /> 
     34<col class="field-body" /> 
     35<tbody valign="top"> 
     36<tr class="field"><th class="field-name">BEP:</th><td class="field-body">0</td> 
     37</tr> 
     38<tr class="field"><th class="field-name">Title:</th><td class="field-body">Index of BitTorrent Enhancement Proposals</td> 
     39</tr> 
     40<tr class="field"><th class="field-name">Version:</th><td class="field-body">$Revision$</td> 
     41</tr> 
     42<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference external" href="https://svn.bittorrent.com/trac.cgi/browser/dotorg/trunk/html/beps/bep_0000.rst">$Date$</a></td> 
     43</tr> 
     44<tr class="field"><th class="field-name">Author:</th><td class="field-body">David Harrison &lt;dave&#32;&#97;t&#32;bittorrent.com&gt;</td> 
     45</tr> 
     46<tr class="field"><th class="field-name">Status:</th><td class="field-body">Active</td> 
     47</tr> 
     48<tr class="field"><th class="field-name">Type:</th><td class="field-body">Process</td> 
     49</tr> 
     50<tr class="field"><th class="field-name">Created:</th><td class="field-body">10-Jan-2008</td> 
     51</tr> 
     52<tr class="field"><th class="field-name">Post-History:</th><td class="field-body"></td> 
     53</tr> 
     54</tbody> 
     55</table> 
     56<hr /> 
     57<p>The BitTorrent Community Forum coordinates the development of the 
     58BitTorrent protocol suite and its reference implementation. It is the 
     59wish of Bram Cohen that the BitTorrent mainline python implementation 
     60remain open source and that the protocol development process be 
     61modelled after the Python Enhancement Proposal (PEP) process.</p> 
     62<p>This document indexes all BitTorrent Enhancement Proposals (BEPs). 
     63When a new proposal is submitted, one of the BitTorrent.org editors 
     64assigns a BEP number and updates this index appropriately.  The process 
     65is modelled after the PEP process used in the python community <a class="footnote-reference" href="#python" id="id1">[1]</a>.  Each 
     66document has a number that never changes and the history of document is 
     67maintained in subversion <a class="footnote-reference" href="#svn" id="id2">[2]</a>.</p> 
     68<table border="1" class="docutils"> 
     69<colgroup> 
     70<col width="13%" /> 
     71<col width="88%" /> 
     72</colgroup> 
     73<thead valign="bottom"> 
     74<tr><th class="head">Num</th> 
     75<th class="head">Title</th> 
     76</tr> 
     77</thead> 
     78<tbody valign="top"> 
     79<tr><td><span class="raw-html"><A HREF="bep_0000.html">0</A></span></td> 
     80<td>Index of BitTorrent Enhancement Proporsals</td> 
     81</tr> 
     82<tr><td><span class="raw-html"><A HREF="bep_0001.html">1</A></span></td> 
     83<td>The BEP Process</td> 
     84</tr> 
     85<tr><td><span class="raw-html"><A HREF="bep_0002.html">2</A></span></td> 
     86<td>Sample reStructured Text BEP Template</td> 
     87</tr> 
     88<tr><td><span class="raw-html"><A HREF="bep_0003.html">3</A></span></td> 
     89<td>The BitTorrent Protocol Specification</td> 
     90</tr> 
     91<tr><td><span class="raw-html"><A HREF="bep_0004.html">4</A></span></td> 
     92<td>Known Number Allocations</td> 
     93</tr> 
     94<tr><td><span class="raw-html"><A HREF="bep_0005.html">5</A></span></td> 
     95<td>DHT Protocol</td> 
     96</tr> 
     97<tr><td><span class="raw-html"><A HREF="bep_0006.html">6</A></span></td> 
     98<td>Fast Extension</td> 
     99</tr> 
     100<tr><td><span class="raw-html"><A HREF="bep_0007.html">7</A></span></td> 
     101<td>IPv6 Tracker Extension</td> 
     102</tr> 
     103<tr><td><span class="raw-html"><A HREF="bep_0008.html">8</A></span></td> 
     104<td>Tracker Peer Obfuscation</td> 
     105</tr> 
     106<tr><td><span class="raw-html"><A HREF="bep_0009.html">9</A></span></td> 
     107<td>Metadata Extension</td> 
     108</tr> 
     109<tr><td><span class="raw-html"><A HREF="bep_0009.html">10</A></span></td> 
     110<td>Extension Protocol</td> 
     111</tr> 
     112<tr><td><span class="raw-html"><A HREF="bep_1000.html">1000</A></span></td> 
     113<td>Pending Standards Track Documents</td> 
     114</tr> 
     115</tbody> 
     116</table> 
     117<table class="docutils footnote" frame="void" id="python" rules="none"> 
     118<colgroup><col class="label" /><col /></colgroup> 
     119<tbody valign="top"> 
     120<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td><a class="reference external" href="http://www.python.org/dev/peps/">http://www.python.org/dev/peps/</a></td></tr> 
     121</tbody> 
     122</table> 
     123<table class="docutils footnote" frame="void" id="svn" rules="none"> 
     124<colgroup><col class="label" /><col /></colgroup> 
     125<tbody valign="top"> 
     126<tr><td class="label"><a class="fn-backref" href="#id2">[2]</a></td><td><a class="reference external" href="http://svn.bittorrent.org">http://svn.bittorrent.org</a></td></tr> 
     127</tbody> 
     128</table> 
     129 
     130 
     131</div> 
     132        <div id="footer"> 
     133<hr/> 
     134</div> 
     135 
     136</div> 
     137</body> 
     138</html> 
  • dotorg/trunk_fixed/html/beps/bep_0001.rst

    r10525 r10535  
    2626Because the BEPs are maintained as text files in a versioned 
    2727repository, their revision history is the historical record of the 
    28 feature proposal [#svn]. 
     28feature proposal [#svn]_. 
    2929 
    3030BEP Types 
     
    8282Standards Track, Informational, or Process, gives it status "Draft", 
    8383and creates and checks-in the initial draft of the BEP to the 
    84 subversion repository [#svn]. The BEP editor will not unreasonably 
     84subversion repository. The BEP editor will not unreasonably 
    8585deny a BEP. Reasons for denying BEP status include duplication of 
    8686effort, being technically unsound, not providing proper motivation or 
     
    163163======= 
    164164 
    165 This document was derived heavily from `PEP-0001`_.  In many places 
    166 text was simply copied and modified.  Although the `PEP-0001`_ text 
     165This document was derived heavily from PEP-0001 [#PEP-1].  In many places 
     166text was simply copied and modified.  Although the PEP-0001 text 
    167167was written by Barry Warsaw, Jeremy Hylton, and David Goodger, they 
    168168are not responsible for its use in the BitTorent Enhancement Process, 
     
    178178guidance. 
    179179 
    180 :: [#svn] This historical record is available by the normal SVN 
    181 commands for retrieving older revisions. For those without direct 
    182 access to the SVN tree, you can browse the current and past BEP 
    183 revisions here: http://svn.bittorrent.org/beps/trunk/ 
     180.. [#svn] This historical record is available by the normal SVN 
     181          commands for retrieving older revisions. For those without direct 
     182          access to the SVN tree, you can browse the current and past BEP 
     183          revisions here: http://svn.bittorrent.org/beps/trunk/ 
    184184 
    185 :: _`PEP-0001`: http://www.python.org/dev/peps/pep-0001/ 
     185.. [#PEP-1] PEP-001: PEP Purposes and Guidelines, Warsaw, Hylton, Goodger. 
     186   (http://www.python.org/dev/peps/pep-0001) 
    186187 
    187188  
  • dotorg/trunk_fixed/html/beps/bep_0002.html

    r10505 r10535  
     1<?xml version="1.0" encoding="utf-8" ?> 
     2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
     4<head> 
     5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
     6<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" /> 
     7<title></title> 
     8<link rel="stylesheet" href="../css/bep.css" type="text/css" /> 
     9</head> 
     10<body> 
     11<div class="document"> 
     12 
     13<div id="upper" class="clear"> 
     14<div id="wrap"> 
     15<div id="header"> 
     16<h1><a href="../index.html">BitTorrent<span>.org</span></a></h1> 
     17</div> 
     18<div id="nav"> 
     19<ul> 
     20<li><a href="../index.html">Home</a></li> 
     21<li><a href="../introduction.html">For Users</a></li> 
     22<li><span>For Developers</span></li> 
     23<!-- <li><a href="./blog">Blog</a></li> --> 
     24<li><a href="../donate.html">Donate!</a></li> 
     25</ul> 
     26</div> <!-- nav --> 
     27<!-- ### Begin Content ### --> 
     28<div id="second"> 
     29 
     30 
     31 
     32<table class="rfc2822 docutils field-list" frame="void" rules="none"> 
     33<col class="field-name" /> 
     34<col class="field-body" /> 
     35<tbody valign="top"> 
     36<tr class="field"><th class="field-name">BEP:</th><td class="field-body">2</td> 
     37</tr> 
     38<tr class="field"><th class="field-name">Title:</th><td class="field-body">Sample reStructured Text BEP Template</td> 
     39</tr> 
     40<tr class="field"><th class="field-name">Version:</th><td class="field-body">$Revision$</td> 
     41</tr> 
     42<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference external" href="https://svn.bittorrent.com/trac.cgi/browser/dotorg/trunk/html/beps/bep_0002.rst">$Date$</a></td> 
     43</tr> 
     44<tr class="field"><th class="field-name">Author:</th><td class="field-body">David Harrison &lt;dave&#32;&#97;t&#32;bittorrent.com&gt;</td> 
     45</tr> 
     46<tr class="field"><th class="field-name">Status:</th><td class="field-body">Active</td> 
     47</tr> 
     48<tr class="field"><th class="field-name">Type:</th><td class="field-body">Process</td> 
     49</tr> 
     50<tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference external" href="http://www.bittorrent.org/beps/bep-0012">text/x-rst</a></td> 
     51</tr> 
     52<tr class="field"><th class="field-name">Created:</th><td class="field-body">02-Feb-2008</td> 
     53</tr> 
     54<tr class="field"><th class="field-name">Post-History:</th><td class="field-body"></td> 
     55</tr> 
     56</tbody> 
     57</table> 
     58<hr /> 
     59<div class="contents topic" id="contents"> 
     60<p class="topic-title first">Contents</p> 
     61<ul class="simple"> 
     62<li><a class="reference internal" href="#abstract" id="id22">Abstract</a></li> 
     63<li><a class="reference internal" href="#rationale" id="id23">Rationale</a></li> 
     64<li><a class="reference internal" href="#how-to-use-this-template" id="id24">How to Use This Template</a></li> 
     65<li><a class="reference internal" href="#restructuredtext-bep-formatting-requirements" id="id25">ReStructuredText BEP Formatting Requirements</a><ul> 
     66<li><a class="reference internal" href="#general" id="id26">General</a></li> 
     67<li><a class="reference internal" href="#section-headings" id="id27">Section Headings</a></li> 
     68<li><a class="reference internal" href="#paragraphs" id="id28">Paragraphs</a></li> 
     69<li><a class="reference internal" href="#inline-markup" id="id29">Inline Markup</a></li> 
     70<li><a class="reference internal" href="#block-quotes" id="id30">Block Quotes</a></li> 
     71<li><a class="reference internal" href="#literal-blocks" id="id31">Literal Blocks</a></li> 
     72<li><a class="reference internal" href="#lists" id="id32">Lists</a></li> 
     73<li><a class="reference internal" href="#tables" id="id33">Tables</a></li> 
     74<li><a class="reference internal" href="#hyperlinks" id="id34">Hyperlinks</a></li> 
     75<li><a class="reference internal" href="#footnotes" id="id35">Footnotes</a></li> 
     76<li><a class="reference internal" href="#images" id="id36">Images</a></li> 
     77<li><a class="reference internal" href="#comments" id="id37">Comments</a></li> 
     78<li><a class="reference internal" href="#escaping-mechanism" id="id38">Escaping Mechanism</a></li> 
     79</ul> 
     80</li> 
     81<li><a class="reference internal" href="#habits-to-avoid" id="id39">Habits to Avoid</a></li> 
     82<li><a class="reference internal" href="#resources" id="id40">Resources</a></li> 
     83<li><a class="reference internal" href="#acknowledgements" id="id41">Acknowledgements</a></li> 
     84<li><a class="reference internal" href="#references" id="id42">References</a></li> 
     85<li><a class="reference internal" href="#copyright" id="id43">Copyright</a></li> 
     86</ul> 
     87</div> 
     88<div class="section" id="abstract"> 
     89<h1>Abstract</h1> 
     90<p>This BEP provides a boilerplate or sample template for creating your 
     91own reStructuredText BEPs.  In conjunction with the content guidelines 
     92in BEP 1 <a class="footnote-reference" href="#bep-1" id="id1">[1]</a>, this should make it easy for you to conform your own 
     93BEPs to the format outlined below.</p> 
     94<p>Note: if you are reading this BEP via the web, you should first grab 
     95the text (reStructuredText) source of this BEP in order to complete 
     96the steps below.  <strong>DO NOT USE THE HTML FILE AS YOUR TEMPLATE!</strong></p> 
     97<p>To get the source this (or any) BEP, look at the top of the HTML page 
     98and click on the date &amp; time on the &quot;Last-Modified&quot; line.  It is a 
     99link to the source text in the BitTorrent.org subversion repository.</p> 
     100</div> 
     101<div class="section" id="rationale"> 
     102<h1>Rationale</h1> 
     103<p>BEP submissions come in a wide variety of forms, not all adhering 
     104to the format guidelines set forth below.  Use this template, in 
     105conjunction with the format guidelines below, to ensure that your 
     106BEP submission won't get automatically rejected because of form.</p> 
     107<p>ReStructuredText is offered as an alternative to plaintext BEPs, to 
     108allow BEP authors more functionality and expressivity, while 
     109maintaining easy readability in the source text.  The processed HTML 
     110form makes the functionality accessible to readers: live hyperlinks, 
     111styled text, tables, images, and automatic tables of contents, among 
     112other advantages.</p> 
     113</div> 
     114<div class="section" id="how-to-use-this-template"> 
     115<h1>How to Use This Template</h1> 
     116<p>To use this template you must first decide whether your BEP is going 
     117to be an Informational or Standards Track BEP.  Most BEPs are 
     118Standards Track because they propose a new feature for the BitTorrent 
     119system including the BitTorrent suite of protocols.  When in doubt, 
     120read BEP 1 for details or contact the BEP editors 
     121&lt;<a class="reference external" href="mailto:editor&#37;&#52;&#48;bittorrent&#46;org">editor<span>&#64;</span>bittorrent<span>&#46;</span>org</a>&gt;.</p> 
     122<p>Once you've decided which type of BEP yours is going to be, follow the 
     123directions below.</p> 
     124<ul> 
     125<li><p class="first">Make a copy of this file (<tt class="docutils literal"><span class="pre">.rst</span></tt> file, <strong>not</strong> HTML!)  and perform 
     126the following edits.</p> 
     127</li> 
     128<li><p class="first">Replace the &quot;BEP: 2&quot; header with &quot;BEP: XXX&quot; since you don't yet have 
     129a BEP number assignment.</p> 
     130</li> 
     131<li><p class="first">Change the Title header to the title of your BEP.</p> 
     132</li> 
     133<li><p class="first">Leave the Version and Last-Modified headers alone; we'll take care 
     134of those when we check your BEP into BitTorrent's Subversion repository. 
     135These headers consist of keywords (&quot;Revision&quot; and &quot;Date&quot; enclosed in 
     136&quot;$&quot;-signs) which are automatically expanded by the repository. 
     137Please do not edit the expanded date or revision text.</p> 
     138</li> 
     139<li><p class="first">Change the Author header to include your name, and optionally your 
     140email address.  Be sure to follow the format carefully: your name 
     141must appear first, and it must not be contained in parentheses. 
     142Your email address may appear second (or it can be omitted) and if 
     143it appears, it must appear in angle brackets.  It is okay to 
     144obfuscate your email address.</p> 
     145</li> 
     146<li><p class="first">If there is a mailing list for discussion of your new feature, add a 
     147Discussions-To header right after the Author header.  You should not 
     148add a Discussions-To header if the mailing list to be used is 
     149<a class="reference external" href="mailto:bittorrent-list&#37;&#52;&#48;bittorrent&#46;org">bittorrent-list<span>&#64;</span>bittorrent<span>&#46;</span>org</a>, or if discussions should be sent to 
     150you directly.  Most Informational BEPs don't have a Discussions-To 
     151header.</p> 
     152</li> 
     153<li><p class="first">Change the Status header to &quot;Draft&quot;.</p> 
     154</li> 
     155<li><p class="first">For Standards Track BEPs, change the Type header to &quot;Standards 
     156Track&quot;.</p> 
     157</li> 
     158<li><p class="first">For Informational BEPs, change the Type header to &quot;Informational&quot;.</p> 
     159</li> 
     160<li><p class="first">For Standards Track BEPs, if your feature depends on the acceptance 
     161of some other currently in-development BEP, add a Requires header 
     162right after the Type header.  The value should be the BEP number of 
     163the BEP yours depends on.  Don't add this header if your dependent 
     164feature is described in a Final BEP.</p> 
     165</li> 
     166<li><p class="first">Change the Created header to today's date.  Be sure to follow the 
     167format carefully: it must be in <tt class="docutils literal"><span class="pre">dd-mmm-yyyy</span></tt> format, where the 
     168<tt class="docutils literal"><span class="pre">mmm</span></tt> is the 3 English letter month abbreviation, i.e. one of Jan, 
     169Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.</p> 
     170</li> 
     171<li><p class="first">Leave Post-History alone for now; you'll add dates to this header 
     172each time you post your BEP to <a class="reference external" href="mailto:bittorrent-list&#37;&#52;&#48;bittorrent&#46;org">bittorrent-list<span>&#64;</span>bittorrent<span>&#46;</span>org</a>.  If 
     173you posted your BEP to the lists on August 14, 2001 and September 3, 
     1742001, the Post-History header would look like:</p> 
     175<pre class="literal-block"> 
     176Post-History: 14-Aug-2001, 03-Sept-2001 
     177</pre> 
     178<p>You must manually add new dates and check them in.  If you don't 
     179have check-in privileges, send your changes to the BEP editors.</p> 
     180</li> 
     181<li><p class="first">Add a Replaces header if your BEP obsoletes an earlier BEP.  The 
     182value of this header is the number of the BEP that your new BEP is 
     183replacing.  Only add this header if the older BEP is in &quot;final&quot; 
     184form, i.e. is either Accepted, Final, or Rejected.  You aren't 
     185replacing an older open BEP if you're submitting a competing idea.</p> 
     186</li> 
     187<li><p class="first">Now write your Abstract, Rationale, and other content for your BEP, 
     188replacing all this gobbledygook with your own text. Be sure to 
     189adhere to the format guidelines below, specifically on the 
     190prohibition of tab characters and the indentation requirements.</p> 
     191</li> 
     192<li><p class="first">Update your References and Copyright section.  Usually you'll place 
     193your BEP into the public domain, in which case just leave the 
     194Copyright section alone.  Alternatively, you can use the <a class="reference external" href="http://www.opencontent.org/openpub/">Open 
     195Publication License</a> <a class="footnote-reference" href="#id14" id="id15">[6]</a>, but public domain is still strongly 
     196preferred.</p> 
     197</li> 
     198<li><p class="first">Leave the Emacs stanza at the end of this file alone, including the 
     199formfeed character (&quot;^L&quot;, or <tt class="docutils literal"><span class="pre">\f</span></tt>).</p> 
     200</li> 
     201<li><p class="first">Send your BEP submission to the BEP editors at <a class="reference external" href="mailto:editor&#37;&#52;&#48;bittorrent&#46;org">editor<span>&#64;</span>bittorrent<span>&#46;</span>org</a>.</p> 
     202</li> 
     203</ul> 
     204</div> 
     205<div class="section" id="restructuredtext-bep-formatting-requirements"> 
     206<h1>ReStructuredText BEP Formatting Requirements</h1> 
     207<p>The following is a BEP-specific summary of reStructuredText syntax. 
     208For the sake of simplicity and brevity, much detail is omitted.  For 
     209more detail, see <a class="reference internal" href="#resources">Resources</a> below.  <a class="reference internal" href="#literal-blocks">Literal blocks</a> (in which no 
     210markup processing is done) are used for examples throughout, to 
     211illustrate the plaintext markup.</p> 
     212<div class="section" id="general"> 
     213<h2>General</h2> 
     214<p>You must adhere to the Emacs convention of adding two spaces at the 
     215end of every sentence.</p> 
     216<p>Tab characters must never appear in the document at all.  A BEP should 
     217include the standard Emacs stanza included by example at the bottom of 
     218this BEP.</p> 
     219</div> 
     220<div class="section" id="section-headings"> 
     221<h2>Section Headings</h2> 
     222<p>BEP headings must begin in column zero and the initial letter of each 
     223word must be capitalized as in book titles.  Acronyms should be in all 
     224capitals.  Section titles must be adorned with an underline, a single 
     225repeated punctuation character, which begins in column zero and must 
     226extend at least as far as the right edge of the title text (4 
     227characters minimum).  First-level section titles are underlined with 
     228&quot;=&quot; (equals signs), second-level section titles with &quot;-&quot; (hyphens), 
     229and third-level section titles with &quot;'&quot; (single quotes or 
     230apostrophes).  For example:</p> 
     231<pre class="literal-block"> 
     232First-Level Title 
     233================= 
     234 
     235Second-Level Title 
     236------------------ 
     237 
     238Third-Level Title 
     239''''''''''''''''' 
     240</pre> 
     241<p>If there are more than three levels of sections in your BEP, you may 
     242insert overline/underline-adorned titles for the first and second 
     243levels as follows:</p> 
     244<pre class="literal-block"> 
     245============================ 
     246First-Level Title (optional) 
     247============================ 
     248 
     249----------------------------- 
     250Second-Level Title (optional) 
     251----------------------------- 
     252 
     253Third-Level Title 
     254================= 
     255 
     256Fourth-Level Title 
     257------------------ 
     258 
     259Fifth-Level Title 
     260''''''''''''''''' 
     261</pre> 
     262<p>You shouldn't have more than five levels of sections in your BEP.  If 
     263you do, you should consider rewriting it.</p> 
     264<p>You must use two blank lines between the last line of a section's body 
     265and the next section heading.  If a subsection heading immediately 
     266follows a section heading, a single blank line in-between is 
     267sufficient.</p> 
     268<p>The body of each section is not normally indented, although some 
     269constructs do use indentation, as described below.  Blank lines are 
     270used to separate constructs.</p> 
     271</div> 
     272<div class="section" id="paragraphs"> 
     273<h2>Paragraphs</h2> 
     274<p>Paragraphs are left-aligned text blocks separated by blank lines. 
     275Paragraphs are not indented unless they are part of an indented 
     276construct (such as a block quote or a list item).</p> 
     277</div> 
     278<div class="section" id="inline-markup"> 
     279<h2>Inline Markup</h2> 
     280<p>Portions of text within paragraphs and other text blocks may be 
     281styled.  For example:</p> 
     282<pre class="literal-block"> 
     283Text may be marked as *emphasized* (single asterisk markup, 
     284typically shown in italics) or **strongly emphasized** (double 
     285asterisks, typically boldface).  ``Inline literals`` (using double 
     286backquotes) are typically rendered in a monospaced typeface.  No 
     287further markup recognition is done within the double backquotes, 
     288so they're safe for any kind of code snippets. 
     289</pre> 
     290</div> 
     291<div class="section" id="block-quotes"> 
     292<h2>Block Quotes</h2> 
     293<p>Block quotes consist of indented body elements.  For example:</p> 
     294<pre class="literal-block"> 
     295This is a paragraph. 
     296 
     297    This is a block quote. 
     298 
     299    A block quote may contain many paragraphs. 
     300</pre> 
     301<p>Block quotes are used to quote extended passages from other sources. 
     302Block quotes may be nested inside other body elements.  Use 4 spaces 
     303per indent level.</p> 
     304</div> 
     305<div class="section" id="literal-blocks"> 
     306<h2>Literal Blocks</h2> 
     307<!-- In the text below, double backquotes are used to denote inline 
     308literals.  "``::``" is written so that the colons will appear in a 
     309monospaced font; the backquotes (``) are markup, not part of the 
     310text.  See "Inline Markup" above. 
     311 
     312By the way, this is a comment, described in "Comments" below. --> 
     313<p>Literal blocks are used for code samples or preformatted ASCII art. To 
     314indicate a literal block, preface the indented text block with 
     315&quot;<tt class="docutils literal"><span class="pre">::</span></tt>&quot; (two colons).  The literal block continues until the end of 
     316the indentation.  Indent the text block by 4 spaces.  For example:</p> 
     317<pre class="literal-block"> 
     318This is a typical paragraph.  A literal block follows. 
     319 
     320:: 
     321 
     322    for a in [5,4,3,2,1]:   # this is program code, shown as-is 
     323        print a 
     324    print &quot;it's...&quot; 
     325    # a literal block continues until the indentation ends 
     326</pre> 
     327<p>The paragraph containing only &quot;<tt class="docutils literal"><span class="pre">::</span></tt>&quot; will be completely removed from 
     328the output; no empty paragraph will remain.  &quot;<tt class="docutils literal"><span class="pre">::</span></tt>&quot; is also 
     329recognized at the end of any paragraph.  If immediately preceded by 
     330whitespace, both colons will be removed from the output.  When text 
     331immediately precedes the &quot;<tt class="docutils literal"><span class="pre">::</span></tt>&quot;, <em>one</em> colon will be removed from 
     332the output, leaving only one colon visible (i.e., &quot;<tt class="docutils literal"><span class="pre">::</span></tt>&quot; will be 
     333replaced by &quot;<tt class="docutils literal"><span class="pre">:</span></tt>&quot;).  For example, one colon will remain visible 
     334here:</p> 
     335<pre class="literal-block"> 
     336Paragraph:: 
     337 
     338    Literal block 
     339</pre> 
     340</div> 
     341<div class="section" id="lists"> 
     342<h2>Lists</h2> 
     343<p>Bullet list items begin with one of &quot;-&quot;, &quot;*&quot;, or &quot;+&quot; (hyphen, 
     344asterisk, or plus sign), followed by whitespace and the list item 
     345body.  List item bodies must be left-aligned and indented relative to 
     346the bullet; the text immediately after the bullet determines the 
     347indentation.  For example:</p> 
     348<pre class="literal-block"> 
     349This paragraph is followed by a list. 
     350 
     351* This is the first bullet list item.  The blank line above the 
     352  first list item is required; blank lines between list items 
     353  (such as below this paragraph) are optional. 
     354 
     355* This is the first paragraph in the second item in the list. 
     356 
     357  This is the second paragraph in the second item in the list. 
     358  The blank line above this paragraph is required.  The left edge 
     359  of this paragraph lines up with the paragraph above, both 
     360  indented relative to the bullet. 
     361 
     362  - This is a sublist.  The bullet lines up with the left edge of 
     363    the text blocks above.  A sublist is a new list so requires a 
     364    blank line above and below. 
     365 
     366* This is the third item of the main list. 
     367 
     368This paragraph is not part of the list. 
     369</pre> 
     370<p>Enumerated (numbered) list items are similar, but use an enumerator 
     371instead of a bullet.  Enumerators are numbers (1, 2, 3, ...), letters 
     372(A, B, C, ...; uppercase or lowercase), or Roman numerals (i, ii, iii, 
     373iv, ...; uppercase or lowercase), formatted with a period suffix 
     374(&quot;1.&quot;, &quot;2.&quot;), parentheses (&quot;(1)&quot;, &quot;(2)&quot;), or a right-parenthesis 
     375suffix (&quot;1)&quot;, &quot;2)&quot;).  For example:</p> 
     376<pre class="literal-block"> 
     3771. As with bullet list items, the left edge of paragraphs must 
     378   align. 
     379 
     3802. Each list item may contain multiple paragraphs, sublists, etc. 
     381 
     382   This is the second paragraph of the second list item. 
     383 
     384   a) Enumerated lists may be nested. 
     385   b) Blank lines may be omitted between list items. 
     386</pre> 
     387<p>Definition lists are written like this:</p> 
     388<pre class="literal-block"> 
     389what 
     390    Definition lists associate a term with a definition. 
     391 
     392how 
     393    The term is a one-line phrase, and the definition is one 
     394    or more paragraphs or body elements, indented relative to 
     395    the term. 
     396</pre> 
     397</div> 
     398<div class="section" id="tables"> 
     399<h2>Tables</h2> 
     400<p>Simple tables are easy and compact but you are not required to use 
     401simple tables:</p> 
     402<pre class="literal-block"> 
     403=====  =====  ======= 
     404  A      B    A and B 
     405=====  =====  ======= 
     406False  False  False 
     407True   False  False 
     408False  True   False 
     409True   True   True 
     410=====  =====  ======= 
     411</pre> 
     412<p>There must be at least two columns in a table (to differentiate from 
     413section titles).  Column spans use underlines of hyphens (&quot;Inputs&quot; 
     414spans the first two columns):</p> 
     415<pre class="literal-block"> 
     416=====  =====  ====== 
     417   Inputs     Output 
     418------------  ------ 
     419  A      B    A or B 
     420=====  =====  ====== 
     421False  False  False 
     422True   False  True 
     423False  True   True 
     424True   True   True 
     425=====  =====  ====== 
     426</pre> 
     427<p>Text in a first-column cell starts a new row.  No text in the first 
     428column indicates a continuation line; the rest of the cells may 
     429consist of multiple lines.  For example:</p> 
     430<pre class="literal-block"> 
     431=====  ========================= 
     432col 1  col 2 
     433=====  ========================= 
     4341      Second column of row 1. 
     4352      Second column of row 2. 
     436       Second line of paragraph. 
     4373      - Second column of row 3. 
     438 
     439       - Second item in bullet 
     440         list (row 3, column 2). 
     441=====  ========================= 
     442</pre> 
     443</div> 
     444<div class="section" id="hyperlinks"> 
     445<h2>Hyperlinks</h2> 
     446<p>When referencing an external web page in the body of a BEP, you should 
     447include the title of the page in the text, with either an inline 
     448hyperlink reference to the URL or a footnote reference (see 
     449<a class="reference internal" href="#footnotes">Footnotes</a> below).  Do not include the URL in the body text of the 
     450BEP.</p> 
     451<p>Hyperlink references use backquotes and a trailing underscore to mark 
     452up the reference text; backquotes are optional if the reference text 
     453is a single word.  For example:</p> 
     454<pre class="literal-block"> 
     455In this paragraph, we refer to the `BitTorrent web site`_. 
     456</pre> 
     457<p>An explicit target provides the URL.  Put targets in a References 
     458section at the end of the BEP, or immediately after the reference. 
     459Hyperlink targets begin with two periods and a space (the &quot;explicit 
     460markup start&quot;), followed by a leading underscore, the reference text, 
     461a colon, and the URL (absolute or relative):</p> 
     462<pre class="literal-block"> 
     463.. _BitTorrent web site: http://www.bittorrent.org/ 
     464</pre> 
     465<p>The reference text and the target text must match (although the match 
     466is case-insensitive and ignores differences in whitespace).  Note that 
     467