class documentation

class ParserClass(object): (source)

Known subclasses: zim.formats.plain.Parser, zim.formats.wiki.Parser

View In Hierarchy

Base class for parsers

Each format that can be used natively should define a class 'Parser' which inherits from this base class.

Class Method parse_image_url Parse urls style options for images like "foo.png?width=500" and returns a dict with the options. The base url will be in the dict as 'src'.
Method parse ABSTRACT METHOD: needs to be overloaded by sub-classes.
@classmethod
def parse_image_url(self, url): (source)
Parse urls style options for images like "foo.png?width=500" and returns a dict with the options. The base url will be in the dict as 'src'.
def parse(self, input): (source)

ABSTRACT METHOD: needs to be overloaded by sub-classes.

This method takes a text or an iterable with lines and returns a ParseTree object.