Skip to content

Commit

Permalink
Dev: fix and update gendoc()
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Roslovets committed Nov 19, 2019
1 parent 889a385 commit 57aa909
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ File Exchange entry: [Toolbox Extender](https://www.mathworks.com/matlabcentral/

## Requirements

- **MATLAB R2019a** or later
- **MATLAB R2019b** or later
- Installed Git for **Dev** and **Updater** functionality
- Public toolbox project on GitHub for **Updater** functionality

Expand Down
2 changes: 1 addition & 1 deletion ToolboxConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<pname>ToolboxExtender.prj</pname>
<type>toolbox</type>
<remote>https://github.com/ETMC-Exponenta/ToolboxExtender</remote>
<extv>1.9.2</extv>
<extv>2.2.0</extv>
</config>
<!--Toolbox Extender configuration file. DO NOT DELETE-->
10 changes: 5 additions & 5 deletions ToolboxDev.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function gendoc(obj, format, docdir, options)
format = "html"
docdir = fullfile(obj.ext.root, 'doc')
options.TargetDir = docdir
options.ShowCredentials = false
options.AddCredentials = false
end
format = string(format);
docdir = strip(docdir, '/');
Expand All @@ -133,7 +133,7 @@ function gendoc(obj, format, docdir, options)
if convert
fprintf('Converting %s.mlx...\n', fname);
if format == "md"
obj.mlx2md(fs.path(i), respath, options.ShowCredentials);
obj.mlx2md(fs.path(i), respath, options.AddCredentials);
else
matlab.internal.liveeditor.openAndConvert(fs.path(i), respath);
end
Expand Down Expand Up @@ -245,10 +245,10 @@ function tag(obj, vp)

methods (Hidden = true)

function mlx2md(obj, fpath, htmlpath, showcred)
function mlx2md(obj, fpath, htmlpath, addcred)
% Convert mlx-script to markdown md-file (beta)
if nargin < 4
showcred = false;
addcred = false;
end
[~, fname] = fileparts(fpath);
tempf = "_temp_" + fname + ".m";
Expand Down Expand Up @@ -309,7 +309,7 @@ function mlx2md(obj, fpath, htmlpath, showcred)
urls = extractBefore(links, ' ');
names = extractAfter(links, ' ');
txt = replace(txt, "<" + links + ">", "[" + names + "](" + urls + ")");
if showcred
if addcred
txt(end+1) = sprintf("***\n*Generated from %s.mlx with [Toolbox Extender](%s)*",...
fname, 'https://github.com/ETMC-Exponenta/ToolboxExtender');
end
Expand Down
2 changes: 1 addition & 1 deletion ToolboxExtender.prj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- how to easily store toolbox data (i.e. user preferences) not in the curent folder but in some convinient location
Toolbox Extender address those issues extending built-in MATLAB capabilities of toolbox creating.</param.description>
<param.screenshot>${PROJECT_ROOT}\ToolboxExtender-icon.png</param.screenshot>
<param.version>2.1.0</param.version>
<param.version>2.2.0</param.version>
<param.output>${PROJECT_ROOT}\Toolbox Extender.mltbx</param.output>
<param.products.name />
<param.products.id />
Expand Down
12 changes: 7 additions & 5 deletions doc/ToolboxDev.html

Large diffs are not rendered by default.

Binary file modified doc/ToolboxDev.mlx
Binary file not shown.

0 comments on commit 57aa909

Please sign in to comment.