Files
go-i2p/callgraph.sh

18 lines
667 B
Bash
Raw Normal View History

2025-02-26 20:38:29 -05:00
#! /usr/bin/env sh
dirs=$(find lib/ -type d)
for dir in $dirs; do
files=$(find "$dir" -maxdepth 1 -type f -name "*.go")
#echo "Files in $dir: $files"
file=$(echo $files | awk '{print $1}')
if [ -z "$file" ]; then
echo "no go files, skipping"
continue
fi
packageLine=$(grep -E "^package" $file)
package=$(echo $packageLine | awk '{print $2}')
echo "Generating callgraph for $package"
2025-02-26 20:52:16 -05:00
go-callvis -nostd -focus "$package" -group pkg,type -format svg -file $dir/$package "github.com/go-i2p/go-i2p/$dir"
godocdown -template template.md -o "$dir/doc.md" "./$dir"
git add -v "$dir/$package.svg" "$dir/doc.md"
2025-02-26 20:38:29 -05:00
done