Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benkasminbullock/kvg
KanjiVG file read/write library
https://github.com/benkasminbullock/kvg
Last synced: about 2 months ago
JSON representation
KanjiVG file read/write library
- Host: GitHub
- URL: https://github.com/benkasminbullock/kvg
- Owner: benkasminbullock
- Created: 2023-05-01T03:14:27.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-20T03:45:18.000Z (6 months ago)
- Last Synced: 2024-06-20T15:30:35.665Z (6 months ago)
- Language: Go
- Size: 49.8 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This module allows a KanjiVG file to easily be read, parsed, and
written. It also contains functions which enable bulk editing of the
KanjiVG files.This library automatically renumbers XML ids when writing a file. For
example, if you exchange the order of the text elements in the Go
structure, the values of `id` of the `text` elements in the output
file will be numbered in the order of the Go structure, disregarding
the order they were in originally. If you change the top level name of
the character in the base element, the names of all of the other
elements will be changed. The `id` values of paths and groups are
renumbered in the order they appear in the structure, discarding their
original numbering. In other words, when reordering elements or adding
elements, the library user only needs to think about the tree of
`Child`, `Group`, `Text`, and `Path` elements, and does not need to
give the elements numbers by himself.There is an example, `read-write-test`, in the `cmd` subdirectory,
which reads all the files in `kvg.KVDir`, then writes the XML back out
again, to check that the formats are kept identical.