Skip to content

Commit 3207a76

Browse files
authored
chore: Update pydoc-markdown.sh (#9547)
* Make config path a $1 param ; Add usage in comment ; Add echo log * Update sync command
1 parent 9ed0b9b commit 3207a76

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/utils/pydoc-markdown.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
#!/bin/bash
22

3+
# Usage: ./pydoc-markdown.sh [CONFIG_PATH]
4+
#
5+
# Generate documentation from pydoc-markdown config files.
6+
#
7+
# Examples:
8+
# ./pydoc-markdown.sh # Uses default path: ../config/*
9+
# ./pydoc-markdown.sh ../config/api/* # Uses custom path
10+
# ./pydoc-markdown.sh /path/to/configs/* # Uses absolute path
11+
312
set -e # Fails on any error in the following loop
13+
14+
# Set default config path or use provided parameter
15+
CONFIG_PATH="${1:-../config/*}"
16+
417
cd docs/pydoc
518
rm -rf temp && mkdir temp
619
cd temp
7-
for file in ../config/* ; do
20+
echo "Processing config files in $CONFIG_PATH"
21+
for file in $CONFIG_PATH ; do
822
echo "Converting $file..."
923
pydoc-markdown "$file"
1024
done

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ detached = true # To avoid installing the dependencies f
176176
dependencies = ["haystack-pydoc-tools"]
177177

178178
[tool.hatch.envs.readme.scripts]
179-
sync = "./.github/utils/pydoc-markdown.sh"
179+
sync = "./.github/utils/pydoc-markdown.sh {args}"
180180
delete-outdated = "python ./.github/utils/delete_outdated_docs.py {args}"
181181

182182
[project.urls]

0 commit comments

Comments
 (0)