From ca8ce89955d2d24c86a2872c9fe5983a8736dcc7 Mon Sep 17 00:00:00 2001 From: David Corbett Date: Fri, 28 Oct 2016 10:48:31 -0400 Subject: [PATCH 1/6] Look for Blocks.txt in ~/.unicode --- README | 5 ++++- unicode | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README b/README index d8339d0..5e84005 100644 --- a/README +++ b/README @@ -9,8 +9,11 @@ To use unicode utility, you need: working directory. - apt-get install unicode-data # Debian - dnf install unicode-ucd # Fedora + - if you want to see Unicode block information, you also need + Blocks.txt file, which you should put into /usr/share/unicode/, + ~/.unicode/ or current working directory. - if you want to see UniHan properties, you need also Unihan.txt file - which should be put into /usr/share/unicode/, ~./unicode/ or + which should be put into /usr/share/unicode/, ~/.unicode/ or current working directory. diff --git a/unicode b/unicode index c6bfcd2..c75b1c7 100755 --- a/unicode +++ b/unicode @@ -288,8 +288,9 @@ def do_init(): HomeUnihanData = os.path.join(HomeDir, "Unihan*") global UnihanDataGlobs UnihanDataGlobs = [HomeUnihanData, '/usr/share/unidata/Unihan*', '/usr/share/unicode-data/Unihan*', '/usr/share/unicode/Unihan*', './Unihan*'] + HomeUnicodeBlocks = os.path.join(HomeDir, "Blocks.txt") global UnicodeBlocksFiles - UnicodeBlocksFiles = ['/usr/share/unicode/Blocks.txt', '/usr/share/unicode-data/Blocks.txt', '/usr/share/unidata/Blocks.txt', './Blocks.txt'] + UnicodeBlocksFiles = [HomeUnicodeBlocks, '/usr/share/unicode/Blocks.txt', '/usr/share/unicode-data/Blocks.txt', '/usr/share/unidata/Blocks.txt', './Blocks.txt'] # cache where grepped unicode properties are kept global linecache linecache = {} From faa21fbf62385801c48dc272bd736426d8a477c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radovan=20Garab=C3=ADk?= Date: Sat, 29 Oct 2016 10:35:22 +0200 Subject: [PATCH 2/6] do not display control characters in tabular output --- unicode | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unicode b/unicode index 25e9a8e..6e2ffc0 100755 --- a/unicode +++ b/unicode @@ -735,7 +735,10 @@ def print_block(block): out(LTR+hexi+". ") for j in range(16): c = chr(i*16+j) - c_out = c + if unicodedata.category(c) == 'Cc': + c_out = ' ' + else: + c_out = c if unicodedata.combining(c): c_out = " "+c # fallback for python without east_asian_width (probably unnecessary, since this script does not work with <2.6 anyway) From 6a875851fa65cb282f1e72937d9526765f5851b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radovan=20Garab=C3=ADk?= Date: Sun, 19 Mar 2017 09:51:34 +0100 Subject: [PATCH 3/6] bump version --- unicode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unicode b/unicode index 6e2ffc0..a740c03 100755 --- a/unicode +++ b/unicode @@ -66,7 +66,7 @@ else: # python2 from optparse import OptionParser -VERSION='2.4' +VERSION='2.5' # list of terminals that support bidi From c2aa0ba0226615e8673d629738dc913e608a6b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radovan=20Garab=C3=ADk?= Date: Sun, 19 Mar 2017 09:51:49 +0100 Subject: [PATCH 4/6] bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a2741aa..14108d5 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ os.chdir(os.path.abspath(os.path.dirname(__file__))) setup(name='unicode', - version='2.4', + version='2.5', scripts=['unicode', 'paracode'], entry_points={'console_scripts': [ 'unicode = unicode:main', From e4ae7fd416e5445dce2d234666d12bd9f651af7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radovan=20Garab=C3=ADk?= Date: Sun, 19 Mar 2017 10:14:20 +0100 Subject: [PATCH 5/6] update changelog --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index bb4ec36..fa99f62 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +unicode (2.5) unstable; urgency=low + + * do not display control characters in tabular output + * Look for Blocks.txt in ~/.unicode + + -- Radovan GarabĂ­k Sun, 19 Mar 2017 09:52:06 +0100 + unicode (2.4) unstable; urgency=medium * fix unihan properties listing From 50e24e25e825c1bb3bc69af2e0ced90ceb27256e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radovan=20Garab=C3=ADk?= Date: Sun, 19 Mar 2017 17:08:12 +0100 Subject: [PATCH 6/6] only scripts work --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 14108d5..cbda150 100644 --- a/setup.py +++ b/setup.py @@ -8,9 +8,9 @@ setup(name='unicode', version='2.5', scripts=['unicode', 'paracode'], - entry_points={'console_scripts': [ - 'unicode = unicode:main', - 'paracode = paracode:main']}, +# entry_points={'console_scripts': [ +# 'unicode = unicode:main', +# 'paracode = paracode:main']}, description="Display unicode character properties", author="Radovan Garabik", author_email='radovan.garabik@kassiopeia.juls.savba.sk',