Skip to content

Commit 97b296d

Browse files
committed
add path, add fix for dots in refs
1 parent 7df1cea commit 97b296d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

docs/GenerateChipDeviceCtrlDoc.sh

+10-5
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,23 @@
1414
# limitations under the License.
1515
#
1616

17+
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
18+
FILENAME='ChipDeviceCtrlAPI.md'
19+
1720
if [[ $# -ne 1 ]]; then
18-
echo 'usage: GenerateChipDeviceCtrlDoc.sh build_directory'
19-
exit 1
21+
echo 'usage: GenerateChipDeviceCtrlDoc.sh build_directory'
22+
exit 1
2023
fi
2124

22-
pydoc-markdown -m chip.ChipDeviceCtrl '{
25+
pydoc-markdown -I ${SCRIPT_DIR}/../src/controller/python --py3 -m chip.ChipDeviceCtrl '{
2326
renderer: {
2427
type: markdown,
2528
descriptive_class_title: false,
2629
render_toc: true,
2730
render_toc_title: "ChipDeviceCtrl.py API",
28-
insert_header_anchors: true,
31+
insert_header_anchors: false,
2932
add_full_prefix: true,
3033
}
31-
}' >"$1"/ChipDeviceCtrlAPI.md
34+
}' >"$1"/"$FILENAME"
35+
36+
awk '/\(\#chip.ChipDeviceCtrl/ {gsub(/\./, "", $0)} 1' $1/$FILENAME >$1/tmp && mv $1/tmp $1/$FILENAME

0 commit comments

Comments
 (0)