clean up documentation makefile and documentation generation script

This commit is contained in:
arvidn 2015-10-07 00:48:43 -04:00
parent 6a7b9d1c4c
commit 41b8429cd1
7 changed files with 1182 additions and 1282 deletions

View File

@ -172,11 +172,16 @@ building against a source distribution of boost.</p>
a specific toolset to use (compiler) you can just add that to the commandline.
For example:</p>
<pre class="literal-block">
bjam msvc-7.1 boost=source
bjam gcc-3.3 boost=source
bjam darwin-4.0 boost=source
bjam msvc-7.1
bjam gcc-3.3
bjam darwin-4.0
</pre>
<p>If you're building against a system installed boost, specify <tt class="docutils literal">boost=system</tt>.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">If the environment variable <tt class="docutils literal">BOOST_ROOT</tt> is not set, the jamfile will
attempt to link against &quot;installed&quot; boost libraries. i.e. assume the headers
and libraries are available in default search paths.</p>
</div>
<p>To build different versions you can also just add the name of the build
variant. Some default build variants in BBv2 are <tt class="docutils literal">release</tt>, <tt class="docutils literal">debug</tt>,
<tt class="docutils literal">profile</tt>.</p>
@ -187,7 +192,7 @@ can set the <tt class="docutils literal"><span class="pre">runtime-link</span></
or <tt class="docutils literal">static</tt>. Most operating systems will only allow linking shared against
the runtime, but on windows you can do both. Example:</p>
<pre class="literal-block">
bjam msvc-7.1 link=static runtime-link=static boost=source
bjam msvc-7.1 link=static runtime-link=static
</pre>
<div class="note">
<p class="first admonition-title">Note</p>
@ -254,18 +259,6 @@ For more build configuration flags see <a class="reference internal" href="#buil
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="docutils literal">boost</tt></td>
<td><ul class="first last simple">
<li><tt class="docutils literal">system</tt> - default. Tells the Jamfile that
boost is installed and should be linked against
the system libraries.</li>
<li><tt class="docutils literal">source</tt> - Specifies that boost is to be built
from source. The environment variable
<tt class="docutils literal">BOOST_ROOT</tt> must be defined to point to the
boost directory.</li>
</ul>
</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">boost-link</span></tt></td>
<td><ul class="first last simple">
<li><tt class="docutils literal">static</tt> - links statically against the boost

View File

@ -71,6 +71,7 @@ instructions for how to use it <a class="reference external" href="client_test.h
#include &quot;libtorrent/entry.hpp&quot;
#include &quot;libtorrent/bencode.hpp&quot;
#include &quot;libtorrent/session.hpp&quot;
#include &quot;libtorrent/torrent_info.hpp&quot;
</span>
<span class="keyword type">int</span> <span class="name function">main</span><span class="punctuation">(</span><span class="keyword type">int</span> <span class="name">argc</span><span class="punctuation">,</span> <span class="keyword type">char</span><span class="operator">*</span> <span class="name">argv</span><span class="punctuation">[])</span>
<span class="punctuation">{</span>
@ -539,6 +540,7 @@ print information about it to std out:</p>
<span class="comment preproc">#include &quot;libtorrent/entry.hpp&quot;
#include &quot;libtorrent/bencode.hpp&quot;
#include &quot;libtorrent/torrent_info.hpp&quot;
#include &quot;libtorrent/announce_entry.hpp&quot;
#include &quot;libtorrent/bdecode.hpp&quot;
#include &quot;libtorrent/magnet_uri.hpp&quot;
</span>

View File

@ -782,7 +782,9 @@ def linkify_symbols(string):
# print ' literal: "%s"' % l
ret.append(l)
continue
if l.endswith('::') or '.. code::' in l:
if l.strip() == '.. parsed-literal::' or \
l.strip().startswith('.. code::') or \
(not l.strip().startswith('..') and l.endswith('::')):
# print ' start literal: "%s"' % l
in_literal = True
words = l.split(' ')

View File

@ -1,6 +1,12 @@
# this makefile assumes that you have docutils and rst2pdf installed
ifneq ($(STAGE),)
WEB_PATH = ~/Documents/rasterbar/web/products/libtorrent
endif
ifndef RST2HTML
RST2HTML:=rst2html-3.4.py
endif
REFERENCE_TARGETS = \
reference \
@ -67,36 +73,48 @@ manual.rst: stats_counters.rst
troubleshooting_thumb.png: troubleshooting.png
convert troubleshooting.png -resize 800x800 troubleshooting_thumb.png
ifneq ($(STAGE),)
cp $@ $(WEB_PATH)/$@
endif
todo.html:gen_todo.py ../src/*.cpp ../include/libtorrent/*.hpp
python gen_todo.py
ifneq ($(STAGE),)
cp $@ $(WEB_PATH)/$@
endif
$(REFERENCE_TARGETS:=.rst):gen_reference_doc.py ../include/libtorrent/*.hpp ../include/libtorrent/kademlia/*.hpp manual.rst settings.rst stats_counters.rst
python gen_reference_doc.py
%.epub:%.rst
rst2epub $? $@
rst2epub --exit-status=2 $? $@
%.pdf:%.rst
rst2pdf $? -o $@ --stylesheets stylesheet
rst2pdf --exit-status=2 $? -o $@ --stylesheets stylesheet
%.html:%.rst
rst2html-3.4.py --template=template.txt --stylesheet-path=style.css --link-stylesheet --no-toc-backlinks $? > $@
rst2html-3.4.py --template=template2.txt --stylesheet-path=style.css --link-stylesheet --no-toc-backlinks $? > $(WEB_PATH)/$@
$(RST2HTML) --exit-status=2 --template=template.txt --stylesheet-path=style.css --link-stylesheet --no-toc-backlinks $? > $@
ifneq ($(STAGE),)
$(RST2HTML) --exit-status=2 --template=template2.txt --stylesheet-path=style.css --link-stylesheet --no-toc-backlinks $? > $(WEB_PATH)/$@
endif
%.png:%.dot
dot -Tpng $? >$@
ifneq ($(STAGE),)
cp $@ $(WEB_PATH)/$@
endif
%.eps:%.dot
dot -Teps $? >$@
ifneq ($(STAGE),)
cp $@ $(WEB_PATH)/$@
endif
%.png:%.diagram
java -jar /opt/local/share/java/ditaa0_9.jar -E $? $@
ditaa -E $? $@
ifneq ($(STAGE),)
cp $@ $(WEB_PATH)/$@
endif
clean:
rm -f $(TARGETS:=.html) $(TARGETS:=.pdf) settings.rst todo.html reference*.html reference*.rst

View File

@ -1294,7 +1294,10 @@ any). This is only supported by SOCKS5 and HTTP.
+------------------------+------+---------+
if true, peer connections are made (and accepted) over the
configured proxy, if any.
configured proxy, if any. Web seeds as well as regular bittorrent
peer connections are considered "peer connections". Anything
transporting actual torrent payload (trackers and DHT traffic are
not considered peer connections).
.. _auto_sequential:
@ -2061,6 +2064,8 @@ details, see QBSS_.
.. _active_seeds:
.. _active_checking:
.. _active_dht_limit:
.. _active_tracker_limit:
@ -2075,6 +2080,7 @@ details, see QBSS_.
<a name="active_downloads"></a>
<a name="active_seeds"></a>
<a name="active_checking"></a>
<a name="active_dht_limit"></a>
<a name="active_tracker_limit"></a>
<a name="active_lsd_limit"></a>
@ -2088,6 +2094,8 @@ details, see QBSS_.
+----------------------+------+---------+
| active_seeds | int | 5 |
+----------------------+------+---------+
| active_checking | int | 1 |
+----------------------+------+---------+
| active_dht_limit | int | 88 |
+----------------------+------+---------+
| active_tracker_limit | int | 1600 |
@ -2108,6 +2116,9 @@ torrents is ``min(active_downloads + active_seeds, active_limit)``.
``active_downloads`` and ``active_seeds`` are upper limits on the
number of downloading torrents and seeding torrents respectively.
Setting the value to -1 means unlimited.
``active_checking`` is the limit of number of checking torrents.
Note that this limit applies to started non-auto-managed torrents as
well (as long as they are the the checking_files state).
For example if there are 10 seeding torrents and 10 downloading
torrents, and ``active_downloads`` is 4 and ``active_seeds`` is 4,
@ -2117,8 +2128,9 @@ then there will be 2 downloading torrents and 4 seeding torrents
active. Torrents that are not auto managed are not counted against
these limits.
``active_limit`` is a hard limit on the number of active torrents.
This applies even to slow torrents.
``active_limit`` is a hard limit on the number of active (auto
managed) torrents. This limit also applies to slow torrents. It does
not apply to checking torrents.
``active_dht_limit`` is the max number of torrents to announce to
the DHT. By default this is set to 88, which is no more than one

File diff suppressed because one or more lines are too long

View File

@ -92,11 +92,12 @@ namespace dht
// If the torrent tracked contains a name, such a name
// must be stored as a string in peers["n"]
//
// If the scrape parameter is true, you should fill these keys:
// peers["BFpe"] - with the standard bit representation of a
// 256 bloom filter containing the downloaders
// peers["BFsd"] - with the standard bit representation of a
// 256 bloom filter containing the seeders
// If the scrape parameter is true, you should fill these keys::
//
// peers["BFpe"] - with the standard bit representation of a
// 256 bloom filter containing the downloaders
// peers["BFsd"] - with the standard bit representation of a
// 256 bloom filter containing the seeders
//
// If the scrape parameter is false, you should fill the
// key peers["values"] with a list containing a subset of