publishFunctionAlpha

publishFunctionAlpha enables to create web page which contains the alphabetical list of functions

Syntax

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

Description

example

fstring =publishFunctionAlpha(InputCell) Creation of file containing alphabetical list of functions.

example

fstring =publishFunctionAlpha(InputCell, Name, Value) Creation of txt file.

Examples

expand all

  • Creation of file containing alphabetical list of functions.
  • 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 alphabetical list of functions
    fstring=publishFunctionAlpha(out);
    % open outfile file in web browser
    FileWithFullPath=which('docsearchFS.m');
    [pathFSDAstr]=fileparts(FileWithFullPath);
    fsep=filesep;
    outputOFHtmlHelpFile=[FSDAroot fsep 'helpfiles' fsep 'FSDA' fsep 'function-alpha.html'];
    web(outputOFHtmlHelpFile,'-browser');

  • Creation of txt file.
  • File function-alpha.txt is created which contains, the names of the files (separated by commas), inside folder (main root of FSDA)\helpfiles\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 alphabetical list of functions
    fstring=publishFunctionAlpha(out,'CreateTxtFile',true);
    % open outfile txt in web browser
    FileWithFullPath=which('docsearchFS.m');
    [pathFSDAstr]=fileparts(FileWithFullPath);
    fsep=filesep;
    outputOFHtmlHelpFile=[FSDAroot fsep 'helpfiles' fsep 'FSDA\function-alpha.txt'];
    web(outputOFHtmlHelpFile,'-browser');

    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 alphabetical 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: 'CreateTxtFile',false , 'webhelp',true , 'outputDir','C:' , 'Createnavbars',false

    CreateTxtFile —create txt file.boolean.

    If CreateTxtFile is false (default) no txt file is created, else, a txt file named function-alpha.txt is created which contains, the names of the files (separated by commas), inside folder (main root of FSDA)\helpfiles\FSDA. Every function which will be automatically created by publishFS looks into this file and (through a Javascript) adds the link on top and at the bottom of the page to the two file which come before and after current file in alphabetical order.

    Example: 'CreateTxtFile',false

    Data Types: boolean

    webhelp —Option which specifies the default path to create html file containing the alphabetical 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-alphaEmpty.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-alphaEmpty.html" which contains the template to create the alphabetical 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

    Createnavbars —create files topscript.js and bottoscript.

    js. Boolean.

    If Createnavbars is true (default), this routine assumes there is a templsate input files inside (FSDA root)\helpfiles\FSDA\includesFS named topscriptEMPTY.js and bottomscriptEMPTY.js which contain top navigation bar to include in each .html file. When this option is set to true, file (FSDA root)\helpfiles\FSDA\includesFS\top(bottom)script.js are created. This files contain an array variable that is the list of files in input option InputCell and enables the navigation bar functionality.

    Example: 'Createnavbars',false

    Data Types: boolean

    Output Arguments

    expand all

    fstring —List of files in alphabetical order. string

    String. This string contains the full HTML files which all hypertextual links to all HTML files for each alphabetical letter. The HTML file function-alpha.html also produced inside folder (main root of FSDA)\helpfiles\FSDA

    References

    This page has been automatically generated by our routine publishFS