mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-06-26 22:00:13 +00:00
chore: Update pydoc-markdown.sh (#9547)
* Make config path a $1 param ; Add usage in comment ; Add echo log * Update sync command
This commit is contained in:
parent
9ed0b9b0bc
commit
3207a76d50
16
.github/utils/pydoc-markdown.sh
vendored
16
.github/utils/pydoc-markdown.sh
vendored
@ -1,10 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Usage: ./pydoc-markdown.sh [CONFIG_PATH]
|
||||
#
|
||||
# Generate documentation from pydoc-markdown config files.
|
||||
#
|
||||
# Examples:
|
||||
# ./pydoc-markdown.sh # Uses default path: ../config/*
|
||||
# ./pydoc-markdown.sh ../config/api/* # Uses custom path
|
||||
# ./pydoc-markdown.sh /path/to/configs/* # Uses absolute path
|
||||
|
||||
set -e # Fails on any error in the following loop
|
||||
|
||||
# Set default config path or use provided parameter
|
||||
CONFIG_PATH="${1:-../config/*}"
|
||||
|
||||
cd docs/pydoc
|
||||
rm -rf temp && mkdir temp
|
||||
cd temp
|
||||
for file in ../config/* ; do
|
||||
echo "Processing config files in $CONFIG_PATH"
|
||||
for file in $CONFIG_PATH ; do
|
||||
echo "Converting $file..."
|
||||
pydoc-markdown "$file"
|
||||
done
|
||||
|
@ -176,7 +176,7 @@ detached = true # To avoid installing the dependencies f
|
||||
dependencies = ["haystack-pydoc-tools"]
|
||||
|
||||
[tool.hatch.envs.readme.scripts]
|
||||
sync = "./.github/utils/pydoc-markdown.sh"
|
||||
sync = "./.github/utils/pydoc-markdown.sh {args}"
|
||||
delete-outdated = "python ./.github/utils/delete_outdated_docs.py {args}"
|
||||
|
||||
[project.urls]
|
||||
|
Loading…
x
Reference in New Issue
Block a user