Home > src > geckomat > utilities > updateGECKOdoc.m

updateGECKOdoc

PURPOSE ^

updateGeckoDoc

SYNOPSIS ^

function updateGECKOdoc()

DESCRIPTION ^

 updateGeckoDoc
    Updates HTML documentation files for all geckomat GECKO functions. Uses the
   m2html functions that are provided with RAVEN.

 Usage: updateGECKOdoc()

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function updateGECKOdoc()
0002 % updateGeckoDoc
0003 %    Updates HTML documentation files for all geckomat GECKO functions. Uses the
0004 %   m2html functions that are provided with RAVEN.
0005 %
0006 % Usage: updateGECKOdoc()
0007 
0008 %Make sure that RAVEN-provided m2html is used
0009 ravenDir=findRAVENroot();
0010 path(fullfile(ravenDir,'software','m2html'),path);
0011 
0012 %Get the GECKO path
0013 geckoDir=findGECKOroot();
0014 
0015 %Remove old doc directory
0016 rmdir(fullfile(geckoDir,'doc'),'s');
0017 
0018 %Get a non-redundant list of GECKO subdirectories containing MATLAB
0019 %functions. Absolute paths are not compatible with M2HTML, so convert them
0020 %to the relative paths instead.
0021 geckoDirs=dir(fullfile(geckoDir,'src','geckomat','**/*.m'));
0022 geckoDirs=unique({geckoDirs.folder})';
0023 
0024 %Make relative path
0025 relStart = numel(geckoDir)+2;
0026 for i=1:numel(geckoDirs)
0027     geckoDirs{i,1} = geckoDirs{i,1}(relStart:end);
0028 end
0029 
0030 %Save the current working directory and go to RAVEN root directory
0031 originalDir=pwd;
0032 cd(geckoDir);
0033 %Generate HTML documentation files for RAVEN MATLAB functions
0034 m2html('mFiles',geckoDirs,'htmldir','doc');
0035 %Go back to the original working directory
0036 cd(originalDir);
0037 end

Generated by m2html © 2005