mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-05 20:58:28 +02:00
Added api doc
- Added zoraxy_plugin module api doc generating script - Added link to example source folder - Fixed a few minor typo
This commit is contained in:
23
docs/plugins/gen_zoraxy_plugin_doc.sh
Normal file
23
docs/plugins/gen_zoraxy_plugin_doc.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#/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."
|
Reference in New Issue
Block a user