[gnome-photos/wip/rishi/manual] Add a manual




commit 22d3a3360c170ffb8f25d482cb7661dd49fea39a
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Nov 9 23:42:46 2020 +0100

    Add a manual
    
    Note that the MESON_ARGS variable is now called CONFIG_OPTS [1,2].
    
    [1] CITemplates commit 0ef03c4ce77aa75d
    
    [2] CITemplates commit 45034800e5373e6b
    
    https://gitlab.gnome.org/GNOME/gnome-photos/-/merge_requests/153

 .gitlab-ci.yml           |   1 +
 manuals/gnome-photos.xml | 192 +++++++++++++++++++++++++++++++++++++++++++++++
 manuals/meson.build      |  25 ++++++
 meson.build              |  11 +++
 meson_options.txt        |   1 +
 5 files changed, 230 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d49432d6..49ae7a5d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,6 +6,7 @@ variables:
 flatpak:
     image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
     variables:
+        CONFIG_OPTS: "-Ddogtail=false -Dmanuals=true"
         MANIFEST_PATH: "flatpak/org.gnome.Photos.json"
         FLATPAK_MODULE: "gnome-photos"
         APP_ID: "org.gnome.Photos"
diff --git a/manuals/gnome-photos.xml b/manuals/gnome-photos.xml
new file mode 100644
index 00000000..c370e310
--- /dev/null
+++ b/manuals/gnome-photos.xml
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<refentry id="gnome-photos.1">
+  <refentryinfo>
+    <title>gnome-photos</title>
+    <date>November 2020</date>
+    <productname>GNOME</productname>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>gnome-photos</refentrytitle>
+    <manvolnum>1</manvolnum>
+    <refmiscinfo class="manual">User Commands</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname>gnome-photos</refname>
+    <refpurpose>Access, organize and share your photos on GNOME</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>gnome-photos</command>
+      <group rep="repeat"><replaceable>OPTION</replaceable></group>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+
+  <refsect1>
+    <title>DESCRIPTION</title>
+    <para>
+      <command>gnome-photos</command> is an application to access, organize
+      and share your photos on GNOME. A simple and elegant replacement for
+      using a file manager to deal with photos. Enhance, crop and edit in a
+      snap. Seamless cloud integration is offered through GNOME Online
+      Accounts.
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>OPTIONS</title>
+    <variablelist>
+      <varlistentry>
+        <term><option>--help, -h</option></term>
+        <listitem>
+          <para>
+            Show a brief overview of all the options.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--help-all</option></term>
+        <listitem>
+          <para>
+            Show all the options in detail.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--help-gapplication</option></term>
+        <listitem>
+          <para>
+            Show all the GApplication options.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--help-gtk</option></term>
+        <listitem>
+          <para>
+            Show all the GTK options.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--empty-results</option></term>
+        <listitem>
+          <para>
+            Show the empty state.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--version</option></term>
+        <listitem>
+          <para>
+            Show the application's version.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--gapplication-service</option></term>
+        <listitem>
+          <para>
+            Enter GApplication service mode. To be used from D-Bus service
+            files.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--class=CLASS</option></term>
+        <listitem>
+          <para>
+            Program class as used by the window manager.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--display=DISPLAY</option></term>
+        <listitem>
+          <para>
+            X display to use.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--g-fatal-warnings</option></term>
+        <listitem>
+          <para>
+            Make all warnings fatal.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--gdk-debug=FLAGS</option></term>
+        <listitem>
+          <para>
+            GDK debugging flags to set.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--gdk-no-debug=FLAGS</option></term>
+        <listitem>
+          <para>
+            GDK debugging flags to unset.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--gtk-debug=FLAGS</option></term>
+        <listitem>
+          <para>
+            GTK debugging flags to set.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--gtk-no-debug=FLAGS</option></term>
+        <listitem>
+          <para>
+            GTK debugging flags to unset.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--gtk-module=MODULES</option></term>
+        <listitem>
+          <para>
+            Load additional GTK modules.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--name=NAME</option></term>
+        <listitem>
+          <para>
+            Program name as used by the window manager.
+          </para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>BUGS</title>
+    <para>
+      Please send bug reports to either the distribution bug tracker or the
+      upstream bug tracker at
+      <ulink url="https://gitlab.gnome.org/GNOME/gnome-photos/issues";></ulink>.
+      There are some debugging tips at
+      <ulink url="https://wiki.gnome.org/Apps/Photos/Debugging";></ulink>
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>SEE ALSO</title>
+    <para>
+      For further information, visit the website
+      <ulink url="https://wiki.gnome.org/Apps/Photos";></ulink>.
+    </para>
+  </refsect1>
+</refentry>
diff --git a/manuals/meson.build b/manuals/meson.build
new file mode 100644
index 00000000..fa629289
--- /dev/null
+++ b/manuals/meson.build
@@ -0,0 +1,25 @@
+xsltproc_command = [
+  xsltproc,
+  '--nonet',
+  '--output', '@OUTPUT@',
+  '--stringparam', 'funcsynopsis.style', 'ansi',
+  '--stringparam', 'man.authors.section.enabled', '0',
+  '--stringparam', 'man.copyright.section.enabled', '0',
+  '--stringparam', 'man.output.quietly', '1',
+  'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
+  '@INPUT@',
+]
+
+manual = 'gnome-photos'
+
+input = manual + '.xml'
+output = manual + '.1'
+
+custom_target(
+  output,
+  command: xsltproc_command,
+  input: input,
+  install: true,
+  install_dir: join_paths(photos_mandir, 'man1'),
+  output: output,
+)
diff --git a/meson.build b/meson.build
index 5a9519b6..9fed3721 100644
--- a/meson.build
+++ b/meson.build
@@ -12,6 +12,7 @@ photos_bindir = join_paths(photos_prefix, get_option('bindir'))
 photos_datadir = join_paths(photos_prefix, get_option('datadir'))
 photos_libexecdir = join_paths(photos_prefix, get_option('libexecdir'))
 photos_localedir = join_paths(photos_prefix, get_option('localedir'))
+photos_mandir = join_paths(photos_prefix, get_option('mandir'))
 
 photos_docdir = join_paths(photos_datadir, 'doc', meson.project_name())
 photos_libdir = join_paths(photos_prefix, get_option('libdir'), meson.project_name())
@@ -23,6 +24,7 @@ photos_namespace = 'org.gnome.Photos'
 
 photos_buildtype = get_option('buildtype')
 photos_installed_tests_enabled = get_option('installed_tests')
+photos_manuals_enabled = get_option('manuals')
 
 photos_installed_tests_template_tap = files('template-tap.test.in')
 
@@ -182,6 +184,10 @@ dbus_services_dir = dbus_dep.get_pkgconfig_variable(
   define_variable: ['datadir', photos_datadir],
 )
 
+if photos_manuals_enabled
+  xsltproc = find_program('xsltproc')
+endif
+
 configure_file(
   output: 'config.h',
   configuration: config_h,
@@ -202,6 +208,11 @@ install_data(
 
 subdir('data')
 subdir('src')
+
+if photos_manuals_enabled
+  subdir('manuals')
+endif
+
 subdir('po')
 subdir('tests')
 subdir('help')
diff --git a/meson_options.txt b/meson_options.txt
index f34b5cc0..ea67113d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,2 +1,3 @@
 option('dogtail', type: 'boolean', value: true, description: 'test using dogtail')
 option('installed_tests', type: 'boolean', value: false, description: 'Enable installation of some test 
cases')
+option('manuals', type: 'boolean', value: false, description: 'Enable manual pages')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]