haystack/.github/utils/pydoc-markdown.sh
Julian Risch db36d6277a
docs: Add readme sync for API docs 2.0 (#6173)
* add sync docs for preview

* add example config for audio docs

* hardcode version in renderer

* use custom renderer for preview docs

* update comment and excerpt
2023-10-27 14:53:03 +02:00

20 lines
474 B
Bash
Executable File

#!/bin/bash
set -e # Fails on any error in the following loop
export PYTHONPATH=$PWD/docs/pydoc # Make the renderers available to pydoc
cd docs/pydoc
rm -rf temp && mkdir temp
cd temp
for file in ../config/* ; do
echo "Converting $file..."
pydoc-markdown "$file"
done
# render preview markdown docs
cd ..
rm -rf temp-preview && mkdir temp-preview
cd temp-preview
for file in ../config-preview/* ; do
echo "Converting $file..."
pydoc-markdown "$file"
done