Skip to content

Commit

Permalink
add path, add fix for dots in refs
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Aug 7, 2024
1 parent 7df1cea commit 97b296d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions docs/GenerateChipDeviceCtrlDoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,23 @@
# limitations under the License.
#

SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
FILENAME='ChipDeviceCtrlAPI.md'

if [[ $# -ne 1 ]]; then
echo 'usage: GenerateChipDeviceCtrlDoc.sh build_directory'
exit 1
echo 'usage: GenerateChipDeviceCtrlDoc.sh build_directory'
exit 1
fi

pydoc-markdown -m chip.ChipDeviceCtrl '{
pydoc-markdown -I ${SCRIPT_DIR}/../src/controller/python --py3 -m chip.ChipDeviceCtrl '{
renderer: {
type: markdown,
descriptive_class_title: false,
render_toc: true,
render_toc_title: "ChipDeviceCtrl.py API",
insert_header_anchors: true,
insert_header_anchors: false,
add_full_prefix: true,
}
}' >"$1"/ChipDeviceCtrlAPI.md
}' >"$1"/"$FILENAME"

awk '/\(\#chip.ChipDeviceCtrl/ {gsub(/\./, "", $0)} 1' $1/$FILENAME >$1/tmp && mv $1/tmp $1/$FILENAME

0 comments on commit 97b296d

Please sign in to comment.