lib

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package lib implements gaga's auto-generation utility.

Features:

download & parse The UCD in XML (Unicode Character Database in XML).
generate the UCD in csv.
generate the UCDEX data based on the UCD.
generate the UCDEX in csv.
generate the unichar_tables (go source code) based on the UCDEX.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenUCD

func GenUCD(f io.Writer) error

GenUCD generates the UCD in CSV

func GenUCDEX

func GenUCDEX(f io.Writer) error

GenUCDEX generates the UCDEX in CSV

func Generate

func Generate(f io.Writer, genname string) error

Generate generates the array of UCDEX (Go source code)

Types

type Char

type Char struct {
	Cp  string `xml:"cp,attr"`
	Age string `xml:"age,attr"`
	Na  string `xml:"na,attr"`
	Gc  string `xml:"gc,attr"`
	Dt  string `xml:"dt,attr"`
	Dm  string `xml:"dm,attr"`
	Blk string `xml:"blk,attr"`
	Suc string `xml:"suc,attr"`
	Slc string `xml:"slc,attr"`
}

Char is the most important element of the UCD in XML

type UCD

type UCD struct {
	Chars []Char `xml:"repertoire>char"`
}

UCD is the top level element of the UCD in XML

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL