2023-04-18 21:12:39 +04:00
|
|
|
# Cleanup the generated html
|
|
|
|
rm -rf html
|
|
|
|
|
|
|
|
# Generate C++ API header of the DCE
|
|
|
|
cat esp_modem_command_declare.inc | clang++ -E -P -CC -xc++ -I../../components/esp_modem/include -DGENERATE_DOCS - | sed -n '1,/DCE command documentation/!p' > en/esp_modem_dce.hpp
|
|
|
|
|
|
|
|
# Generate C API header of the modem_api.h
|
|
|
|
cat esp_modem_command_declare.inc | clang -E -P -CC -xc -I../../components/esp_modem/include -DGENERATE_DOCS - | sed -n '1,/DCE command documentation/!p' > en/esp_modem_api_commands.h
|
|
|
|
|
|
|
|
|
|
|
|
# RST with links to C++ API
|
|
|
|
cat esp_modem_command_declare.inc | clang -E -P -xc -I../../components/esp_modem/include -DGENERATE_DOCS -DGENERATE_RST_LINKS - | sed 's/NL/\n/g' > en/cxx_api_links.rst
|
|
|
|
|
2022-06-22 14:49:37 +04:00
|
|
|
build-docs --target esp32 --language en
|
|
|
|
|
|
|
|
cp -rf _build/en/esp32/html .
|
|
|
|
rm -rf _build __pycache__
|
|
|
|
|
2023-04-18 21:12:39 +04:00
|
|
|
## Modifes some version and target fields of index.html
|
|
|
|
#echo "<script type="text/javascript">
|
|
|
|
#window.onload =(function() {
|
|
|
|
# var myAnchor = document.getElementById('version-select');
|
|
|
|
# var mySpan = document.createElement('input');
|
|
|
|
# mySpan.setAttribute('type', 'text');
|
|
|
|
# mySpan.setAttribute('maxLength', '10');
|
|
|
|
# mySpan.value = 'latest';
|
|
|
|
# mySpan.setAttribute('disabled', true);
|
|
|
|
# myAnchor.parentNode.replaceChild(mySpan, myAnchor);
|
|
|
|
#
|
|
|
|
# var myAnchor = document.getElementById('target-select');
|
|
|
|
# var mySpan = document.createElement('input');
|
|
|
|
# mySpan.setAttribute('type', 'text');
|
|
|
|
# mySpan.setAttribute('maxLength', '10');
|
|
|
|
# mySpan.value = 'all targets';
|
|
|
|
# mySpan.setAttribute('disabled', true);
|
|
|
|
# myAnchor.parentNode.replaceChild(mySpan, myAnchor);
|
|
|
|
#
|
|
|
|
#})();
|
|
|
|
#</script>" >> html/index.html
|
|
|
|
|
2022-06-22 14:49:37 +04:00
|
|
|
# Modifes some version and target fields of index.html
|
2023-04-18 21:12:39 +04:00
|
|
|
echo "<script type='text/javascript'>
|
2022-06-22 14:49:37 +04:00
|
|
|
window.onload =(function() {
|
|
|
|
var myAnchor = document.getElementById('version-select');
|
2023-04-18 21:12:39 +04:00
|
|
|
var mySpan = document.createElement('select');
|
|
|
|
mySpan.style.float = 'left';
|
|
|
|
|
|
|
|
latest_ver = document.createElement('option');
|
|
|
|
latest_ver.value = 'latest';
|
|
|
|
latest_ver.textContent = 'latest(master)';
|
|
|
|
mySpan.append(latest_ver);
|
|
|
|
|
|
|
|
var myArray = ['v1.0.0''];
|
|
|
|
for (var i = myArray.length - 1; i >= 0; i--) {
|
|
|
|
current_ver = document.createElement('option');
|
|
|
|
current_ver.value = myArray[i];
|
|
|
|
current_ver.textContent = 'release-'+myArray[i];
|
|
|
|
mySpan.append(current_ver);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-06-22 14:49:37 +04:00
|
|
|
myAnchor.parentNode.replaceChild(mySpan, myAnchor);
|
2023-04-18 21:12:39 +04:00
|
|
|
mySpan.addEventListener('change', function() {
|
|
|
|
window.location.href='https://docs.espressif.com/projects/esp-protocols/esp_modem/docs/'+event.target.value+'/index.html'
|
|
|
|
});
|
2022-10-11 16:31:57 +02:00
|
|
|
|
2022-06-22 14:49:37 +04:00
|
|
|
var myAnchor = document.getElementById('target-select');
|
|
|
|
var mySpan = document.createElement('input');
|
2023-04-18 21:12:39 +04:00
|
|
|
mySpan.style.float = 'left';
|
2022-06-22 14:49:37 +04:00
|
|
|
mySpan.setAttribute('type', 'text');
|
|
|
|
mySpan.setAttribute('maxLength', '10');
|
|
|
|
mySpan.value = 'all targets';
|
|
|
|
mySpan.setAttribute('disabled', true);
|
|
|
|
myAnchor.parentNode.replaceChild(mySpan, myAnchor);
|
|
|
|
|
|
|
|
})();
|
2023-04-18 21:12:39 +04:00
|
|
|
</script>" >> html/index.html
|