File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+
312set -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+
417cd docs/pydoc
518rm -rf temp && mkdir temp
619cd 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 "
1024done
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ detached = true # To avoid installing the dependencies f
176176dependencies = [" 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} "
180180delete-outdated = " python ./.github/utils/delete_outdated_docs.py {args}"
181181
182182[project .urls ]
You can’t perform that action at this time.
0 commit comments