mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-04 22:57:20 +02:00

- Added zoraxy_plugin module api doc generating script - Added link to example source folder - Fixed a few minor typo
24 lines
880 B
Bash
24 lines
880 B
Bash
#/bin/bash
|
|
|
|
# Cd into zoraxy plugin directory
|
|
cd ../../src/mod/plugins/zoraxy_plugin/
|
|
|
|
|
|
# Add header to the documentation
|
|
echo "# Zoraxy Plugin APIs" > docs.md
|
|
echo "This API documentation is auto-generated from the Zoraxy plugin source code." >> docs.md
|
|
echo "" >> docs.md
|
|
echo "" >> docs.md
|
|
echo "<pre><code class='language-go'>" >> docs.md
|
|
go doc -all >> docs.md
|
|
echo "</code></pre>" >> docs.md
|
|
|
|
# Replace // import "imuslab.com/zoraxy/mod/plugins/zoraxy_plugin" with
|
|
# // import "{{your_module_package_name_in_go.mod}}/mod/plugins/zoraxy_plugin"
|
|
sed -i 's|// import "imuslab.com/zoraxy/mod/plugins/zoraxy_plugin"|// import "{{your_module_package_name_in_go.mod}}/mod/plugins/zoraxy_plugin"|g' docs.md
|
|
|
|
# Move the generated docs to the plugins/html directory
|
|
mv docs.md "../../../../docs/plugins/docs/zoraxy_plugin API.md"
|
|
|
|
echo "Done generating Zoraxy plugin documentation."
|