Versions in this module Expand all Collapse all v0 v0.3.0 Jun 15, 2026 Changes in this version + func EdgeHelp() string + type CategoryNode struct + Name string + Title string + URL string type Client + func (c *Client) Walk(ctx context.Context, seeds []Seed, opts WalkOptions, emit func(*Node) error) error + type Edge string + const EdgeBacklinks + const EdgeCategories + const EdgeLinks + const EdgeMembers + const EdgeSubcats + func (e Edge) Target() NodeKind + type EdgeSet map[Edge]bool + func DefaultEdges() EdgeSet + func ParseEdges(spec string) (EdgeSet, error) + func (s EdgeSet) Has(e Edge) bool + func (s EdgeSet) List() []Edge + func (s EdgeSet) String() string + type Node struct + Category *CategoryNode + Depth int + Kind NodeKind + Page *Summary + Parent string + Via Edge + func (n *Node) Endpoint() string + type NodeKind string + const KindCategory + const KindPage + type Seed struct + Kind NodeKind + Ref string + func ParseSeed(ref string) (Seed, error) + type WalkOptions struct + Depth int + Edges EdgeSet + Fanout int + Max int + Note func(string) + type Walker struct + func NewWalker(g grapher) *Walker + func (w *Walker) Walk(ctx context.Context, seeds []Seed, opts WalkOptions, emit func(*Node) error) error v0.2.0 Jun 14, 2026 v0.1.0 Jun 14, 2026 Changes in this version + const CoreAPIBase + const DefaultDelay + const DefaultMaxlag + const DefaultRetries + const DefaultTimeout + const DumpsBase + const MetricsBase + const UserAgent + const WikidataSPARQL + var ErrNotFound = fmt.Errorf("not found") + func ConfigDir() string + func ConvertBoth(src, lang string) (md, txt string) + func HTMLToMarkdown(htmlStr string) string + func HTMLToText(htmlStr string) string + func NormalizeTitle(title string) string + func NotFound(err error) bool + func ParseTarget(input string) (title, host string) + func Projects() []string + func ShortenURI(s string) string + func StreamPages(path string, namespace int, withText bool, fn func(DumpPage) error) error + func VerifySha1(path, expected string) (bool, error) + func WikitextToMarkdown(src, lang string) string + func WikitextToText(src string) string + type APIError struct + Code string + Info string + func (e *APIError) Error() string + type Cache struct + func NewCache(dir string, enabled bool) *Cache + func (c *Cache) Clear() (int, error) + func (c *Cache) Dir() string + func (c *Cache) Get(key string, ttl time.Duration) ([]byte, bool) + func (c *Cache) Info() (count int, bytes int64) + func (c *Cache) Put(key string, data []byte) + type Category struct + NS int + Title string + URL string + type CategoryMember struct + NS int + Timestamp string + Title string + Type string + URL string + type Client struct + Cfg Config + HTTP *HTTPClient + Site Site + func New(cfg Config, cache *Cache) (*Client, error) + func (c *Client) Backlinks(ctx context.Context, title string, namespace, limit int) ([]Link, error) + func (c *Client) Categories(ctx context.Context, title string, limit int) ([]Category, error) + func (c *Client) CategoryMembers(ctx context.Context, name, memberType string, limit int) ([]CategoryMember, error) + func (c *Client) Diff(ctx context.Context, fromRev int, toRev string) ([]DiffLine, error) + func (c *Client) DownloadFile(ctx context.Context, url, outDir string, progress func(n int64)) (string, error) + func (c *Client) DumpList(ctx context.Context, wiki, date string) ([]DumpFile, string, error) + func (c *Client) EntityByID(ctx context.Context, id, lang string, props []string) (*Entity, error) + func (c *Client) EntityByTitle(ctx context.Context, title, lang string, props []string) (*Entity, error) + func (c *Client) ExternalLinks(ctx context.Context, title string, limit int) ([]Link, error) + func (c *Client) Extract(ctx context.Context, title string, intro bool) (string, error) + func (c *Client) Featured(ctx context.Context, date time.Time) (*FeaturedFeed, error) + func (c *Client) GeoNear(ctx context.Context, title string, radius, limit int) ([]GeoResult, error) + func (c *Client) GeoSearch(ctx context.Context, lat, lon float64, radius, limit int) ([]GeoResult, error) + func (c *Client) GetSummary(ctx context.Context, title string) (*Summary, error) + func (c *Client) HTML(ctx context.Context, title string) ([]byte, error) + func (c *Client) Info(ctx context.Context, title string) (*PageInfo, error) + func (c *Client) LangLinks(ctx context.Context, title string, limit int) ([]LangLink, error) + func (c *Client) Links(ctx context.Context, title string, namespace, limit int) ([]Link, error) + func (c *Client) Media(ctx context.Context, title string, limit int) ([]Media, error) + func (c *Client) OnThisDayEvents(ctx context.Context, eventType string, month, day int) ([]OnThisDay, error) + func (c *Client) Pageviews(ctx context.Context, title, granularity, access, agent string, ...) ([]PageviewPoint, error) + func (c *Client) Random(ctx context.Context, n, namespace int) ([]SearchResult, error) + func (c *Client) Related(ctx context.Context, title string) ([]SearchResult, error) + func (c *Client) RevisionContent(ctx context.Context, revid int) (string, error) + func (c *Client) Revisions(ctx context.Context, title string, limit int, user string) ([]Revision, error) + func (c *Client) SPARQL(ctx context.Context, query string) (*SPARQLResult, error) + func (c *Client) Search(ctx context.Context, query string, limit int) ([]SearchResult, error) + func (c *Client) SectionHTML(ctx context.Context, title string, section int) (string, error) + func (c *Client) Sections(ctx context.Context, title string) ([]Section, error) + func (c *Client) Stats(ctx context.Context) (*SiteStats, error) + func (c *Client) Suggest(ctx context.Context, prefix string, limit int) ([]Suggestion, error) + func (c *Client) Top(ctx context.Context, year, month, day, limit int) ([]TopArticle, error) + func (c *Client) Wikitext(ctx context.Context, title string) (string, error) + type Config struct + AllowAnyHost bool + CacheDir string + DataDir string + Delay time.Duration + Lang string + Maxlag int + Project string + Retries int + SiteHost string + Timeout time.Duration + UserAgent string + func DefaultConfig() Config + func (c Config) DownloadDir() string + func (c Config) Site() (Site, error) + type Datavalue struct + Type string + Value json.RawMessage + type DiffLine struct + Op string + Text string + type Domain struct + func (Domain) Classify(input string) (uriType, id string, err error) + func (Domain) Info() kit.DomainInfo + func (Domain) Locate(uriType, id string) (string, error) + func (Domain) Register(app *kit.App) + type DumpFile struct + Job string + Name string + Sha1 string + Size int64 + URL string + type DumpPage struct + ID int + NS int + Redirect bool + RevID int + Text string + Timestamp string + Title string + type Entity struct + Aliases map[string][]TermValue + Claims map[string][]Statement + Datatype string + Descriptions map[string]TermValue + ID string + Labels map[string]TermValue + LastRevID int + Modified string + NS int + PageID int + Sitelinks map[string]Sitelink + Title string + Type string + func (e *Entity) AliasesFor(lang string) []string + func (e *Entity) DescriptionFor(lang string) string + func (e *Entity) LabelFor(lang string) string + func (e *Entity) UnmarshalJSON(b []byte) error + type FeaturedFeed struct + Image *FeedImage + MostRead []FeedArticle + News []FeedNews + OnThisDay []OnThisDay + TFA *FeedArticle + type FeedArticle struct + Description string + Extract string + Rank int + Thumbnail string + Title string + URL string + Views int + type FeedImage struct + Description string + Title string + URL string + type FeedNews struct + Links []FeedArticle + Story string + type GeoResult struct + Dist float64 + Lat float64 + Lon float64 + Title string + URL string + type HTTPClient struct + func NewHTTPClient(cfg Config, cache *Cache) *HTTPClient + func (h *HTTPClient) GetBytes(ctx context.Context, url string) ([]byte, error) + func (h *HTTPClient) GetJSON(ctx context.Context, url string, ttl time.Duration, v any) error + func (h *HTTPClient) GetText(ctx context.Context, url, accept string) ([]byte, error) + func (h *HTTPClient) Open(ctx context.Context, url, rangeHdr string) (*http.Response, error) + type HTTPError struct + Body string + Status int + URL string + func (e *HTTPError) Error() string + type LangLink struct + Autonym string + Lang string + Title string + URL string + type Link struct + NS int + Title string + URL string + type Media struct + Author string + Height int + License string + Mime string + Size int + Title string + URL string + Width int + type OnThisDay struct + Pages []string + Text string + Year int + type PageInfo struct + ContentModel string + Lang string + LastRevID int + Length int + Pageid int + Redirect bool + Title string + Touched string + URL string + type PageviewPoint struct + Date string + Views int + type Reference struct + Hash string + Snaks map[string][]Snak + SnaksOrder []string + type Revision struct + Comment string + Minor bool + ParentID int + RevID int + Size int + Tags string + Timestamp string + User string + type SPARQLBinding struct + Datatype string + Type string + Value string + XMLLang string + type SPARQLResult struct + Rows []map[string]SPARQLBinding + Vars []string + type SearchResult struct + Description string + Size int + Snippet string + Timestamp string + Title string + URL string + WordCount int + type Section struct + Anchor string + Index string + Level string + Line string + Number string + type Site struct + Host string + Lang string + Project string + func (s Site) APIURL(params url.Values) string + func (s Site) CoreProject() (project, lang string, ok bool) + func (s Site) CoreURL(path string) (string, bool) + func (s Site) DumpWiki() string + func (s Site) PageURL(title string) string + func (s Site) RestV1(path string) string + type SiteStats struct + ActiveUsers int + Admins int + Articles int + Edits int + Generator string + Images int + Lang string + MainPage string + Pages int + SiteName string + Users int + type Sitelink struct + Badges []string + Site string + Title string + URL string + type Snak struct + Datatype string + Datavalue *Datavalue + Hash string + Property string + SnakType string + func (s Snak) ValueString() string + type Statement struct + ID string + Mainsnak Snak + Qualifiers map[string][]Snak + QualifiersOrder []string + Rank string + References []Reference + Type string + type Suggestion struct + Description string + Title string + URL string + type Summary struct + Description string + Extract string + Lang string + Lat float64 + Lon float64 + Pageid int + Thumbnail string + Title string + Type string + URL string + type TermValue struct + Language string + Value string + type TopArticle struct + Rank int + Title string + URL string + Views int