linux: rename scripts to km-* from PR 893

remove generated man pages, regenerate in 'make deb'
This commit is contained in:
glasseyes 2018-09-10 14:29:10 +07:00
parent b690524f73
commit b87e2da501
31 changed files with 68 additions and 222 deletions

View file

@ -1,2 +1 @@
recursive-include keyman_config/icons *
recursive-include fontconfig *

View file

@ -8,7 +8,7 @@ clean:
dist: clean
python3 setup.py sdist
deb: clean dist
deb: clean dist man
-mkdir make_deb
cd make_deb && tar xf ../dist/keyman_config-$(VERSION).tar.gz && \
mv keyman_config-$(VERSION) keyman-config-$(VERSION) && \
@ -17,10 +17,11 @@ deb: clean dist
cd make_deb/keyman-config-$(VERSION) && debuild -us -uc
man:
help2man -N ./get_kmp -o debian/man/get_kmp.1 -n "Download a Keyman keyboard package" -I maninc/get_kmp.inc
help2man -N ./install_kmp -o debian/man/install_kmp.1 -n "Install a Keyman keyboard package" -I maninc/install_kmp.inc
help2man -N ./keyman-config -o debian/man/keyman-config.1 -n "Keyman keyboards installation and information" -I maninc/keyman-config.inc
help2man -N ./kvk2ldml -o debian/man/kvk2ldml.1 -n "Convert a Keyman on-screen keyboard file to LDML" -I maninc/kvk2ldml.inc
help2man -N ./list_installed_kmp -o debian/man/list_installed_kmp.1 -n "List installed Keyman keyboard packages" -I maninc/list_installed_kmp.inc
help2man -N ./uninstall_kmp -o debian/man/uninstall_kmp.1 -n "Uninstall a Keyman keyboard package" -I maninc/uninstall_kmp.inc
mkdir -p debian/man
help2man -N ./km-package-get -o debian/man/km-package-get.1 -n "Download a Keyman keyboard package" -I maninc/km-package-get.inc
help2man -N ./km-package-install -o debian/man/km-package-install.1 -n "Install a Keyman keyboard package" -I maninc/km-package-install.inc
help2man -N ./km-config -o debian/man/km-config.1 -n "Keyman keyboards installation and information" -I maninc/km-config.inc
help2man -N ./km-kvk2ldml -o debian/man/km-kvk2ldml.1 -n "Convert a Keyman on-screen keyboard file to LDML" -I maninc/km-kvk2ldml.inc
help2man -N ./km-package-list-installed -o debian/man/km-package-list-installed.1 -n "List installed Keyman keyboard packages" -I maninc/km-package-list-installed.inc
help2man -N ./km-package-uninstall -o debian/man/km-package-uninstall.1 -n "Uninstall a Keyman keyboard package" -I maninc/km-package-uninstall.inc

View file

@ -67,6 +67,6 @@ Command line uninstaller for kmp
You will need the build dependencies as well as the runtime dependencies above
`sudo apt install dh-python python3-all debhelper`
`sudo apt install dh-python python3-all debhelper help2man`
Run `make deb`. This will build the Debian package in the make_deb directory.

View file

@ -1,2 +1,2 @@
./keyman_config/icons/* /usr/share/keyman/icons/
debian/keyman-config.desktop /usr/share/applications
debian/km-config.desktop /usr/share/applications

View file

@ -1,6 +1,6 @@
/usr/share/keyman-config/get_kmp /usr/bin/get_kmp
/usr/share/keyman-config/install_kmp /usr/bin/install_kmp
/usr/share/keyman-config/keyman-config /usr/bin/keyman-config
/usr/share/keyman-config/kvk2ldml /usr/bin/kvk2ldml
/usr/share/keyman-config/list_installed_kmp /usr/bin/list_installed_kmp
/usr/share/keyman-config/uninstall_kmp /usr/bin/uninstall_kmp
/usr/share/keyman-config/km-package-get /usr/bin/km-package-get
/usr/share/keyman-config/km-package-install /usr/bin/km-package-install
/usr/share/keyman-config/km-config /usr/bin/km-config
/usr/share/keyman-config/km-kvk2ldml /usr/bin/km-kvk2ldml
/usr/share/keyman-config/km-package-list-installed /usr/bin/km-package-list-installed
/usr/share/keyman-config/km-package-uninstall /usr/bin/km-package-uninstall

View file

@ -1,6 +1,6 @@
debian/man/get_kmp.1
debian/man/install_kmp.1
debian/man/keyman-config.1
debian/man/kvk2ldml.1
debian/man/list_installed_kmp.1
debian/man/uninstall_kmp.1
debian/man/km-package-get.1
debian/man/km-package-install.1
debian/man/km-config.1
debian/man/km-kvk2ldml.1
debian/man/km-package-list-installed.1
debian/man/km-package-uninstall.1

View file

@ -3,8 +3,8 @@ Name=Keyman Keyboards
Name[en_GB]=Keyman Keyboards
Comment=Configure Keyman keyboards
Comment[en_GB]=Configure Keyman keyboards
Exec=keyman-config
Icon=keyman-config
Exec=km-config
Icon=km-config
Terminal=false
Type=Application
StartupNotify=true

View file

@ -1,24 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH GET_KMP "1" "September 2018" "get_kmp version 10.99.1" "User Commands"
.SH NAME
get_kmp \- Download a Keyman keyboard package
.SH DESCRIPTION
usage: get_kmp [\-h] [\-\-version] id
.PP
Download Keyman keyboard package to \fI\,~/Downloads\/\fP
.SS "positional arguments:"
.TP
id
Keyman keyboard id
.SS "optional arguments:"
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-\-version\fR
show program's version number and exit
.SH "SEE ALSO"
install_kmp(1)
keyman-config(1)
list_installed_kmp(1)
uninstall_kmp(1)

View file

@ -1,26 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH INSTALL_KMP "1" "September 2018" "install_kmp version 10.99.1" "User Commands"
.SH NAME
install_kmp \- Install a Keyman keyboard package
.SH DESCRIPTION
usage: install_kmp [\-h] [\-f <kmpfile>] [\-k <keyboardid>] [\-\-version]
.PP
Install a Keyman keyboard, either a local .kmp file or specify a keyboard id
to download and install
.SS "optional arguments:"
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-f\fR <kmpfile>
Keyman kmp file
.TP
\fB\-k\fR <keyboardid>
Keyman keyboard id
.TP
\fB\-\-version\fR
show program's version number and exit
.SH "SEE ALSO"
keyman-config(1)
list_installed_kmp(1)
uninstall_kmp(1)

View file

@ -1,30 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH KEYMAN-CONFIG "1" "September 2018" "keyman-config version 10.99.1" "User Commands"
.SH NAME
keyman-config \- Keyman keyboards installation and information
.SH DESCRIPTION
Keyman makes it possible for you to type in over 1,000 languages on Windows,
macOS, iPhone, iPad, Android tablets and phones, and even instantly in your web browser.
Soon it will work on Linux and similar systems as well.
With the world's most powerful keyboarding engine, intuitive and rapid text input is now
possible in your language, and for over 99% of the global population's mother tongues!
keyman-config shows the currently installed Keyman keyboard packages and allows you to
view information about them. It enables you to download new keyboard packages from
the website or install from local files.
.PP
usage: keyman\-config [\-h] [\-\-version]
.PP
Keyman keyboards installation and information
.SS "optional arguments:"
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-\-version\fR
show program's version number and exit
.SH "SEE ALSO"
install_kmp(1)
list_installed_kmp(1)
uninstall_kmp(1)

View file

@ -1,31 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH KVK2LDML "1" "September 2018" "kvk2ldml version 10.99.1" "User Commands"
.SH NAME
kvk2ldml \- Convert a Keyman on-screen keyboard file to LDML
.SH DESCRIPTION
usage: kvk2ldml [\-h] [\-p] [\-k] [\-o LDMLFILE] [\-\-version] kvkfile
.PP
Convert a Keyman kvk on\-screen keyboard file to an LDML file. Optionally print
the details of the kvk file.
.SS "positional arguments:"
.TP
kvkfile
kvk file
.SS "optional arguments:"
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-p\fR, \fB\-\-print\fR
print kvk details
.TP
\fB\-k\fR, \fB\-\-keys\fR
if printing also print all keys
.TP
\fB\-o\fR LDMLFILE
output LDML file location
.TP
\fB\-\-version\fR
show program's version number and exit
.SH "SEE ALSO"
keyman-config(1)

View file

@ -1,22 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH LIST_INSTALLED_KMP "1" "September 2018" "list_installed_kmp version 10.99.1" "User Commands"
.SH NAME
list_installed_kmp \- List installed Keyman keyboard packages
.SH DESCRIPTION
usage: list_installed_kmp [\-h] [\-s] [\-\-version]
.PP
Show installed Keyman keyboards with name, version, id and description.
.SS "optional arguments:"
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-s\fR, \fB\-\-short\fR
short format of name, version, id
.TP
\fB\-\-version\fR
show program's version number and exit
.SH "SEE ALSO"
install_kmp(1)
keyman-config(1)
uninstall_kmp(1)

View file

@ -1,23 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH UNINSTALL_KMP "1" "September 2018" "uninstall_kmp version 10.99.1" "User Commands"
.SH NAME
uninstall_kmp \- Uninstall a Keyman keyboard package
.SH DESCRIPTION
usage: uninstall_kmp [\-h] [\-\-version] id
.PP
Uninstall Keyman keyboard package.
.SS "positional arguments:"
.TP
id
Keyman keyboard id
.SS "optional arguments:"
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-\-version\fR
show program's version number and exit
.SH "SEE ALSO"
install_kmp(1)
keyman-config(1)
list_installed_kmp(1)

View file

@ -20,14 +20,14 @@ def main():
name, ext = os.path.splitext(args.kvkfile)
# Check if input file extension is kvk
if ext != ".kvk":
print("kvk2ldml.py: error, input file %s is not a kvk file." % (args.kvkfile))
print("kvk2ldml.py [-h] [-k] [-p] [-o <ldml file>] <kvk file>")
print("km-kvk2ldml: error, input file %s is not a kvk file." % (args.kvkfile))
print("km-kvk2ldml [-h] [-k] [-p] [-o <ldml file>] <kvk file>")
sys.exit(2)
# Check if input kvk file exists
if not os.path.isfile(args.kvkfile):
print("kvk2ldml.py: error, input file %s does not exist." % (args.kvkfile))
print("kvk2ldml.py [-h] [-k] [-p] [-o <ldml file>] <kvk file>")
print("km-kvk2ldml: error, input file %s does not exist." % (args.kvkfile))
print("km-kvk2ldml [-h] [-k] [-p] [-o <ldml file>] <kvk file>")
sys.exit(2)
kvkData = parse_kvk_file(args.kvkfile)

View file

@ -15,19 +15,19 @@ def main():
args = parser.parse_args()
if args.k and args.f:
print("install_kmp.py: error: too many arguments: either install a local kmp file or specify a keyboard id to download and install.")
print("km-package-install: error: too many arguments: either install a local kmp file or specify a keyboard id to download and install.")
sys.exit(2)
if args.f:
name, ext = os.path.splitext(args.f)
if ext != ".kmp":
print("install_kmp.py Input file", args.f, "is not a kmp file.")
print("install_kmp.py -f <kmpfile>")
print("km-package-install: Input file", args.f, "is not a kmp file.")
print("km-package-install -f <kmpfile>")
sys.exit(2)
if not os.path.isfile(args.f):
print("install_kmp.py Keyman kmp file", args.f, "not found.")
print("install_kmp.py -f <kmpfile>")
print("km-package-install: Keyman kmp file", args.f, "not found.")
print("km-package-install -f <kmpfile>")
sys.exit(2)
install_kmp(args.f)
@ -35,22 +35,24 @@ def main():
installed_kmp_ver = get_kmp_version(args.k)
kbdata = get_keyboard_data(args.k)
if not kbdata:
print("install_kmp.py: error: Could not download keyboard data for", args.k)
print("km-package-install: error: Could not download keyboard data for", args.k)
sys.exit(3)
if installed_kmp_ver:
if kbdata['version'] == installed_kmp_ver:
print("install_kmp.py The %s version of the %s keyboard is already installed." % (installed_kmp_ver, args.k))
sys.exit(0)
print("km-package-install: The %s version of the %s keyboard is already installed." % (installed_kmp_ver, args.k))
sys.exit(1)
elif float(kbdata['version']) > float(installed_kmp_ver):
print("install_kmp.py A newer version of %s keyboard is available. Uninstalling old version %s then downloading and installing new version %s." % (args.k, installed_kmp_ver, kbdata['version']))
print("km-package-install: A newer version of %s keyboard is available. Uninstalling old version %s then downloading and installing new version %s." % (args.k, installed_kmp_ver, kbdata['version']))
uninstall_kmp(args.k)
kmpfile = get_kmp(args.k)
if kmpfile:
install_kmp(kmpfile, True)
else:
print("install_kmp.py: error: Could not download keyboard package", args.k)
print("km-package-install: error: Could not download keyboard package", args.k)
sys.exit(2)
else:
print("install_kmp.py: error: no arguments: either install a local kmp file or specify a keyboard id to download and install.")
print("km-package-install: error: no arguments: either install a local kmp file or specify a keyboard id to download and install.")
sys.exit(2)

View file

@ -1,5 +0,0 @@
[SEE ALSO]
install_kmp(1)
keyman-config(1)
list_installed_kmp(1)
uninstall_kmp(1)

View file

@ -1,4 +0,0 @@
[SEE ALSO]
keyman-config(1)
list_installed_kmp(1)
uninstall_kmp(1)

View file

@ -6,11 +6,11 @@ Soon it will work on Linux and similar systems as well.
With the world's most powerful keyboarding engine, intuitive and rapid text input is now
possible in your language, and for over 99% of the global population's mother tongues!
keyman-config shows the currently installed Keyman keyboard packages and allows you to
km-config shows the currently installed Keyman keyboard packages and allows you to
view information about them. It enables you to download new keyboard packages from
the website or install from local files.
[SEE ALSO]
install_kmp(1)
list_installed_kmp(1)
uninstall_kmp(1)
km-package-install(1)
km-package-list-installed(1)
km-package-uninstall(1)

View file

@ -0,0 +1,2 @@
[SEE ALSO]
km-config(1)

View file

@ -0,0 +1,5 @@
[SEE ALSO]
km-package-install(1)
km-config(1)
km-package-list-installed(1)
km-package-uninstall(1)

View file

@ -0,0 +1,4 @@
[SEE ALSO]
km-config(1)
km-package-list-installed(1)
km-package-uninstall(1)

View file

@ -0,0 +1,4 @@
[SEE ALSO]
km-package-install(1)
km-config(1)
km-package-uninstall(1)

View file

@ -0,0 +1,4 @@
[SEE ALSO]
km-package-install(1)
km-config(1)
km-package-list-installed(1)

View file

@ -1,2 +0,0 @@
[SEE ALSO]
keyman-config(1)

View file

@ -1,4 +0,0 @@
[SEE ALSO]
install_kmp(1)
keyman-config(1)
uninstall_kmp(1)

View file

@ -1,4 +0,0 @@
[SEE ALSO]
install_kmp(1)
keyman-config(1)
list_installed_kmp(1)

View file

@ -8,10 +8,10 @@ setup(
name="keyman_config",
version=__version__,
packages=find_packages(),
scripts=['keyman-config', 'get_kmp',
'install_kmp', 'kvk2ldml',
'uninstall_kmp',
'list_installed_kmp', ],
scripts=['km-config', 'km-package-get',
'km-package-install', 'km-kvk2ldml',
'km-package-uninstall',
'km-package-list-installed', ],
install_requires=[
'lxml', 'numpy', 'PIL', 'requests', 'requests-cache',