diff --git a/docs/generate_api_reference.sh b/docs/generate_api_reference.sh index 34fb05cb..61b96062 100644 --- a/docs/generate_api_reference.sh +++ b/docs/generate_api_reference.sh @@ -1,18 +1,21 @@ -#!/bin/bash +#!/bin/sh +set -e # Exit if any command fails -# script to generate the python API reference -# pdoc3 must be installed (pip install pdoc3) -pip install pdoc3 +# Install pdoc3 for generating Python API documentation +pip install pdoc3 + +# Generate HTML documentation pdoc --html --skip-errors --template-dir docs/pdoc_template -o docs/ client/blindai --force + +# Remove pdoc3 version reference from generated HTML files sed -i '/

Generated by pdoc<\/cite> 0.10.0<\/a>.<\/p>/d' docs/blindai/*.html -sed -i '//a ' docs/blindai/api.html -sed -i '//a ' docs/blindai/audio.html -sed -i '//a ' docs/blindai/client.html -sed -i '//a ' docs/blindai/core.html -sed -i '//a ' docs/blindai/index.html -sed -i '//a ' docs/blindai/testing.html -sed -i '//a ' docs/blindai/utils.html -# script to generate the python API reference -# pdoc3 must be installed (pip install pdoc3) -set -e +# Add meta description tags to specific HTML files +sed -i '//a ' docs/blindai/api.html +sed -i '//a ' docs/blindai/audio.html +sed -i '//a ' docs/blindai/client.html +sed -i '//a ' docs/blindai/core.html +sed -i '//a ' docs/blindai/index.html +sed -i '//a ' docs/blindai/testing.html +sed -i '//a ' docs/blindai/utils.html +