make all names of settings be links in the documentation

This commit is contained in:
arvidn 2020-03-11 17:32:39 +01:00 committed by Arvid Norberg
parent 69d32696a1
commit bbdc25c69d
2 changed files with 13 additions and 0 deletions

View File

@ -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",

View File

@ -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