Add notify-send manpage
Taken from Debian, converted to Docbook and fixed some issues. Closes: https://gitlab.gnome.org/GNOME/libnotify/issues/4
This commit is contained in:
parent
55eb69247f
commit
162d195869
|
@ -36,6 +36,8 @@ build:ubuntu:meson:
|
|||
ninja-build
|
||||
python3-pip
|
||||
python3-setuptools
|
||||
xsltproc
|
||||
docbook-xsl-ns
|
||||
- pip3 install meson
|
||||
script:
|
||||
- meson _build -Dgtk_doc=true -Ddocbook_docs=enabled -Dtests=true
|
||||
|
|
|
@ -25,3 +25,16 @@ endif
|
|||
if get_option('gtk_doc')
|
||||
subdir('reference')
|
||||
endif
|
||||
|
||||
if get_option('man')
|
||||
manpages = ['notify-send']
|
||||
|
||||
foreach page : manpages
|
||||
custom_target(page + '-man',
|
||||
input: page + '.xml',
|
||||
output: page + '.1',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: man1dir)
|
||||
endforeach
|
||||
endif
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<info>
|
||||
<date>November 2005</date>
|
||||
<productname>libnotify</productname>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<personname>Andre Filipe de Assuncao e Brito</personname>
|
||||
<email>decko@noisemakers.org</email>
|
||||
<contrib>Original author</contrib>
|
||||
</author>
|
||||
<author>
|
||||
<personname>Paul van Tilburg</personname>
|
||||
<email>paulvt@debian.org</email>
|
||||
<contrib>Original author</contrib>
|
||||
</author>
|
||||
<author>
|
||||
<personname>Riccardo Setti</personname>
|
||||
<email>giskard@debian.org</email>
|
||||
<contrib>Original author</contrib>
|
||||
</author>
|
||||
</authorgroup>
|
||||
</info>
|
||||
<refmeta>
|
||||
<refentrytitle>notify-send</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo class="manual">User Commands</refmiscinfo>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>notify-send</refname>
|
||||
<refpurpose>a program to send desktop notifications</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>notify-send</command>
|
||||
<arg choice="opt">
|
||||
<replaceable>OPTIONS</replaceable>
|
||||
</arg>
|
||||
<arg choice="req">
|
||||
<replaceable>summary</replaceable>
|
||||
</arg>
|
||||
<arg choice="opt">
|
||||
<replaceable>body</replaceable>
|
||||
</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsection>
|
||||
<info><title>Description</title></info>
|
||||
|
||||
<para>With <command>notify-send</command> you can send desktop notifications to the user via a notification daemon from the command line. These notifications can be used to inform the user about an event or display some form of information without getting in the user’s way.</para>
|
||||
</refsection>
|
||||
<refsection>
|
||||
<info><title>Options</title></info>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-?</option>, <option>--help</option></term>
|
||||
<listitem>
|
||||
<para>Show help and exit.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-u</option>, <option>--urgency</option>=<replaceable>LEVEL</replaceable></term>
|
||||
<listitem>
|
||||
<para>Specifies the urgency level (<literal>low</literal>, <literal>normal</literal>, <literal>critical</literal>).</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-t</option>, <option>--expire-time</option>=<replaceable>TIME</replaceable>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>The duration, in milliseconds, for the notification to appear on screen.</para>
|
||||
<para>(Ubuntu's Notify OSD and GNOME Shell both ignore this parameter.)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-i</option>, <option>--icon</option>=<replaceable>ICON</replaceable>[,<replaceable>ICON</replaceable>…]
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Specifies an icon filename or stock icon to display.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-c</option>, <option>--category</option>=<replaceable>TYPE</replaceable>[,<replaceable>TYPE</replaceable>…]
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Specifies the notification category.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-h</option>, <option>--hint</option>=<replaceable>TYPE</replaceable>:<replaceable>NAME</replaceable>:<replaceable>VALUE</replaceable> </term>
|
||||
<listitem>
|
||||
<para>Specifies basic extra data to pass. Valid types are <literal>INT</literal>, <literal>DOUBLE</literal>, <literal>STRING</literal> and <literal>BYTE</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsection>
|
||||
<refsection>
|
||||
<info><title>See also</title></info>
|
||||
|
||||
<para>The Desktop Notification Spec on <link xlink:href="http://www.galago-project.org/specs/notification/">http://www.galago-project.org/specs/notification/</link>.</para>
|
||||
</refsection>
|
||||
</refentry>
|
22
meson.build
22
meson.build
|
@ -31,6 +31,7 @@ default_includes = include_directories('.')
|
|||
prefix = get_option('prefix')
|
||||
includedir = join_paths(prefix, get_option('includedir'))
|
||||
docdir = join_paths(prefix, get_option('datadir'), 'doc', meson.project_name())
|
||||
man1dir = join_paths(prefix, get_option('mandir'), 'man1')
|
||||
|
||||
libnotify_deps = []
|
||||
extra_deps = []
|
||||
|
@ -51,6 +52,27 @@ configure_file(input: 'config.h.meson',
|
|||
output : 'config.h',
|
||||
configuration : conf)
|
||||
|
||||
if get_option('man')
|
||||
xsltproc = find_program('xsltproc', required: true)
|
||||
stylesheet = 'http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl'
|
||||
xsltproc_command = [
|
||||
xsltproc,
|
||||
'--nonet',
|
||||
'--stringparam', 'man.output.quietly', '1',
|
||||
'--stringparam', 'funcsynopsis.style', 'ansi',
|
||||
'--stringparam', 'man.th.extra1.suppress', '1',
|
||||
'-o', '@OUTPUT@',
|
||||
stylesheet,
|
||||
'@INPUT@',
|
||||
]
|
||||
|
||||
testrun = run_command(xsltproc, '--nonet', stylesheet)
|
||||
|
||||
if testrun.returncode() != 0
|
||||
error('DocBook stylesheet for generating man pages not found, you need to install docbook-xsl-ns or similar package.')
|
||||
endif
|
||||
endif
|
||||
|
||||
subdir('libnotify')
|
||||
subdir('tools')
|
||||
subdir('docs')
|
||||
|
|
|
@ -6,6 +6,10 @@ option('introspection',
|
|||
type: 'feature',
|
||||
value: 'enabled',
|
||||
description: 'Enable GObject introspection')
|
||||
option('man',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
description: 'Enable generating the manual page (depends on xsltproc)')
|
||||
option('gtk_doc',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
|
|
Loading…
Reference in New Issue