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

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