Public Member Functions | |
| def | __getitem__ |
| def | __init__ |
| def | __repr__ |
| def | dump |
| def | insert |
Public Attributes | |
| children | |
| link | |
| title | |
Build a tree, mirroring the structure of a wikidot-based wiki
| def wikidot.tree.WikiNode.__init__ | ( | self, | |
| title, | |||
| link | |||
| ) |
| def wikidot.tree.WikiNode.__getitem__ | ( | self, | |
| y | |||
| ) |
| def wikidot.tree.WikiNode.__repr__ | ( | self | ) |
| def wikidot.tree.WikiNode.dump | ( | self, | |
level = 0 |
|||
| ) |
| 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.