Skip to content

Commit

Permalink
Merge pull request #34 from carlopi/improve_docs
Browse files Browse the repository at this point in the history
Improve doc script: add excerpt, sections names to CamelCase, add lin…
  • Loading branch information
carlopi authored Jul 8, 2024
2 parents fe593bb + f92804c commit 0973231
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions scripts/generate_md.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,40 +64,49 @@ do
echo "---" > $EXTENSION_README
echo "layout: community_extension" >> $EXTENSION_README
echo "title: $extension" >> $EXTENSION_README
echo "excerpt: |" >> $EXTENSION_README
echo " DuckDB Community Extensions" >> $EXTENSION_README
if [ -s "extensions/$extension/description.yml" ]; then
echo -n " " >> $EXTENSION_README
cat extensions/$extension/description.yml | yq -r ".extension.description" >> $EXTENSION_README
echo "" >> $EXTENSION_README
cat extensions/$extension/description.yml >> $EXTENSION_README
echo "" >> $EXTENSION_README
echo -n "extension_star_count: " >> $EXTENSION_README
python3 scripts/get_stars.py extensions/$extension/description.yml $1 >> $EXTENSION_README
echo "" >> $EXTENSION_README
fi
echo "---" >> $EXTENSION_README
cat layout/default.md >> $EXTENSION_README

if [ -s "$DOCS/$extension/functions.md" ]; then
echo "### Added functions" >> $EXTENSION_README
echo "### Added Functions" >> $EXTENSION_README
echo "" >> $EXTENSION_README
cat $DOCS/$extension/functions.md >> $EXTENSION_README
echo "" >> $EXTENSION_README
fi
if [ -s "$DOCS/$extension/functions_overloads.md" ]; then
echo "### Added function overloads" >> $EXTENSION_README
echo "### Overloaded Functions" >> $EXTENSION_README
echo "" >> $EXTENSION_README
cat $DOCS/$extension/functions_overloads.md >> $EXTENSION_README
echo "" >> $EXTENSION_README
fi
if [ -s "$DOCS/$extension/types.md" ]; then
echo "### Added types" >> $EXTENSION_README
echo "### Added Types" >> $EXTENSION_README
echo "" >> $EXTENSION_README
cat $DOCS/$extension/types.md >> $EXTENSION_README
echo "" >> $EXTENSION_README
fi
if [ -s "$DOCS/$extension/settings.md" ]; then
echo "### Added settings" >> $EXTENSION_README
echo "### Added Settings" >> $EXTENSION_README
echo "" >> $EXTENSION_README
cat $DOCS/$extension/settings.md >> $EXTENSION_README
echo "" >> $EXTENSION_README
fi
echo "" >> $EXTENSION_README
echo "" >> $EXTENSION_README
echo "---" >> $EXTENSION_README
echo "" >> $EXTENSION_README

rm -rf $DOCS/$extension
done
Expand Down

0 comments on commit 0973231

Please sign in to comment.