Documentation ¶
Overview ¶
Package dicutil provides methods for offline processing to build Pāli Dictionary. This package is for offline processing and not used in frontend code.
Index ¶
- func BuildSuccinctTrieFromDir(wordsJsonDir, trieJsonPath string) (err error)
- func BuildVFS(pkgName, wordJsonDir, outputDir string) (err error)
- func CreateMetadataGoCode(pkgName, metadataDir, outputGoFilePath string) error
- func CreatePrefixSymlink(prefix, root string) (err error)
- func CreateWordSymlink(word, root string) (err error)
- func EmbedPOJSONInGoCode(domain, localedir, pkgName, outputGoDataFilePath string) (err error)
- func GetOneDictionay(csv1, csv2, bookId string)
- func PO2JSONBytes(domain, localedir string) (b []byte, err error)
- func ParseDictionayBookCSV(inBookCsv, outJson string)
- func ParseDictionayWordCSV(csv1, csv2, outputdir string)
- func SaveCsv(data [][]string, bookId string)
- func SymlinkToRootIndexHtml(websiteroot string, words []string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMetadataGoCode ¶
CreateMetadataGoCode create a data.go file which embed metadata directly in Go code.
func CreatePrefixSymlink ¶
CreatePrefixSymlink create symbolic links for pages of Pali words to the root index.html of the website root directory. This is for deploying single page application (SPA) on GitHub Pages or GitLab Pages, which serve only static website content.
The URL path of prefix:
/browse/{{first char of word}}/
This page contains all Pali words starts with the prefix.
func CreateWordSymlink ¶
CreateWordSymlink create symbolic links for pages of Pali words to the root index.html of the website root directory. This is for deploying single page application (SPA) on GitHub Pages or GitLab Pages, which serve only static website content.
The URL path of word:
/browse/{{first char of word}}/{{word}}/
This page contains the definition of the Pali word.
func EmbedPOJSONInGoCode ¶
func GetOneDictionay ¶
func GetOneDictionay(csv1, csv2, bookId string)
func PO2JSONBytes ¶
PO2JSON converts PO files to JSON bytes.
func ParseDictionayBookCSV ¶
func ParseDictionayBookCSV(inBookCsv, outJson string)
Input is CSV file containing information of dictionary books of all languages. Output is parsed result and save in JSON file.
func ParseDictionayWordCSV ¶
func ParseDictionayWordCSV(csv1, csv2, outputdir string)
func SymlinkToRootIndexHtml ¶
SymlinkToRootIndexHtml creates symbolic links which points all pages of the website to the root index.html in the root directory of the website. The purpose is to deploy single page application (SPA) on GitHub Pages or GitLab Pages, which serves only static website contents.
Only one page: “/index.html“
All other webpages are symlinks to “/index.html“
Types ¶
This section is empty.