Commit 588eaa87 authored by Johannes Klein's avatar Johannes Klein

Remove Apps

parent a58f1c31
......@@ -270,55 +270,6 @@ classesHTML=[classesHTML, '<br>', sprintf('\n'), classesHTML_end];
%write edited file
ita_writeHTML(fullfile(htmlFolder, 'classes.html'), classesHTML);
% -> edit apps.html
[appsHTML_begin, appsHTML_end] = ita_openHTML(fullfile(templateFolder, 'template_apps.html'));
appsHTML= appsHTML_begin;
%%%%%%%%%%%%%%%%%%%
appfolder = rdir([folder filesep '**' filesep 'ita_apps.m']);
if isempty(appfolder)
appsHTML = [appsHTML 'sorry you do not have any application installed. Could not find "ita_apps.m"<br>' appsHTML_end];
else
appfolder = appfolder(1).name;
temp = strfind(appfolder, filesep);
appfolder = appfolder(1:temp(end)-1);
applist = rdir([appfolder filesep '**' filesep 'AppDescription.txt']);
appsHTML = [appsHTML '<table border="2">' sprintf('\n')];
for idx = 1:numel(applist)
appDescriptionPath = applist(idx).name;
nameidx = strfind(appDescriptionPath,filesep);
appDocumentationFile = [appDescriptionPath(1:nameidx(end-2)),...
'HTML',...
filesep,...
'doc',...
filesep,...
appDescriptionPath(nameidx(end-3)+1:nameidx(end)),...
'index.html'];
appname = appDescriptionPath(nameidx(end-1)+1:nameidx(end)-1);
appDescriptionPath = strrep(appDescriptionPath, filesep, '/'); %convert ..\.. to ../.. for html
data_ID = fopen(appDescriptionPath,'r'); %r read only
data = fread(data_ID, 'uint8=>char');
fclose(data_ID);
data = data(:)'; %get AppDescription.txt as string
desPoint = strfind(data,'Description:');
data = data(desPoint+12:end);
desPoint = strfind(data,sprintf('\n'));
data = data(1:desPoint);
% old: show complete AppDescription.txt....
%'<td><object data="file:///', appDescriptionPath, '" type="text/plain" width="350" height="90">', sprintf('\n'),...
%'Ihr Browser kann das Objekt leider nicht anzeigen!</object></td>',sprintf('\n'),..
appsHTML = [appsHTML,...
'<tr height="30">', sprintf('\n'),...
'<td width="100"><a href="file:///', appDocumentationFile,'">', appname, '</a></td>', sprintf('\n'),...
'<td>', data, sprintf('\n'),...
'</td>',sprintf('\n'),...
'</tr>', sprintf('\n')]; %#ok<AGROW>
end
appsHTML = [appsHTML '</table>' appsHTML_end];
end
%write edited file
ita_writeHTML(fullfile(htmlFolder, 'apps.html'), appsHTML);
......
function ita_apps(varargin)
%ITA_APPS - Show installed Applications
% This function shows the applications within the ITA-Toolbox you have
% got.
% Call ita_apps(1) to show more information
% <ITA-Toolbox>
% This file is part of the application for the ITA-Toolbox. All rights reserved.
% You can find the license for this m-file in the application folder.
% </ITA-Toolbox>
% Author: Pascal Dietrich -- Email: pdi@akustik.rwth-aachen.de
% Created: 23-Feb-2011
%% Browse through app folder for description.txt
appfolder = fileparts(which('ita_apps.m'));
if isempty(appfolder)
applist = [];
else
applist = rdir([appfolder filesep '**' filesep 'AppDescription.txt']);
end
fullmode = (nargin == 1);
errorCell = cell(0);
nChars = ita_preferences('nchars'); %nice stars?
ita_disp(nChars);
ita_disp(nChars,[ num2str(numel(applist)) ' Installed ITA-Toolbox Applications'])
ita_disp(nChars)
for idx = 1:numel(applist)
filename = applist(idx).name;
nameidx = strfind(filename,filesep);
nameidx = nameidx(end-1:end);
appname = filename(nameidx(1)+1:nameidx(2)-1);
%show name
if fullmode
ita_disp(nChars);
ita_disp(nChars,appname);
ita_disp(nChars);
end
%show info
fid = fopen(filename);
data = fread(fid);
fclose(fid);
data = native2unicode(data)'; %#ok<N2UNI>
% extract dependencies
depStr = data(strfind(data, 'Dependencies:')+13:end);
idxComma = [0 strfind(depStr, ',') length(depStr)+1];
appPath = fullfile(ita_toolbox_path, 'applications');
for iDependency = 1:numel(idxComma)-1
depName = strtrim(depStr(idxComma(iDependency)+1:idxComma(iDependency+1)-1));
if strcmpi(depName, 'no dependencies')
continue
end
if ~exist([appPath filesep depName], 'dir')
errorCell{end+1} = sprintf('Couldn''t find %s-Application! (%s depends on %s.)',depName, appname, depName ); %#ok<AGROW>
end
end
%get rid off strange line feeds
jdx = isstrprop(data,'cntrl');
jdxend = find([0 diff(jdx) == 1]);
jdxstart = find([1 diff(jdx) == -1]);
%display data
if fullmode
disp(data(jdxstart(1):jdxend(1)-1 ));
disp(data(jdxstart(2):jdxend(2)-1 ));
disp(data(jdxstart(3):end));
else
desStr = data(jdxstart(2):jdxend(2)-1 );
desStr = strtrim(desStr(min(strfind(desStr,':')+1):end));
fprintf('** %-28s ** %s\n',appname, desStr)
end
end
%end stars...
ita_disp(nChars);
ita_disp(nChars);
if ~isempty(errorCell)
for iError = 1:numel(errorCell)
ita_verbose_info(errorCell{iError},0)
end
end
%end function
end
\ No newline at end of file
......@@ -107,13 +107,6 @@ end
%% clean up old filters
ita_delete_filter();
%% show toolbox apps if possible
if ~exist('ita_apps.m', 'file')
disp('no ITA-Toolbox applications found')
else
ita_apps()
end
%% Then show gui
if usejava('desktop') %Only if desktop available (non_cluster)
% ita_preferences();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment