From 1b40abe37a9c3f3089e2e37f552b4142dd5754c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 28 Aug 2018 06:00:11 +0200 Subject: [PATCH] extensions-tool: Add a man page https://gitlab.gnome.org/GNOME/gnome-shell/issues/1234 --- meson.build | 4 + src/extensions-tool/man/gnome-extensions.txt | 100 +++++++++++++++++++ src/extensions-tool/man/meson.build | 7 ++ src/extensions-tool/man/stylesheet.xsl | 27 +++++ src/extensions-tool/meson.build | 4 + 5 files changed, 142 insertions(+) create mode 100644 src/extensions-tool/man/gnome-extensions.txt create mode 100644 src/extensions-tool/man/meson.build create mode 100644 src/extensions-tool/man/stylesheet.xsl diff --git a/meson.build b/meson.build index 2bd67399d..ac9ec176d 100644 --- a/meson.build +++ b/meson.build @@ -137,6 +137,10 @@ bash_completion = dependency('bash-completion', required: false) if get_option('man') xsltproc = find_program('xsltproc') + if get_option('extensions_tool') + a2x = find_program('a2x') + endif + subdir('man') endif diff --git a/src/extensions-tool/man/gnome-extensions.txt b/src/extensions-tool/man/gnome-extensions.txt new file mode 100644 index 000000000..aaf6f0d5c --- /dev/null +++ b/src/extensions-tool/man/gnome-extensions.txt @@ -0,0 +1,100 @@ +GNOME-EXTENSIONS(1) +=================== +:man manual: User Commands +:man source: GNOME-EXTENSIONS-TOOL +:doctype: manpage +:date: August 2018 + +NAME +---- +gnome-extensions - Command line tool for managing GNOME extensions + +SYNOPSIS +-------- +*gnome-extensions* help ['COMMAND'] + +*gnome-extensions* version + +*gnome-extensions* enable 'UUID' + +*gnome-extensions* disable 'UUID' + +*gnome-extensions* list ['OPTION'...] + +*gnome-extensions* create ['OPTION'...] + +DESCRIPTION +----------- +*gnome-extensions* is a utility that makes some common GNOME extensions +operations available on the command line. + +COMMANDS +-------- +*help* ['COMMAND']:: +Displays a short synopsis of the available commands or provides +detailed help on a specific command. + +*version*:: +Prints the program version. + +*enable* 'UUID':: +Enables the extension identified by 'UUID'. ++ +The command will not detect any errors from the extension itself, use the +*info* command to confirm that the extension state is *ENABLED*. ++ +If the extension is already enabled, the command will do nothing. + +*disable* 'UUID':: +Disables the extension identified by 'UUID'. ++ +If the extension is not enabled, the command will do nothing. + +*list* ['OPTION'...]:: +Displays a list of installed extensions. ++ +.Options + *--user*;; + Include extensions installed in the user's *$HOME* + + *--system*;; + Include extensions installed in the system + + *--enabled*;; + Include enabled extensions + + *--disabled*;; + Include disabled extensions + + *-d*;; + *--details*;; + Show some extra information for each extension + +*create* ['OPTION'...]:: +Creates a new extension from a template. ++ +.Options + *--name*='NAME'::: + Set the user-visible name in the extension's metadata + to 'NAME' + + *--description*='DESC'::: + Set the description in the extension's metadata to 'DESC' + + *--uuid*='UUID'::: + Set the unique extension ID in the metadata to 'UUID' + + *-i*::: + *--interactive*::: + Prompt for any extension metadata that hasn't been provided + on the command line + + +EXIT STATUS +----------- +On success 0 is returned, a non-zero failure code otherwise. + +BUGS +---- +The tool is part of the gnome-shell project, and bugs should be reported +in its issue tracker at https://gitlab.gnome.org/GNOME/gnome-shell/issues. diff --git a/src/extensions-tool/man/meson.build b/src/extensions-tool/man/meson.build new file mode 100644 index 000000000..643509c16 --- /dev/null +++ b/src/extensions-tool/man/meson.build @@ -0,0 +1,7 @@ +custom_target('gnome-extensions.1', + input: ['gnome-extensions.txt', 'stylesheet.xsl'], + output: 'gnome-extensions.1', + command: [a2x, '-D', '@OUTDIR@', '--xsl-file', '@INPUT1@', '-f', 'manpage', '@INPUT0@'], + install_dir: mandir + '/man1', + install: true +) diff --git a/src/extensions-tool/man/stylesheet.xsl b/src/extensions-tool/man/stylesheet.xsl new file mode 100644 index 000000000..047bd1b59 --- /dev/null +++ b/src/extensions-tool/man/stylesheet.xsl @@ -0,0 +1,27 @@ + + + + + + .PP + + + + + + + + + + .RS 4 + + .\" + + + + .RE + + + + diff --git a/src/extensions-tool/meson.build b/src/extensions-tool/meson.build index edd445a5e..d6f674b4a 100644 --- a/src/extensions-tool/meson.build +++ b/src/extensions-tool/meson.build @@ -32,3 +32,7 @@ if bash_completion.found() install_dir: bash_completion.get_pkgconfig_variable('completionsdir') ) endif + +if get_option('man') + subdir('man') +endif