1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

change header depth

This commit is contained in:
Kelly Brazil
2022-01-26 14:16:04 -08:00
parent 7028e87f9b
commit f8223023c3
4 changed files with 24 additions and 10 deletions

View File

@ -14,7 +14,14 @@ toc_config=$(cat <<'EOF'
],
"renderer": {
"type": "markdown",
"render_toc": true
"render_toc": true,
"header_level_by_type": {
"Module": 1,
"Class": 3,
"Method": 3,
"Function": 3,
"Data": 3
}
}
}
EOF
@ -32,7 +39,14 @@ config=$(cat <<'EOF'
}
],
"renderer": {
"type": "markdown"
"type": "markdown",
"header_level_by_type": {
"Module": 1,
"Class": 3,
"Method": 3,
"Function": 3,
"Data": 3
}
}
}
EOF
@ -41,19 +55,19 @@ EOF
cd jc
echo Building docs for: package
pydoc-markdown -m jc "${config}" > ../docs/readme.md
sed -i "" 's/^#### /### /g' ../docs/readme.md
# sed -i "" 's/^#### /### /g' ../docs/readme.md
echo Building docs for: lib
pydoc-markdown -m jc.lib "${toc_config}" > ../docs/lib.md
sed -i "" 's/^#### /### /g' ../docs/lib.md
# sed -i "" 's/^#### /### /g' ../docs/lib.md
echo Building docs for: utils
pydoc-markdown -m jc.utils "${toc_config}" > ../docs/utils.md
sed -i "" 's/^#### /### /g' ../docs/utils.md
# sed -i "" 's/^#### /### /g' ../docs/utils.md
echo Building docs for: universal parser
pydoc-markdown -m jc.parsers.universal "${toc_config}" > ../docs/parsers/universal.md
sed -i "" 's/^#### /### /g' ../docs/parsers/universal.md
# sed -i "" 's/^#### /### /g' ../docs/parsers/universal.md
# a bit of inception here... jc is being used to help
# automate the generation of its own documentation. :)
@ -81,5 +95,5 @@ do
echo "Compatibility: ${compatible}" >> ../docs/parsers/"${parser_name}".md
echo >> ../docs/parsers/"${parser_name}".md
echo "Version ${version} by ${author} (${author_email})" >> ../docs/parsers/"${parser_name}".md
sed -i "" 's/^#### /### /g' ../docs/parsers/"${parser_name}".md
# sed -i "" 's/^#### /### /g' ../docs/parsers/"${parser_name}".md
done