generate_autodoc_stubs

generate_autodoc_stubs(in, dest)

generate_autodoc_stubs() - Generate source .rst stubs for Reference Manual.

generate_autodoc_stubs(in, dest)

% not yet implemented
[success, err_list] = generate_autodoc_stubs(in, dest)
Inputs:
  • in (struct) – input specification for source files of interest, with fields:

    in
        .(stub_type)    e.g. 'class', 'function'
        .destdir        prepend dest to get dir for .rst stub files,
                        e.g. 'classes', 'functions'
        .gh_base_url    base URL for GitHub source
        .list           struct array
            .mod        module names for Sphinx, e.g. 'matpower',
                        'matpower.+pkg'
            .src_path   relative path from base of source to this
                        set of source files (e.g. 'lib', 'lib/t')
            .names      cell array of function/class names
                        (w/o .m extension)
    
  • dest (char array) – path the base directory for symlinks

Outputs:
  • success (integer) – (not yet implemented) - 1 if successful, 0 otherwise

  • err_list (cell array) – (not yet implemented) - all errors are currently fatal

Example:

in = struct(...
    'class', struct(...
        'destdir', 'classes', ...
        'gh_base_url', 'https://github.com/MATPOWER/matpower/blob/master', ...
        'list', struct(...
            'mod', {'matpower', 'matpower.+mp'}, ...
            'src_path', {'lib', 'lib/t'}, ...
            'names', {{'class1', 'class2'}, {'class3', 'class4'}} ... -
        ) ...
    ), ...
    'function', struct(...
        'destdir', 'functions', ...
        'gh_base_url', 'https://github.com/MATPOWER/matpower/blob/master', ...
        'list', struct(...
            'mod', {'matpower', 'matpower.+mp'}, ...
            'src_path', {'lib', 'lib'}, ...
            'names', {{'func1', 'func2'}, {'func3', 'func4'}} ... -
        ) ...
    ) ...
);
generate_autodoc_stubs(in, ...
    '~/matpower/docs/sphinx/source/ref-manual/');