liara.actions
¶
Module Contents¶
Classes¶
Functions¶
Gather links across documents. |
|
Validate internal links. |
|
Validate external links. |
API¶
- class liara.actions.LinkType(*args, **kwds)¶
Bases:
enum.Enum
- Internal = 'auto(...)'¶
- External = 'auto(...)'¶
- liara.actions.gather_links(documents: Iterable[liara.nodes.DocumentNode], link_type: liara.actions.LinkType) Dict[str, List[pathlib.PurePosixPath]] ¶
Gather links across documents.
- Returns:
A dictionary containing a link, and the list of document paths in which this link was found.
- liara.actions.validate_internal_links(links: Dict[str, List[pathlib.PurePosixPath]], site: liara.site.Site) int ¶
Validate internal links.
For each link, check if it exists inside the provided site. If not, an error is printed indicating the link and the documents referencing it.
- liara.actions.validate_external_links(links: Dict[str, List[pathlib.PurePosixPath]]) int ¶
Validate external links.
This issues a request for each link, and checks if it connects correctly. If not, an error is printed indicating the link and the documents referencing it.