class HRef: (source)
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 |
HRef
object for a link as written in zim's wiki syntax.Parameters | |
klass | Undocumented |
href:str | a string for the link |
Returns | |
Href | Undocumented |
Raises | |
ValueError | when 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. |
Undocumented
Parameters | |
rel:HRef_rel_flavor | Undocumented |
names:str | Undocumented |
anchor:Optional[ | Undocumented |