-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checkFSDAsetup.m added downloadGraphicalOutput.m added All html regenerated and also the contents git-svn-id: https://160.78.46.112/svn/fsda.code.000/FSDA/trunk@2156 336e6153-a435-9040-aa94-c6aba0fb517b
- Loading branch information
marco
committed
Nov 4, 2019
1 parent
a7bde4e
commit 0510626
Showing
682 changed files
with
4,785 additions
and
8,539 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
% This file | ||
% 1) makes sure that the HTML files which are in subfolder | ||
% (FSDA path)/helpfiles/FSDA | ||
% are copied inside | ||
% (docroot)/help/FSDA | ||
% Note that to properly copy these file under windows, it is necessary to have | ||
% administrator privileges (or to run MATLAB with administrator privileges) | ||
% | ||
% 2) creates searchable database, that is runs MATLAB function | ||
% buildocsearchdb in path | ||
% (FSDA path)/helpfiles/pointersHTML | ||
% | ||
|
||
%% Beginning of code | ||
% Store current folder so that after the execution we go back to this | ||
% folder | ||
CurrentFolder=pwd; | ||
|
||
% First navigate to FSDA main folder | ||
FileName='addFSDA2path'; | ||
FullPath=which(FileName); | ||
if isempty(FullPath) | ||
error('FSDA:setup:WrongLocation','In order to properly run this file please navigate to the main folder of FSDA') | ||
else | ||
%Navigate to the main folder of FSDA | ||
FSDAroot=fileparts(FullPath); | ||
cd(FSDAroot) | ||
end | ||
|
||
%% Copy all FSDA .html files inside docroot/FSDA | ||
fsep=filesep; | ||
|
||
try | ||
source=['helpfiles' filesep 'FSDA']; | ||
destination=[docroot filesep 'FSDA']; | ||
disp('Copying all FSDA documentation files which are in folder') | ||
disp([FSDAroot filesep source]) | ||
disp('into') | ||
disp(destination) | ||
disp('------------------------') | ||
|
||
[status,msg]=copyfile(source,destination,'f'); | ||
if status ==1 | ||
disp('HTML FSDA documentation files correctly copied') | ||
else | ||
disp('Due to write permission problems HTML files in:') | ||
disp([pwd filesep source]) | ||
disp('could not be copied inside folder') | ||
disp(destination) | ||
disp('To solve the problem, please run MATLAB as administrator') | ||
disp('or manually copy the files, otherwise the HTML FSDA help files will not be visible') | ||
warning('FSDA:startup:NotCopied','Impossible to copy FSDA HTML documentation files') | ||
end | ||
catch | ||
disp('Unknown error when trying to copy the HTML FSDA documentation files from') | ||
disp([pwd filesep source]) | ||
disp('to:') | ||
disp(destination) | ||
end | ||
|
||
subPointersFolder=[filesep 'helpfiles' filesep 'pointersHTML']; | ||
folderwithSearchableDatabase=[FSDAroot subPointersFolder]; | ||
|
||
|
||
% Launch buildocsearchdb | ||
% run builddocsearchdb in subfolder pointersHTML | ||
try | ||
builddocsearchdb(folderwithSearchableDatabase) | ||
disp('FSDA searchable database correctly added') | ||
catch | ||
disp('Unknown error when trying to run MATLAB routine builddocsearchdb') | ||
disp(['in folder: ' folderwithSearchableDatabase]) | ||
end | ||
|
||
cd(CurrentFolder) | ||
clearvars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
|
||
%% Preamble | ||
% The purpose of this file is to download and extract the graphical output | ||
% of the html examples of FSDA contained in file | ||
% http://rosa.unipr.it/FSDA/outputHTMLfiles.zip into | ||
% (MATLAB docroot)/FSDA//images | ||
% if this path exists | ||
% or to | ||
% (FSDA root)/helpfiles/FSDA/images. | ||
% if the previous path does not exist. | ||
% | ||
% REMARK: this file is necessary just from those who have downloaded FSDA | ||
% from Mathworks file exchange due to the limitation of 20MB size of the | ||
% files inside fileexchange. Those who have downloaded FSDA from github do | ||
% not need to run this file. | ||
|
||
%% Beginning of code | ||
% url from which to download file (including file name) | ||
url = 'http://rosa.unipr.it/FSDA/outputHTMLfiles.zip'; | ||
|
||
% Set the timeout value to Inf so that the connection does not time out. | ||
options = weboptions('Timeout',Inf); | ||
|
||
% Define output folder | ||
fsep=filesep; | ||
outputfolder=[docroot filesep 'FSDA' filesep 'images']; | ||
|
||
if exist(outputfolder,'dir')==7 | ||
% check that output folder. If output folder already exists this means | ||
% that user has already copied there all the html documentation files | ||
% and simply needs to extract the graphical output | ||
|
||
try | ||
% unzip file into outputfolder | ||
unzip(url,outputfolder) | ||
disp('Files correctly extracted') | ||
disp('Now graphical output of the FSDA files is also visible locally') | ||
catch | ||
disp('Due to write permission problems zip file in:') | ||
disp(url) | ||
disp('could not be extracted inside folder') | ||
disp(outputfolder) | ||
disp('To solve the problem, please run MATLAB as administrator') | ||
disp('or manually upzip the files, otherwise the HTML FSDA graphical output will not be visible locally') | ||
warning('FSDA:dowloadGraphicalOutput:NotExtracted','Impossible to extract FSDA graphical output') | ||
|
||
end | ||
else | ||
% in this case the HTML documentation files have not been copied yet | ||
% and therefore the graphical output will be extracted into | ||
|
||
FileName='addFSDA2path'; | ||
FullPath=which(FileName); | ||
if isempty(FullPath) | ||
error('FSDA:setup:WrongLocation','In order to properly run this file please navigate to the main folder of FSDA') | ||
else | ||
%Navigate to the main folder of FSDA | ||
FSDAroot=fileparts(FullPath); | ||
% cd(FSDAroot) | ||
end | ||
outputfolder=[FSDAroot filesep 'FSDA' filesep 'images']; | ||
|
||
try | ||
% unzip file into outputfolder | ||
unzip(url,outputfolder) | ||
disp(['Files correctly extracted into ' outputfolder]) | ||
disp('Now it is necessary to copy manually folder') | ||
disp([FSDAroot filesep 'FSDA']) | ||
disp([docroot fileseip help 'FSDA']) | ||
disp('Alternatively, run routine checkFSDAsetup.m') | ||
disp('which is located in the main folder of FSDA') | ||
catch | ||
disp('Unknown error when trying to unzip file into folder') | ||
disp(outputfolder) | ||
end | ||
|
||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.