follow_link
Follow a link from a short entry line in a .ng file to retrieve the linked long entry's plain-text content.
Instructions
Follow a link in a short entry and return the target long entry.
Short entries in a Norton Guide are index-style pages where each line links to a long entry. This tool loads the short entry at offset, reads the link on line, and returns the plain-text content of the target long entry.
Args: path: Absolute path to the .ng file. offset: Byte offset of the short entry within the guide. line: Zero-based line index within the short entry whose link to follow.
Returns: A dictionary containing:
- ``source_offset`` (int): Offset of the short (source) entry.
- ``source_line`` (int): Line index that was followed.
- ``link_text`` (str): The text of the link line.
- ``target_offset`` (int): Offset of the target long entry.
- ``lines`` (list[str]): Plain-text lines of the target long entry.
- ``see_also`` (list[dict]): See-also items of the target entry, each
with ``text`` and ``offset`` keys.Raises: FileNotFoundError: If path does not point to an existing file. ValueError: If the offset does not point to a short entry, if line is out of range, or if the link has no associated target offset.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| offset | Yes | ||
| line | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||