Public Member Functions | Public Attributes
wikidot.tree.WikiNode Class Reference

List of all members.

Public Member Functions

def __getitem__
def __init__
def __repr__
def dump
def insert

Public Attributes

 children
 link
 title

Detailed Description

Build a tree, mirroring the structure of a wikidot-based wiki

Definition at line 21 of file tree.py.


Constructor & Destructor Documentation

def wikidot.tree.WikiNode.__init__ (   self,
  title,
  link 
)
x.__init__(title, link) creates a new node x.

This node corresponds to a page with the title set to 'title'
and whose link is 'link'.

Definition at line 24 of file tree.py.


Member Function Documentation

def wikidot.tree.WikiNode.__getitem__ (   self,
  y 
)
x.__getitem__(y) <==> x[y]

Return the y-th child of the node

Definition at line 38 of file tree.py.

x.__repr__() <==> repr(x)

Definition at line 34 of file tree.py.

def wikidot.tree.WikiNode.dump (   self,
  level = 0 
)
Recursively dump to stderr the whole tree

Definition at line 72 of file tree.py.

def wikidot.tree.WikiNode.insert (   self,
  title,
  link,
  breadcrumbs 
)
Insert a new node into the tree.

Inputs:
    title: The page's title
    link: The page's URL (can be just the name, or full URL, or a partial path)
    breadcrumbs: list listing the URL of the parents, starting from the root

The URLs should be coherent between all inputs.

Output:
    Newly inserted node. 'None' if no corresponding parents.

Definition at line 45 of file tree.py.


Member Data Documentation

Definition at line 27 of file tree.py.

Definition at line 27 of file tree.py.

Definition at line 27 of file tree.py.


The documentation for this class was generated from the following file:


aseba
Author(s): Stéphane Magnenat
autogenerated on Thu Jan 2 2014 11:17:18