sphinx_gallery.backreferences¶
Backreferences Generator¶
Parses example file code in order to keep track of used functions
Functions¶
-
sphinx_gallery.backreferences.
get_short_module_name
(module_name, obj_name)¶ Get the shortest possible module name
-
sphinx_gallery.backreferences.
identify_names
(code)¶ Builds a codeobj summary by identifying and resolving used names
>>> code = ''' ... from a.b import c ... import d as e ... print(c) ... e.HelloWorld().f.g ... ''' >>> for name, o in sorted(identify_names(code).items()): ... print(name, o['name'], o['module'], o['module_short']) c c a.b a.b e.HelloWorld HelloWorld d d
Examples using sphinx_gallery.backreferences.identify_names
¶
-
sphinx_gallery.backreferences.
scan_used_functions
(example_file, gallery_conf)¶ save variables so we can later add links to the documentation
-
sphinx_gallery.backreferences.
write_backreferences
(seen_backrefs, gallery_conf, target_dir, fname, snippet)¶ Writes down back reference files, which include a thumbnail list of examples using a certain module