publishFunctionCate

publishFunctionCate enables to create web page which contains the categorical list of functions

Syntax

  • fstring=publishFunctionCate(InputCell)example
  • fstring=publishFunctionCate(InputCell,Name,Value)example

Description

This routins uses as input the cell which is created with routine makecontentsfileFS and uses template file function-cateEmpty.html which is contained inside:

(main root of FSDA) filesep 'helpfiles' filesep 'FSDA;

to create in a fully automatic way the categorical list of functions with automatic links for each category.

The output file will be created inside (main root of FSDA) filesep 'helpfiles' filesep 'FSDA;

and will have name function-cate.html The automatic help file starting from structured .m file can be created using function publishFS.m

example

fstring =publishFunctionCate(InputCell) Interactive_example Creation of HTML file containing categorical list of functions.

example

fstring =publishFunctionCate(InputCell, Name, Value) Interactive_example Create output file in personalized folder Create HTML file containing categorical list of functions in local path "D:\tmp".

Examples

expand all

  • Interactive example 1. Creation of HTML file containing categorical list of functions.
  • % Make sure you are inside the main folder of FSDA.
    % Create contents file for each .m file
    % findDir with optional arguments 'InclDir' and 'ExclDir'.
    FileName='addFSDA2path';
    FullPath=which(FileName);
    FSDAroot=FullPath(1:end-length(FileName)-3);
    InclDir={'graphics' 'regression' 'multivariate' 'clustering' 'combinatorial' ...
    'examples' 'utilities' 'utilities_stat'};
    ExclDir={'privateFS'  'datasets'};
    list = findDir(FSDAroot,'InclDir',InclDir,'ExclDir',ExclDir)
    out=makecontentsfileFS('dirpath',list,'FilterFileContent','%FScategory:','force',false);
    cd(fileparts(which('docsearchFS.m')))
    % Create HTML file containing categorical list of functions
    fstring=publishFunctionCate(out);
    % open output file in web browser
    FileWithFullPath=which('docsearchFS.m');
    [pathFSDAstr]=fileparts(FileWithFullPath);
    fsep=filesep;
    outputOFHtmlHelpFile=[FSDAroot fsep 'helpfiles' fsep 'FSDA\function-cate.html'];
    web(outputOFHtmlHelpFile,'-browser');

  • Interactive example 2. Create output file in personalized folder Create HTML file containing categorical list of functions in local path "D:\tmp".
  • % Note that we assume that inside path D:\tmp there is the template
    % file named "function-cateEmpty.html"
    fstring=publishFunctionCate(out,'outputDir','D:\tmp');

    Input Arguments

    expand all

    InputCell — Cell created by function makecontentsfileFS.m. Cell.

    Cell containing information about all files which have to be included inside the categorical list of functions HTML file.

    Data Types: single| double

    Name-Value Pair Arguments

    Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

    Example: 'webhelp',true , 'outputDir','C:'

    webhelp —Option which specifies the default path to create html file containing the categorical list of functions.logical.

    If webhelp is true, the output is produced in the path (FSDA root)\helpfiles\FSDAweb.

    If webhelp is false (default), the output is produced in the path (FSDA root)\helpfiles\FSDA.

    Note that this option is valid just if outpuDir option below is omitted.

    Example: 'webhelp',true

    Data Types: logical

    outputDir —Output folder.string.

    Output folder to which the HTML document is saved and where template file function-cateEmpty.html is located, specified as the comma-separated pair consisting of 'outputDir' and the full path. You must specify the full path as a string, for example 'C:\PublishedOutput'. Note that inside outputDir there must be a file named "function-cateEmpty.html" which contains the template to create the categorical list of functions. The defaults of 'outputDir' are as follows:

    if input option webhelp is false outputDir is (FSDA root)\helpfiles\FSDA path, else if input option webhelp is true outputDir is (FSDA root)\helpfiles\FSDAweb path.

    Remark - outputDir must be a valid path.

    Example: 'outputDir','C:'

    Data Types: string

    Output Arguments

    expand all

    fstring —List of files in categorical order. string

    String. This string contains the full HTML files which all hypertextual links to all HTML files for each category.

    The HTML file function-cate.html also produced inside input option "outputDir" folder.

    References

    This page has been automatically generated by our routine publishFS