File: generate-list.sh

package info (click to toggle)
gedit 48.1-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,636 kB
  • sloc: ansic: 47,496; python: 649; xml: 536; objc: 446; makefile: 205; sh: 62
file content (50 lines) | stat: -rwxr-xr-x 1,238 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/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'

	echo
	echo 'Third-party plugins'
	echo '-------------------'
	echo
	echo 'There are also [third-party gedit plugins](third-party-plugins.md).'
}

write_content > list-of-gedit-plugins.md