diff --git a/src/pspm_doc.m b/src/pspm_doc.m index 1cefa9ae..10ac0bf5 100644 --- a/src/pspm_doc.m +++ b/src/pspm_doc.m @@ -23,7 +23,12 @@ M = []; % 3.1 Add title Title = pspm_doc_get_title(func_name); -M = [M, '# ', Title, newline]; +M = [M, '---', newline]; +M = [M, 'layout: post', newline]; +M = [M, 'title: ', func_name, newline]; +M = [M, 'permalink: /ref/', func_name, newline]; +M = [M, '---', newline]; +M = [M, ' ', newline]; M = [M, '[Back to index](/PsPM/ref/)', newline]; % 3.2 Add description if isfield(S, 'Description') @@ -52,10 +57,15 @@ end M = [M, '[Back to index](/PsPM/ref/)', newline]; %% 4 Write to file +if isfield(options, 'post') && options.post == 1 + PrefTitle = ['2024-01-01-',Title]; +else + PrefTitle = Title; +end if isfield(options, 'path') - writelines(M, [options.path, '/', Title,'.md']); + writelines(M, [options.path, '/', PrefTitle,'.md']); else - writelines(M, [Title,'.md']); + writelines(M, [PrefTitle,'.md']); end sts = 1; end @@ -125,6 +135,7 @@ Y = [Y, newline]; end end + Y = [Y, newline]; end end end diff --git a/src/pspm_doc_gen.m b/src/pspm_doc_gen.m index 1c34b760..90067f66 100644 --- a/src/pspm_doc_gen.m +++ b/src/pspm_doc_gen.m @@ -49,6 +49,7 @@ 'pspm_convert_hb2hp', ... 'pspm_convert_ppg2hb', ... 'pspm_emg_pp', ... + 'pspm_expand_epochs', ... 'pspm_find_sounds', ... 'pspm_find_valid_fixations', ... 'pspm_gaze_pp', ... @@ -72,6 +73,7 @@ for i_func = 1:length(list_func) options = struct(); options.path = savepath; + options.post = 1; disp(list_func{i_func}); sts_temp = pspm_doc(list_func{i_func}, options); if sts_temp == -1 diff --git a/src/pspm_expand_epochs.m b/src/pspm_expand_epochs.m index 9f2d5a50..d2395f05 100644 --- a/src/pspm_expand_epochs.m +++ b/src/pspm_expand_epochs.m @@ -9,7 +9,7 @@ % [sts, output_file] = pspm_expand_epochs(epochs_fn, expansion, options) % [sts, expanded_epochs] = pspm_expand_epochs(epochs, expansion, options) % [sts, channel_index] = pspm_expand_epochs(data_fn, channel, expansion , options) -% ● Arguments +% ● Arguments % * epochs_fn: An epochs file as defined in pspm_get_timing. % * epochs: A 2-column matrix with epochs onsets and offsets in seconds. % * data_fn: A PsPM data file. diff --git a/test/pspm_doc_test.m b/test/pspm_doc_test.m index 24f698d1..13c5306b 100644 --- a/test/pspm_doc_test.m +++ b/test/pspm_doc_test.m @@ -48,7 +48,7 @@ function valid_input(this) end this.verifyEqual(pspm_doc_gen(this.list_func), 1); for i = 1:length(this.list_func) - this.verifyEqual(isfile(['src/ref/',this.list_func{i},'.md']), true); + this.verifyEqual(isfile(['src/ref/2024-01-01-',this.list_func{i},'.md']), true); end rmdir('src/ref', 's'); end