nationalization

package
Version: v0.0.0-...-816ba0d Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() (langs []string)

List returns the existing Nationalization languages.

func Sync

func Sync(nn ...Nationalization) (lang2Nationalization map[string]Nationalization)

Sync returns the synced nationalizations derived from input and Wikipedia langLinks. It stores locally ".query2pagecache.json.gz" cache file so that eventual future calls will be blazing fast.

Types

type Nationalization

type Nationalization struct {
	Language string
	Topics   []struct {
		Page
		Categories []Page `json:",omitempty"`
	}
	Filters []Page `json:",omitempty"`
}

Nationalization represents a Nationalization, the data that binds Negapedia to Wikipedia

func New

func New(lang string) (data Nationalization, err error)

New returns a Nationalization in the specified language if it does exist.

type Page

type Page struct {
	ID    uint32
	Title string
}

Page represents a page, consisting of a title and a page ID

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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