Changes in prextra/prcontent2html.m [29:14]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
prextra/prcontent2html.m
r29 r14 1 1 %PRCONTENT2HTML Construct HTML file from PRTools Contents file 2 2 % 3 % PRCONTENT2HTML(NAME,RECREATE,HTMLDIR) 4 5 6 function out = prcontent2html(name,recreate,htmldir) 7 8 if nargin < 3, htmldir = cd; end 9 if nargin < 2 | isempty(recreate), recreate = 0; end 3 % PRCONTENT2HTML(NAME,RECREATE) 4 5 6 function out = prcontent2html(name,recreate) 7 8 if nargin < 2, recreate = 0; end 10 9 11 10 if exist([name '/Contents.m']) == 2 … … 64 63 pp = fileparts(file); 65 64 [pp2,subdir] = fileparts(pp); 66 s = [s '<tr> <td width="100" valign="top">' commandrefs(tok,recreate,subdir ,htmldir) '</td>'];65 s = [s '<tr> <td width="100" valign="top">' commandrefs(tok,recreate,subdir) '</td>']; 67 66 s = [s '<td>' posttok '</td></tr>']; 68 67 end … … 70 69 s = [s '</table>']; 71 70 s = [s '</p></body></html>']; 72 writf([ fullfile(htmldir,name)'.html'],s);71 writf([name '.html'],s); 73 72 if nargout > 0 74 73 out = s; … … 131 130 return 132 131 133 function s = commandrefs(r,recreate,subdir ,htmldir)132 function s = commandrefs(r,recreate,subdir) 134 133 if nargin < 2, recreate = 0; end 135 134 if regexp(r,'^ *$') … … 144 143 end 145 144 146 if exist( fullfile(htmldir,htmlname),'file') == 2145 if exist(htmlname,'file') == 2 147 146 s = [s '<a href="' htmlname '">' tok '</a>, ']; 148 147 elseif isempty(tok) | regexp(tok,'^ *')
Note: See TracChangeset
for help on using the changeset viewer.