Skip to main content

Sphinx extension for linking to VTK class documentation.

Project description

vtk-xref is a Sphinx extension for linking directly to VTK’s documentation using the :vtk: reference role.

Installation

  1. Add vtk-ref as a project dependency or install it with:

    pip install vtk-ref
  2. Add vtk_ref as an extension in your conf.py file used by Sphinx:

extensions = [
    ...,
    'vtk_xref',
]

Usage

  • Add links to VTK class documentation with the :vtk: role. For example, write :vtk:`vtkImageData` in docstrings to link directly to the vtkImageData documentation. This will render as vtkImageData.

  • Link directly to class members such as methods or enums. For example, write :vtk:`vtkImageData.GetDimensions` to link directly to the GetDimensions method. This will render as vtkImageData.GetDimensions.

  • Use ~ to shorten the title for the link and only show the class member after the period. For example, :vtk:`~vtkImageData.GetDimensions` will render as GetDimensions.

  • Provide a custom title for the reference. For example, :vtk:`Get Image Dimensions <vtkImageData.GetDimensions>` will render as Get Image Dimensions

Notes

  • The URLs linking to the VTK documentation are checked to ensure they are valid references. A warning is emitted if the reference is invalid, but the role will still try to point to a valid URL where possible. It is recommended to set nitpicky=True in conf.py when using this extension to ensure all links are valid and correct.

  • The role does not currently support linking to nested members. For example, linking to an enum member with :vtk:`vtkCommand.EventIds` works, but linking to a specific enum value with :vtk:`vtkCommand.EventIds.PickEvent` does not.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vtk_xref-0.1.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vtk_xref-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file vtk_xref-0.1.0.tar.gz.

File metadata

  • Download URL: vtk_xref-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for vtk_xref-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bd11e53e315f37c49ed65eacfd0d0b6d070a225bef927e18803c91d04664917d
MD5 6ad23aa3bb336084a4dffca6964eefdc
BLAKE2b-256 a5846dc188cd850bb355a003169ead52e11cba34424119bdc7bb091cbbc45afd

See more details on using hashes here.

File details

Details for the file vtk_xref-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vtk_xref-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for vtk_xref-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b6dd14b125adcbd32e1e9135529fbe124ffc6208b9a52225585789ef2bc3c3c
MD5 5a1c154a416a2c7bda6af7b5704e91e9
BLAKE2b-256 923ea942cb350604d8659d75b782ba1c12f10102ac45687c567555daab7c1e3f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page