diff --git a/docs/gen_reference_doc.py b/docs/gen_reference_doc.py index 10871cfe0..a453e5a12 100644 --- a/docs/gen_reference_doc.py +++ b/docs/gen_reference_doc.py @@ -64,6 +64,17 @@ symbols = \ "peer-classes_": "manual-ref.html#peer-classes" } +# parse out names of settings, and add them to the symbols list, to get cross +# references working +with open('../src/settings_pack.cpp') as f: + for line in f: + line = line.strip() + if not line.startswith('SET('): + continue + + name = line.split('(')[1].split(',')[0] + symbols['settings_pack::' + name] = 'reference-Settings.html#' + name + static_links = \ { ".. _`BEP 3`: https://www.bittorrent.org/beps/bep_0003.html", diff --git a/docs/makefile b/docs/makefile index f6eda2362..bfe16c70c 100644 --- a/docs/makefile +++ b/docs/makefile @@ -108,10 +108,12 @@ $(REFERENCE_TARGETS:=.rst) plain_text_out.txt:gen_reference_doc.py ../include/li spell-check:plain_text_out.txt $(MANUAL_TARGETS:=.html) manual.rst settings.rst python filter-rst.py manual.rst >manual-plain.txt + python filter-rst.py tuning.rst >tuning-plain.txt python filter-rst.py settings.rst >settings-plain.txt python filter-rst.py upgrade_to_1.2.rst >upgrade-1_2-plain.txt hunspell -d hunspell/en_US -p hunspell/libtorrent.dic -l plain_text_out.txt >hunspell-report.txt hunspell -d hunspell/en_US -p hunspell/libtorrent.dic -l manual-plain.txt >>hunspell-report.txt + hunspell -d hunspell/en_US -p hunspell/libtorrent.dic -l tuning-plain.txt >>hunspell-report.txt hunspell -d hunspell/en_US -p hunspell/libtorrent.dic -l upgrade-1_2-plain.txt >>hunspell-report.txt hunspell -d hunspell/en_US -p hunspell/settings.dic -l settings-plain.txt >>hunspell-report.txt hunspell -d hunspell/en_US -p hunspell/libtorrent.dic -H -l $(MANUAL_TARGETS:=.html) >>hunspell-report.txt