diff options
Diffstat (limited to 'plugins/generate-list.sh')
-rwxr-xr-x | plugins/generate-list.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/plugins/generate-list.sh b/plugins/generate-list.sh new file mode 100755 index 0000000..c77cab0 --- /dev/null +++ b/plugins/generate-list.sh @@ -0,0 +1,44 @@ +#!/bin/sh +# SPDX-FileCopyrightText: 2020 Sébastien Wilmet <swilmet@gnome.org> +# SPDX-License-Identifier: GPL-3.0-or-later + +# This script generates a Markdown file with the names and descriptions of all +# official gedit plugins. + +write_list_for_plugins_dir() { + plugins_dir=$1 + + for plugin_desktop_file in `find "$plugins_dir" -name '*.plugin.desktop*'` + do + name=`grep -P '^Name=' "$plugin_desktop_file" | cut -d'=' -f2` + echo -n "- **$name** - " + + desc=`grep -P '^Description=' "$plugin_desktop_file" | cut -d'=' -f2` + echo "*$desc*" + done | sort +} + +write_content() { + echo 'gedit plugins' + echo '=============' + echo + echo 'Core plugins' + echo '------------' + echo + echo 'Plugins that are distributed with gedit itself.' + echo + + write_list_for_plugins_dir '.' + + echo + echo 'gedit-plugins package' + echo '---------------------' + echo + echo 'The gedit-plugins package contains useful plugins that are (most' + echo 'of the time) too specific to be distributed with gedit itself.' + echo + + write_list_for_plugins_dir '../../gedit-plugins/plugins' +} + +write_content > list-of-gedit-plugins.md |