simoncozens / youseedee Goto Github PK
View Code? Open in Web Editor NEWInterface to the Unicode Character Database
Interface to the Unicode Character Database
Hey
You probably saw https://github.com/harfbuzz/youseedy
There I chose to use the ucdxml to fetch ALL properties. Did you consider that?
I reached here because it is an (undeclared) flux dependency, but I can’t get it to work.
I had to first install requests
(there are no listed dependencies), then it trackbacks:
Downloading Unicode Character Database...
[==================================================]Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/khaled/Development/attic/flux/Flux/__main__.py", line 128, in <module>
FluxEditor(proj).show()
File "/Users/khaled/Development/attic/flux/Flux/__main__.py", line 39, in __init__
self.shapingDebugger = QShapingDebugger(self.project)
File "/Users/khaled/Development/attic/flux/Flux/UI/qshapingdebugger.py", line 25, in __init__
self.shapeText()
File "/Users/khaled/Development/attic/flux/Flux/UI/qshapingdebugger.py", line 28, in shapeText
buf = Buffer(self.project.font.font, unicodes=self.text, direction="RTL")
File "/Users/khaled/Development/attic/fontfeatures/fontFeatures/jankyPOS/Buffer.py", line 72, in __init__
self.guess_segment_properties()
File "/Users/khaled/Development/attic/fontfeatures/fontFeatures/jankyPOS/Buffer.py", line 82, in guess_segment_properties
thisScript = ucd_data(u.codepoint)["Script"]
File "/Users/khaled/Development/attic/flux/env/lib/python3.8/site-packages/youseedee/__init__.py", line 176, in ucd_data
out.update(props["datareader"](file, codepoint))
File "/Users/khaled/Development/attic/flux/env/lib/python3.8/site-packages/youseedee/__init__.py", line 73, in dictget
fileentry["data"] = fileentry["reader"](filename)
File "/Users/khaled/Development/attic/flux/env/lib/python3.8/site-packages/youseedee/__init__.py", line 60, in parse_file_semicolonsep
with open(os.path.join(ucd_dir(), filename), "r", newline='') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/khaled/.youseedee/USECategory.txt
There are many files under ~/.youseedee
(yay for saving files in the home directory), but no USECategory.txt
indeed,
This currently break the tox test on the lang repo (youseedee 0.5.0 gets installed):
Traceback:
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_data_languages.py:23: in <module>
import youseedee
.tox/py/lib/python3.8/site-packages/youseedee/__init__.py:11: in <module>
from tqdm import tqdm
E ModuleNotFoundError: No module named 'tqdm'
Version 4.1 is on pypi but not in the repository.
The hand-written progress bar at https://github.com/simoncozens/youseedee/blob/master/lib/youseedee/__init__.py#L50 will flood the logs of GitHub actions, see screenshot below: (about 2000 lines of progress)
Possible idea (I didn't try on this project but have used it in the past), use tdqm: https://github.com/tqdm/tqdm
The returned Name
field is taken from field 2 of UnicodeData.txt, which is not always the name. Some code points’ names are the empty string and some are derived algorithmically.
$ python3 -m youseedee 0000
{'Age': '1.1',
'Block': 'Basic Latin',
'Canonical_Combining_Class': '0',
'East_Asian_Width': 'N',
'General_Category': 'Cc',
'Line_Break': 'CM',
'Name': '<control>',
'Name_Alias': 'NUL',
'Script': 'Common'}
$ python3 -m youseedee 4e00
{'Age': '1.1',
'Block': 'CJK Unified Ideographs',
'Canonical_Combining_Class': '0',
'East_Asian_Width': 'W',
'General_Category': 'Lo',
'Line_Break': 'ID',
'Name': '<CJK Ideograph, First>',
'Script': 'Han'}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.