feat(task): improve summary extraction in docs generation using Python AST parsing

This commit is contained in:
Janik von Rotz committed 2026-05-29 09:30:42 +02:00
1 parent 209c1f4272
commit abcdbeda1e
1 file changed
+1 -1
+1 -1
View File
@@ -163,7 +163,7 @@ docs() {
local module_dir=$(dirname "$manifest_file")
local module_name=$(basename "$module_dir")
echo "Add summary of $module_name to readme file."
local summary=$(grep 'summary' "$manifest_file" -A 1 | tail -1)
local summary=$(python3 -c "import ast; d=ast.literal_eval(open('$manifest_file').read()); print(d.get('summary', '').replace('\n', ' ').strip())")
echo "| [$module_name]($module_name) | $summary |" >> 'README.md'
done
}