class documentation

class TagsView(IndexView): (source)

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method list_all_tags Returns all tags in the index as IndexTag objects
Method list_all_tags_by_n_pages Returns all tags in the index as IndexTag objects
Method list_intersecting_tags List tags that have pages in common with a given set of tags
Method list_pages List all pages tagged with a given tag. @param tag: a tag name as string or an IndexTag object @returns: yields PageIndexRecord objects
Method list_tags No summary
Method lookup_by_tagname Undocumented
Method n_list_all_tags Undocumented
Method n_list_pages Undocumented
Method n_list_tags Undocumented
Method _list_pages Undocumented
Method _list_tags Undocumented
Instance Variable _pages Undocumented

Inherited from IndexView:

Class Method new_from_index Undocumented
Instance Variable db Undocumented
def __init__(self, db): (source)
def list_all_tags(self): (source)
Returns all tags in the index as IndexTag objects
def list_all_tags_by_n_pages(self): (source)
Returns all tags in the index as IndexTag objects
def list_intersecting_tags(self, tags): (source)

List tags that have pages in common with a given set of tags

Generator function that lists all tags that occur on pages that match the given tag set. This is used to narrow down possible tag sets that are not empty. (This method is used e.g. in the zim.plugins.tags.TagCloudWidget widget to decide which tags to show once some tags are selected.)

Parameters
tagsan iterable of IndexTag objects
Returns
yields IndexTag objects
def list_pages(self, tag): (source)
List all pages tagged with a given tag.
Parameters
taga tag name as string or an IndexTag object
Returns
yields PageIndexRecord objects
def list_tags(self, path): (source)
Returns all tags for a given page
Parameters
patha Path object for the page
Returns
yields IndexTag objects
Raises
IndexNotFoundErrorif path is not found in the index
def lookup_by_tagname(self, tag): (source)

Undocumented

def n_list_all_tags(self): (source)

Undocumented

def n_list_pages(self, tag): (source)

Undocumented

def n_list_tags(self, path): (source)

Undocumented

def _list_pages(self, tag): (source)

Undocumented

def _list_tags(self, page_id): (source)

Undocumented

_pages = (source)

Undocumented