-
Notifications
You must be signed in to change notification settings - Fork 328
/
perform_index_generation.m
74 lines (61 loc) · 1.93 KB
/
perform_index_generation.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
function perform_index_generation(filename)
if nargin<1
filename = '../html/index_tours.php';
end
fid = fopen(filename, 'wt');
if fid<=0
error('Unable to open file');
end
list_ext = {...
{'introduction' 'Introduction'} ...
{'wavelet' 'Wavelet Processing'} ...
{'coding' 'Approximation, Coding and Compression'} ...
{'denoisingsimp' 'Simple Denoising Methods'} ...
{'denoisingwav' 'Wavelet Denoising'} ...
{'denoisingadv' 'Advanced Denoising Methods'} ...
{'pde' 'PDEs and Numerical Analysis'} ...
{'audio' 'Audio Processing'} ...
{'multidim' 'Higher Dimensional Signal Processing'} ...
{'graphics' 'Computer Graphics'} ...
{'optimaltransp', 'Optimal Transport'} ...
{'optim' 'Optimization'} ...
{'segmentation' 'Segmentation'} ...
{'sparsity' 'Sparsity'} ...
{'inverse' 'Inverse Problems'} ...
{'fastmarching' 'Geodesic Processing'} ...
{'shapes' 'Shapes'} ...
{'meshproc' 'Mesh Processing'} ...
{'meshdeform' 'Mesh Parameterization and Deformation'} ...
{'meshwav' 'Multiscale Mesh Processing'} ...
};
pr = @(x)fprintf(fid,[x '\n']);
prL = @()fprintf(fid, '\n');
pr('<?');
%%% GENERATE TOC %%%
pr('begin_toc();');
for iext = 1:length(list_ext)
ext = list_ext{iext}{1};
tit = list_ext{iext}{2};
pr(['toc_entry(''' tit ''', ''' ext ''');']);
end
pr('end_toc();');
prL();
%%% GENERATE SECTIONS %%%
for iext = 1:length(list_ext)
ext = list_ext{iext}{1};
tit = list_ext{iext}{2};
a = dir([ext '_*.m']);
pr(['begin_tours(''' tit ''', ''' ext ''');']);
for k=1:length(a)
tourname = a(k).name;
fidt = fopen(tourname);
L = fgets(fidt);
L = strtrim(strrep(L, '%% ', ''));
fclose(fidt);
pr(['tour(''' tourname(1:end-2) ''', ''' L ''');']);
end
pr('end_tours();');
prL();
end
pr('?>');
fclose(fid);