Skip to content

Commit

Permalink
fix script issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lyie28 committed Nov 10, 2023
1 parent 44d5806 commit 2746e14
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions docs/generate_api_reference.sh
Original file line number Diff line number Diff line change
@@ -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 '/<p>Generated by <a href="https:\/\/pdoc3.github.io\/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc<\/cite> 0.10.0<\/a>.<\/p>/d' docs/blindai/*.html
sed -i '/<head>/a <meta name="description" content="Explore BlindAI\'s \'Audio\' class for Whisper-based audio-text transcription in Python, with Trusted Execution Environment support.">' docs/blindai/api.html
sed -i '/<head>/a <meta name="description" content="Use \'BlindAI Audio\' for Whisper-powered audio-text conversion\; ensure security with Trusted Execution Environments.">' docs/blindai/audio.html
sed -i '/<head>/a <meta name="description" content="Learn \'blindai.client\' for secure AI server connections, model uploads, and inferences. Boost data security with Python client module.">' docs/blindai/client.html
sed -i '/<head>/a <meta name="description" content="Dive into \'blindai.core\': Secure server connections, attestation, and privacy-focused features in BlindAI\'s core module.">' docs/blindai/core.html
sed -i '/<head>/a <meta name="description" content="Uncover \'BlindAI\' package: AI privacy, audio processing, secure connections, and more in a robust Python toolkit.">' docs/blindai/index.html
sed -i '/<head>/a <meta name="description" content="Master BlindAI testing: Start mock servers, validate AI solutions, and improve performance with BlindAI\'s testing tools.">' docs/blindai/testing.html
sed -i '/<head>/a <meta name="description" content="Use \'blindai.utils\' for utility functions like certificate conversion and Whisper Tiny 20 tokens. Streamline AI workflows.">' 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 '/<head>/a <meta name="description" content="Explore blindai.api for Whisper-based audio-text transcription in Python, with Trusted Execution Environment support.">' docs/blindai/api.html
sed -i '/<head>/a <meta name="description" content="Use blindai.audio for Whisper-powered audio-text conversion, ensure security with Trusted Execution Environments.">' docs/blindai/audio.html
sed -i '/<head>/a <meta name="description" content="Use blindai.client for secure AI server connections, model uploads, and inferences. Boost data security with Python client module.">' docs/blindai/client.html
sed -i '/<head>/a <meta name="description" content="Dive into blindai.core: Secure server connections, attestation, and privacy-focused features in the BlindAI core module.">' docs/blindai/core.html
sed -i '/<head>/a <meta name="description" content="Uncover blindai.package: AI privacy, audio processing, secure connections, and more in a robust Python toolkit.">' docs/blindai/index.html
sed -i '/<head>/a <meta name="description" content="Master blindai.testing: Start mock servers, validate AI solutions, and improve performance with BlindAI testing tools.">' docs/blindai/testing.html
sed -i '/<head>/a <meta name="description" content="Use blindai.utils for utility functions like certificate conversion and Whisper Tiny 20 tokens. Streamline AI workflows.">' docs/blindai/utils.html

0 comments on commit 2746e14

Please sign in to comment.