Added python3 support, added lookup utility #418
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Python 3 support
I have updated
kvg.py
andkanjivg.py
files to work with both Python 2 and Python 3 (tested 2.7 and 3.9).XML Handler Fixes
I have updated
KanjisHandler
andSVGHandler
XML-parsing classes inkanjivg.py
to work on the current SVG/XML structure. I may have been confused by them, but I could not get them to work, so I rewrote some functionality.SVGHandler
the changes were limited to accounting for the parent StrokePaths group and ignoring it.KanjisHandler
the changes involved re-writing how it processes each kanji in turn, as I could not figure out how it was meant to be used.New command-line utility
I added a utility for displaying a summary of a character based on SVG or XML files. It is useful for checking that the SVGHandler and KanjisHandler classes work correctly at first glance. It is also an example of how to use XML parsing.