Documentation ¶
Index ¶
- Constants
- func AnalyzerConstructorEn(config map[string]interface{}, cache *registry.Cache) (*analysis.Analyzer, error)
- func AnalyzerConstructorFr(config map[string]interface{}, cache *registry.Cache) (*analysis.Analyzer, error)
- type Article
- type XZReader
- type ZimReader
- func (z *ZimReader) ArticleAt(offset uint64) (*Article, error)
- func (z *ZimReader) ArticleAtURLIdx(idx uint32) (*Article, error)
- func (z *ZimReader) FillArticleAt(a *Article, offset uint64) error
- func (z *ZimReader) GetPageNoIndex(url string) (*Article, error)
- func (z *ZimReader) ListArticles() <-chan *Article
- func (z *ZimReader) ListTitlesPtr() <-chan uint32
- func (z *ZimReader) ListTitlesPtrIterator(cb func(uint32))
- func (z *ZimReader) MainPage() (*Article, error)
- func (z *ZimReader) MimeTypes() []string
- func (z *ZimReader) OffsetAtURLIdx(idx uint32) (uint64, error)
Constants ¶
const ( RedirectEntry uint16 = 0xffff LinkTargetEntry = 0xfffe DeletedEntry = 0xfffd )
Variables ¶
This section is empty.
Functions ¶
func AnalyzerConstructorEn ¶
Types ¶
type Article ¶
type Article struct { // EntryType is a RedirectEntry/LinkTargetEntry/DeletedEntry or an idx // pointing to ZimReader.mimeTypeList EntryType uint16 Title string URLPtr uint64 Namespace byte // contains filtered or unexported fields }
func (*Article) RedirectIndex ¶
RedirectIndex return the redirect index of RedirectEntry type article return an err if not a redirect entry
type XZReader ¶
type XZReader struct {
*xz.Decompressor
}
type ZimReader ¶
type ZimReader struct { ArticleCount uint32 // contains filtered or unexported fields }
ZimReader keep tracks of everything related to ZIM reading
func (*ZimReader) ArticleAt ¶
get the article (Directory) pointed by the offset found in URLpos or Titlepos
func (*ZimReader) ArticleAtURLIdx ¶
convenient method to return the Article at URL index idx
func (*ZimReader) FillArticleAt ¶
Fill an article with datas found at offset
func (*ZimReader) GetPageNoIndex ¶
return the article at the exact url not using any index
func (*ZimReader) ListArticles ¶
list all articles, using url index, contained in a zim file note that this is a slow implementation, a real iterator is faster you are not suppose to use this method on big zim files, use indexes
func (*ZimReader) ListTitlesPtr ¶
list all title pointer, Titles by position contained in a zim file Titles are pointers to URLpos index, usefull for indexing cause smaller to store: uint32 note that this is a slow implementation, a real iterator is faster you are not suppose to use this method on big zim files prefer ListTitlesPtrIterator to build your index
func (*ZimReader) ListTitlesPtrIterator ¶
list all title pointer, Titles by position contained in a zim file Titles are pointers to URLpos index, usefull for indexing cause smaller to store: uint32