sphinx_gallery.docs_resolv — Python documentation

# sphinx_gallery.docs_resolv

## Link resolver objects

### Functions

`sphinx_gallery.docs_resolv.` `embed_code_links`(app, exception)

  Embed hyperlinks to documentation into example code

#### Examples using `sphinx_gallery.docs_resolv.embed_code_links`

`sphinx_gallery.docs_resolv.` `get_data`(url, gallery_dir)

  Persistent dictionary usage to retrieve the search indexes

#### Examples using `sphinx_gallery.docs_resolv.get_data`

`sphinx_gallery.docs_resolv.` `parse_sphinx_docopts`(index)

  Parse the Sphinx index for documentation options.

  Parameters

    index (str) – The Sphinx index page

  Returns

    docopts – The documentation options from the page.

  Return type

    dict

#### Examples using `sphinx_gallery.docs_resolv.parse_sphinx_docopts`

### Classes

class `sphinx_gallery.docs_resolv.` `SphinxDocLinkResolver`(doc_url, gallery_dir, relative=False)

  Resolve documentation links using searchindex.js generated by Sphinx

  Parameters

    - doc_url (str) – The base URL of the project website.

    - relative (bool) – Return relative links (only useful for links to documentation of this package).

  `resolve`(cobj, this_url, return_type=False)

    Resolve the link to the documentation, returns None if not found

    Parameters

      - cobj (dict) – Dict with information about the “code object” for which we are resolving a link. cobj[‘name’] : function or class name (str) cobj[‘module_short’] : shortened module name (str) cobj[‘module’] : module name (str)

      - this_url (str) – URL of the current page. Needed to construct relative URLs (only used if relative=True in constructor).

      - return_type (bool) – If True, return the type as well.

    Returns

      - link (str or None) – The link (URL) to the documentation.

      - type_ (str) – The type. Only returned if return_type is True.

#### Examples using `sphinx_gallery.docs_resolv.SphinxDocLinkResolver`