-
Notifications
You must be signed in to change notification settings - Fork 54
Description
I am primarily interested in devhelp
documentation on Debian/Linux.
Here is what I tried:
wget https://github.com/PeterFeicht/cppreference-doc/releases/download/v20220730/cppreference-doc-20220730.tar.xz
tar xf cppreference-doc-20220730.tar.xz
cd cppreference-doc-20220730/
sudo apt install python3-pip
pip install premailer
sed -i "s/allow_loading_external_files=False/allow_loading_external_files=True/g" ~/.local/lib/python3.10/site-packages/premailer/premailer.py
make -j$(nproc) doc_devhelp
Which quickly gave me the following messages at the end:
...
HTML WARN: output/reference/en/c/language/operator_arithmetic.html:650:6:ERROR:HTML:ERR_TAG_NAME_MISMATCH: Unexpected end tag : li
HTML WARN: output/reference/en/c/language/operator_arithmetic.html:650:11:ERROR:HTML:ERR_TAG_NAME_MISMATCH: Unexpected end tag : ul
HTML WARN: output/reference/en/c/language/operator_arithmetic.html:651:6:ERROR:HTML:ERR_TAG_NAME_MISMATCH: Unexpected end tag : dd
HTML WARN: output/reference/en/c/language/operator_arithmetic.html:651:11:ERROR:HTML:ERR_TAG_NAME_MISMATCH: Unexpected end tag : dl
HTML WARN: output/reference/en/c/language/operator_arithmetic.html:656:6:ERROR:HTML:ERR_TAG_NAME_MISMATCH: Unexpected end tag : li
HTML WARN: output/reference/en/c/language/operator_arithmetic.html:656:11:ERROR:HTML:ERR_TAG_NAME_MISMATCH: Unexpected end tag : ul
HTML WARN: output/reference/en/c/language/operator_arithmetic.html:657:6:ERROR:HTML:ERR_TAG_NAME_MISMATCH: Unexpected end tag : dd
HTML WARN: output/reference/en/c/language/operator_arithmetic.html:657:11:ERROR:HTML:ERR_TAG_NAME_MISMATCH: Unexpected end tag : dl
./build_link_map.py
./index2devhelp.py /usr/share/cppreference/doc/html index-chapters-c.xml \
"C Standard Library reference" "cppreference-doc-en-c" "c" \
index-functions-c.xml "output/devhelp-index-c.xml"
./index2devhelp.py /usr/share/cppreference/doc/html index-chapters-cpp.xml \
"C++ Standard Library reference" "cppreference-doc-en-cpp" "cpp" \
index-functions-cpp.xml "output/devhelp-index-cpp.xml"
./fix_devhelp-links.py "output/devhelp-index-c.xml" \
"output/cppreference-doc-en-c.devhelp2"
./fix_devhelp-links.py "output/devhelp-index-cpp.xml" \
"output/cppreference-doc-en-cpp.devhelp2"
Could not find cpp/header/contract in mapping
Could not find cpp/numeric/special_math in mapping
Could not find cpp/iterator/readable_traits in mapping
Could not find cpp/memory/new/nothrow_t in mapping
Could not find cpp/memory/allocator_arg_t in mapping
Could not find cpp/utility/initializer_list/rbegin2 in mapping
Could not find cpp/utility/initializer_list/rend2 in mapping
Could not find cpp/chrono/operator""h in mapping
Could not find cpp/chrono/operator""min in mapping
Could not find cpp/chrono/operator""s in mapping
Could not find cpp/chrono/operator""ms in mapping
Could not find cpp/chrono/operator""us in mapping
Could not find cpp/chrono/operator""ns in mapping
Could not find cpp/chrono/operator""d in mapping
Could not find cpp/chrono/operator""y in mapping
Could not find cpp/utility/piecewise_construct_t in mapping
Could not find cpp/string/basic_string/operator""s in mapping
Could not find cpp/string/basic_string_view/begin_end_nonmem in mapping
Could not find cpp/string/basic_string_view/begin_end_nonmem in mapping
Could not find cpp/string/basic_string_view/begin_end_nonmem in mapping
Could not find cpp/string/basic_string_view/begin_end_nonmem in mapping
Could not find cpp/string/basic_string_view/begin_end_nonmem in mapping
Could not find cpp/string/basic_string_view/begin_end_nonmem in mapping
Could not find cpp/string/basic_string_view/begin_end_nonmem in mapping
Could not find cpp/string/basic_string_view/begin_end_nonmem in mapping
Could not find cpp/string/basic_string_view/begin_end_nonmem in mapping
Could not find cpp/string/basic_string_view/begin_end_nonmem in mapping
Could not find cpp/string/basic_string_view/begin_end_nonmem in mapping
Could not find cpp/string/basic_string_view/begin_end_nonmem in mapping
Could not find cpp/string/basic_string_view/operator""sv in mapping
Could not find cpp/numeric/complex/operator""i in mapping
Could not find cpp/numeric/complex/operator""i in mapping
Could not find cpp/numeric/complex/operator""i in mapping
Could not find cpp/experimental/fs/filesystem_error/operator= in mapping
The returned status is 0
so it looks like "success", but I am not sure what to make of those messages.
Then make -j$(nproc) all
took quite some time and sudo make install
, but both succeeded without warning or error messages, so that looks like a success.
However, if I look for any of the items reported above then devhelp
seems to find them in the index, but not their content:
So something is missing.
The online version operator""sv has ben modified on 21 September 2021, at 08:42
so this is not exactly new. I would appreciate any pointers where to look for a fix.
Here is how special_math
link is represented in output/link_map.xml
:
<file from="cpp/experimental/special_functions" to="en/cpp/experimental/special_math.html"/>
Online there are two versions of special math functions:
- cpp/experimental/special_math -- incomplete, obsolete, but present.
- cpp/numeric/special_functions -- complete C++17, which is very cool and I can actually locate them:
So this is not important.
Another page: cpp/header/contract has been deleted (probably in favor of concepts
), so this is also not important.
Then operator""sv
and similar operators are very handy, but there seems to be an issue with escaping quotes resulting in the following line in output/link_map.xml
:
<file from="cpp/string/basic_string_view/operator\" to="en/cpp/string/basic_string_view/operator_q__q_sv.html"/>
which is produced by build_link_map.py
, where the regular expression on line 51 fails to capture escaped quotes:
m = re.search('"wgPageName":"([^"]*)"', text)
therefore should be replaced with:
m = re.search(r'"wgPageName":"((\\.|[^"\\])*)"', text)
Then the escaped quotes need to be replaced with plain quotes after line 55:
title = m.group(1)
title = title.replace(r'\"', r'"')
Then the produced output/link_map.xml
contains "e;
instead of quote character which is correct xml. Then recompile, install and then it works!