Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
garabik committed Jul 14, 2017
2 parents 782c5f8 + 50e24e2 commit 64e966e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
5 changes: 4 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand Down
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -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 <garabik@kassiopeia.juls.savba.sk> Sun, 19 Mar 2017 09:52:06 +0100

unicode (2.4) unstable; urgency=medium

* fix unihan properties listing
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
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',
'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',
Expand Down
10 changes: 7 additions & 3 deletions unicode
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ else: # python2

from optparse import OptionParser

VERSION='2.4'
VERSION='2.5'


# list of terminals that support bidi
Expand Down Expand Up @@ -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 = {}
Expand Down Expand Up @@ -734,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)
Expand Down

0 comments on commit 64e966e

Please sign in to comment.