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