class documentation

class HRef: (source)

View In Hierarchy

Represents a link as it appears in the wiki source. Contains semantic information about the link type, but does not contain an end point.

Introduced to help preserve link type when moving content.

Notes
To create the shortest link between two pages, use Notebook.pages.create_link
To resolve a link into a Path, create a HRef and pass it to Notebook.pages.resolve_link.
Class Method new_from_wiki_link No summary
Method __init__ Undocumented
Method __str__ Undocumented
Method parts Undocumented
Method to_wiki_link Returns href as text for wiki link
Class Variable __slots__ Undocumented
Instance Variable anchor Undocumented
Instance Variable names Undocumented
Instance Variable rel Undocumented
@classmethod
def new_from_wiki_link(klass, href): (source)
Constructor that constructs a HRef object for a link as written in zim's wiki syntax.
Parameters
klassUndocumented
href:stra string for the link
Returns
HrefUndocumented
Raises
ValueErrorwhen the string could not be parsed (see Path.makeValidPageName())
Note
This method HRef class assumes the logic of our wiki links. For other formats, a separate constructor may be needed.
def __init__(self, rel, names, anchor=None): (source)

Undocumented

Parameters
rel:HRef_rel_flavorUndocumented
names:strUndocumented
anchor:Optional[str]Undocumented
def __str__(self): (source)

Undocumented

def parts(self): (source)

Undocumented

Returns
List[str]Undocumented
def to_wiki_link(self): (source)
Returns href as text for wiki link
Returns
strUndocumented
__slots__: tuple[str, ...] = (source)

Undocumented

anchor = (source)

Undocumented

names = (source)

Undocumented

Undocumented