Blame SOURCES/0006-Add-man-page-for-ibus-table-createdb.patch

b385cc
From 99b16e2159ba4234f4f804fe10348c9f3b2a8000 Mon Sep 17 00:00:00 2001
b385cc
From: Mike FABIAN <mfabian@redhat.com>
b385cc
Date: Thu, 18 Apr 2013 12:10:50 +0200
b385cc
Subject: [PATCH] Add man page for ibus-table-createdb
b385cc
b385cc
See https://bugzilla.redhat.com/show_bug.cgi?id=948454
b385cc
---
b385cc
 engine/Makefile.am              |  12 +++
b385cc
 engine/ibus-table-createdb.sgml | 206 ++++++++++++++++++++++++++++++++++++++++
b385cc
 engine/tabcreatedb.py           |  10 +-
b385cc
 3 files changed, 223 insertions(+), 5 deletions(-)
b385cc
 create mode 100644 engine/ibus-table-createdb.sgml
b385cc
b385cc
diff --git a/engine/Makefile.am b/engine/Makefile.am
b385cc
index f17afe3..1fb070e 100644
b385cc
--- a/engine/Makefile.am
b385cc
+++ b/engine/Makefile.am
b385cc
@@ -19,6 +19,11 @@
b385cc
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
b385cc
 #
b385cc
 
b385cc
+DOC2MAN = docbook2man
b385cc
+SGML = ibus-table-createdb.sgml
b385cc
+BUILT_MANS = ibus-table-createdb.1
b385cc
+man_MANS = $(BUILT_MANS)
b385cc
+
b385cc
 engine_table_PYTHON = \
b385cc
 	chinese_variants.py \
b385cc
 	factory.py \
b385cc
@@ -43,6 +48,8 @@ EXTRA_DIST = \
b385cc
 	ibus-table-createdb.in \
b385cc
 	ibus-engine-table.in \
b385cc
 	table.xml.in \
b385cc
+	$(SGML) \
b385cc
+	$(BUILT_MANS) \
b385cc
 	$(NULL)
b385cc
 
b385cc
 CLEANFILES = \
b385cc
@@ -57,6 +64,11 @@ MAINTAINERCLEANFILES = \
b385cc
 	Makefile.in \
b385cc
 	$(NULL)
b385cc
 
b385cc
+${man_MANS}: ${SGML}
b385cc
+	$(AM_V_GEN) $(RM) $@; \
b385cc
+	$(DOC2MAN) ${SGML}; \
b385cc
+	$(RM) manpage.*
b385cc
+
b385cc
 table.xml: table.xml.in
b385cc
 	( \
b385cc
 		libexecdir=${libexecdir}; \
b385cc
diff --git a/engine/ibus-table-createdb.sgml b/engine/ibus-table-createdb.sgml
b385cc
new file mode 100644
b385cc
index 0000000..86c8336
b385cc
--- /dev/null
b385cc
+++ b/engine/ibus-table-createdb.sgml
b385cc
@@ -0,0 +1,206 @@
b385cc
+
b385cc
+
b385cc
+
b385cc
+     page: `docbook-to-man manpage.sgml > manpage.1'.  You may view
b385cc
+     the manual page with: `docbook-to-man manpage.sgml | nroff -man |
b385cc
+     less'.  A typical entry in a Makefile or Makefile.am is:
b385cc
+
b385cc
+manpage.1: manpage.sgml
b385cc
+	docbook-to-man $< > $@
b385cc
+
b385cc
+
b385cc
+	The docbook-to-man binary is found in the docbook-to-man package.
b385cc
+	Please remember that if you create the nroff version in one of the
b385cc
+	debian/rules file targets (such as build), you will need to include
b385cc
+	docbook-to-man in your Build-Depends control field.
b385cc
+
b385cc
+  -->
b385cc
+
b385cc
+  
b385cc
+  Mike</firstname>">
b385cc
+  FABIAN</surname>">
b385cc
+  
b385cc
+  Apr 18, 2013</date>">
b385cc
+  
b385cc
+       allowed: see man(7), man(1). -->
b385cc
+  1</manvolnum>">
b385cc
+  mfabian@redhat.com</email>">
b385cc
+  
b385cc
+  ibus-table-createdb</refentrytitle>">
b385cc
+  
b385cc
+
b385cc
+  Debian</productname>">
b385cc
+  GNU">
b385cc
+  GPL">
b385cc
+]>
b385cc
+
b385cc
+<refentry>
b385cc
+  <refentryinfo>
b385cc
+    <address>
b385cc
+      &dhemail;
b385cc
+    </address>
b385cc
+    <author>
b385cc
+      &dhfirstname;
b385cc
+      &dhsurname;
b385cc
+    </author>
b385cc
+    <copyright>
b385cc
+      <year>2013</year>
b385cc
+      <holder>&dhusername;</holder>
b385cc
+    </copyright>
b385cc
+    &dhdate;
b385cc
+  </refentryinfo>
b385cc
+  <refmeta>
b385cc
+    &dhucpackage;
b385cc
+
b385cc
+    &dhsection;
b385cc
+  </refmeta>
b385cc
+  <refnamediv>
b385cc
+    <refname>&dhpackage;</refname>
b385cc
+
b385cc
+    <refpurpose>create ibus-table database from table source</refpurpose>
b385cc
+  </refnamediv>
b385cc
+  <refsynopsisdiv>
b385cc
+    <cmdsynopsis>
b385cc
+      <command>&dhpackage;</command>
b385cc
+
b385cc
+      <group>
b385cc
+        <arg><option>-n</option> <option><replaceable>name</replaceable></option></arg>
b385cc
+        <arg><option>--name</option> <option><replaceable>name</replaceable></option></arg>
b385cc
+      </group>
b385cc
+      <group>
b385cc
+        <arg><option>-s</option> <option><replaceable>source</replaceable></option></arg>
b385cc
+        <arg><option>--source</option> <option><replaceable>source</replaceable></option></arg>
b385cc
+      </group>
b385cc
+      <group>
b385cc
+        <arg><option>-e</option> <option><replaceable>extra</replaceable></option></arg>
b385cc
+        <arg><option>--extra</option> <option><replaceable>extra</replaceable></option></arg>
b385cc
+      </group>
b385cc
+      <group>
b385cc
+        <arg><option>-p</option> <option><replaceable>pinyin</replaceable></option></arg>
b385cc
+        <arg><option>--pinyin</option> <option><replaceable>pinyin</replaceable></option></arg>
b385cc
+      </group>
b385cc
+      <arg><option>-o</option></arg>
b385cc
+      <arg><option>--no-create-index</option></arg>
b385cc
+      <arg><option>-i</option></arg>
b385cc
+      <arg><option>--create-index-only</option></arg>
b385cc
+      <arg><option>-d</option></arg>
b385cc
+      <arg><option>--debug</option></arg>
b385cc
+      <sbr>
b385cc
+
b385cc
+     </cmdsynopsis>
b385cc
+  </refsynopsisdiv>
b385cc
+  <refsect1>
b385cc
+    <title>DESCRIPTION</title>
b385cc
+
b385cc
+    <para><command>&dhpackage;</command> creates a database for
b385cc
+      ibus-table from a source table.</para>
b385cc
+  </refsect1>
b385cc
+  <refsect1>
b385cc
+    <title>OPTIONS</title>
b385cc
+
b385cc
+    <para>This program follows the usual &gnu; command line syntax,
b385cc
+      with long options starting with two dashes (`-').  A summary of
b385cc
+      options is included below.</para>
b385cc
+
b385cc
+    <variablelist>
b385cc
+        <term><option>-n</option>
b385cc
+          <option>--name</option>
b385cc
+	  <option><replaceable>database-file</replaceable></option>
b385cc
+        </term>
b385cc
+        <listitem>
b385cc
+          <para><replaceable>database-file</replaceable> specifies the file which will contain the binary database for the IME.  The default is ''.</para>
b385cc
+        </listitem>
b385cc
+      </varlistentry>
b385cc
+        <term><option>-s</option>
b385cc
+          <option>--source</option>
b385cc
+	  <option><replaceable>source-file</replaceable></option>
b385cc
+        </term>
b385cc
+        <listitem>
b385cc
+          <para><replaceable>source-file</replaceable> specifies the file which contains the source of the IME.  The default is ''.</para>
b385cc
+        </listitem>
b385cc
+      </varlistentry>
b385cc
+      <varlistentry>
b385cc
+        <term><option>-e</option>
b385cc
+          <option>--extra</option>
b385cc
+	  <option><replaceable>extra-words-file</replaceable></option>
b385cc
+        </term>
b385cc
+        <listitem>
b385cc
+          <para><replaceable>extra-words-file</replaceable> specifies the file for the extra words for the IME.  The default is ''.</para>
b385cc
+        </listitem>
b385cc
+      </varlistentry>
b385cc
+      <varlistentry>
b385cc
+        <term><option>-p</option>
b385cc
+          <option>--pinyin</option>
b385cc
+	  <option><replaceable>pinyin-file</replaceable></option>
b385cc
+        </term>
b385cc
+        <listitem>
b385cc
+          <para><replaceable>pinyin-file</replaceable> specifies the source file for the pinyin.  The default is /usr/share/ibus-table/data/pinyin_table.txt.bz2.</para>
b385cc
+        </listitem>
b385cc
+      </varlistentry>
b385cc
+      <varlistentry>
b385cc
+        <term><option>-o</option>
b385cc
+          <option>--no-create-index</option>
b385cc
+        </term>
b385cc
+        <listitem>
b385cc
+          <para>Do not create an index for for a database (Only for distribution purposes, a normal user should not use this flag!)</para>
b385cc
+        </listitem>
b385cc
+      </varlistentry>
b385cc
+      <varlistentry>
b385cc
+        <term><option>-i</option>
b385cc
+          <option>--create-index-only</option>
b385cc
+        </term>
b385cc
+        <listitem>
b385cc
+          <para>Only create an index for an existing database.</para>
b385cc
+        </listitem>
b385cc
+      </varlistentry>
b385cc
+      <varlistentry>
b385cc
+        <term><option>-d</option>
b385cc
+          <option>--debug</option>
b385cc
+        </term>
b385cc
+        <listitem>
b385cc
+          <para>Print extra debug messages.</para>
b385cc
+        </listitem>
b385cc
+      </varlistentry>
b385cc
+    </variablelist>
b385cc
+  </refsect1>
b385cc
+
b385cc
+  <refsect1>
b385cc
+    <title>EXAMPLES</title>
b385cc
+
b385cc
+    <variablelist>
b385cc
+      <varlistentry>
b385cc
+        <term>ibus-table-createdb -n ipa-x-sampa.db -s ipa-x-sampa.txt</term>
b385cc
+        <listitem><para>Create the binary database <quote>ipa-x-sampa.db</quote> from the source file <quote>ipa-x-sampa.txt</quote>.</para></listitem>
b385cc
+      </varlistentry>
b385cc
+      <varlistentry>
b385cc
+        <term>ibus-table-createdb -i -n ipa-x-sampa.db</term>
b385cc
+        <listitem><para>Create an index for the database <quote>ipa-x-sampa.db</quote>.</para></listitem>
b385cc
+      </varlistentry>
b385cc
+    </variablelist>
b385cc
+
b385cc
+  </refsect1>
b385cc
+
b385cc
+  <refsect1>
b385cc
+    <title>AUTHOR</title>
b385cc
+
b385cc
+    <para>This manual page was written by &dhusername; &dhemail;.</para>
b385cc
+
b385cc
+  </refsect1>
b385cc
+</refentry>
b385cc
+
b385cc
+
b385cc
+Local variables:
b385cc
+mode: sgml
b385cc
+sgml-omittag:t
b385cc
+sgml-shorttag:t
b385cc
+sgml-minimize-attributes:nil
b385cc
+sgml-always-quote-attributes:t
b385cc
+sgml-indent-step:2
b385cc
+sgml-indent-data:t
b385cc
+sgml-parent-document:nil
b385cc
+sgml-default-dtd-file:nil
b385cc
+sgml-exposed-tags:nil
b385cc
+sgml-local-catalogs:nil
b385cc
+sgml-local-ecat-files:nil
b385cc
+End:
b385cc
+-->
b385cc
diff --git a/engine/tabcreatedb.py b/engine/tabcreatedb.py
b385cc
index 19ebacc..6694b13 100644
b385cc
--- a/engine/tabcreatedb.py
b385cc
+++ b/engine/tabcreatedb.py
b385cc
@@ -70,23 +70,23 @@ opt_parser.add_option( '-n', '--name',
b385cc
 
b385cc
 opt_parser.add_option( '-s', '--source',
b385cc
         action = 'store', dest='source', default = 'xingma.txt.bz2',
b385cc
-        help = 'tell me which file is the source file of IME, default is %default')
b385cc
+        help = 'specifies the file which contains the source file of the IME.  The default is %default')
b385cc
 
b385cc
 opt_parser.add_option( '-e', '--extra',
b385cc
         action = 'store', dest='extra', default = '',
b385cc
-        help = 'tell me which file is the extra words file for IME, default is %default')
b385cc
+        help = 'specifies the file for the extra words for the IME.  The default is %default')
b385cc
 
b385cc
 opt_parser.add_option( '-p', '--pinyin',
b385cc
         action = 'store', dest='pinyin', default = '/usr/share/ibus-table/data/pinyin_table.txt.bz2',
b385cc
-        help = 'tell me which file is the source file of pinyin, default is %default')
b385cc
+        help = 'specifies the source file  for the  pinyin.  The default is %default')
b385cc
 
b385cc
 opt_parser.add_option( '-o', '--no-create-index',
b385cc
         action = 'store_false', dest='index', default = True,
b385cc
-        help = 'do not create index on database, only for distrubution purpose, normal user should not invoke this flag!')
b385cc
+        help = 'do not create an index for a database (Only for distrubution purposes, a normal user should not use this flag!)')
b385cc
 
b385cc
 opt_parser.add_option( '-i', '--create-index-only',
b385cc
         action = 'store_true', dest='only_index', default = False,
b385cc
-        help = 'only create index on exist database')
b385cc
+        help = 'only create an index for an existing database')
b385cc
 
b385cc
 opt_parser.add_option( '-d', '--debug',
b385cc
         action = 'store_true', dest='debug', default = False,
b385cc
-- 
b385cc
1.8.4.2
b385cc