How to make the doc visible in the file exchange after git hub connexion ?
Mostra commenti meno recenti
Hi,
After I connected my mesh_processing_toolbox, to Git hub its documentation is no longer visible in the "Examples" tab (it was before).
I didn't change anything, to the package.
Anyone know how I could fix this. The documentation matters.
Thank you for help.
Best,
Nicolas
11 Commenti
Rik
il 8 Lug 2020
You might have to contact support, but I'm interested in the answer as well. They do look in this forum from time to time, so a staff member might see your question.
Nicolas Douillet
il 8 Lug 2020
Adam Danz
il 8 Lug 2020
+1, me too.
It would be really helpful if how to properly document a FEX was better documented. From what I just tried to figure out, you need an HTML file with the same name as your m-file in an 'html' subdirectory. However, there doesn't seem to be a good way to get this HTML file, so you can use something like this:
function publish_help(fun_name,varargin)
if nargin==0,fun_name='MyFun';end
[~,fun_name]=fileparts(fun_name);%remove .m
s=help(fun_name);
txt=strsplit(s,char(10)); %#ok<CHARTEN>
while numel(txt{end})==0,txt(end)=[];end%remove empty lines at the end
[~,fn]=fileparts(tempname);
fid=fopen([fn '.m'],'w');
for n=1:numel(txt)
if n==numel(txt),newline='';else,newline='\n';end
line=txt{n};
fprintf(fid,['%%%s' newline],line);
end
fclose(fid);
publish(fn,varargin{:});
delete([fn '.m']);
movefile(['html' filesep fn '.html'],['html' filesep fun_name '.html']);
end
I really hope the solution isn't to move everything over to mlx. That would break so many things. I would really prefer not to have an additional step of adding an mlx copy just to get this tab to work.
Nicolas Douillet
il 8 Lug 2020
Stephen23
il 8 Lug 2020
"However, there doesn't seem to be a good way to get this HTML file"
Clicking the Publish button works for me. The default format is HTML, so I didn't need to change anything.
Rik
il 8 Lug 2020
Except that this includes all the code (which I guess makes sense in the context of an example file) and tries to run it.
I guess I just expected a different thing from something called 'publish'.
Stephen23
il 9 Lug 2020
"Except that this includes all the code ... and tries to run it."
Yes. This is very useful for providing example documentation on FEX and apparently is also used for TMW blogs:
Your function appears to create an HTML version of an Mfile: what is the use-case of this?
I looked at some of your FEX submissions but none of them had any HTML documentation displayed.
Rik
il 9 Lug 2020
My use-case is to have an HTML documentation page. And you're correct that none of my submissions currently have that.
Using doc('MyFunction') is nice, but having more options for the layout would be nicer, and the publishing tool looked to me like it is supposed to do that.
Stephen23
il 25 Set 2020
"...having more options for the layout would be nicer..."
Perhaps this might help: https://www.mathworks.com/matlabcentral/fileexchange/78059-prettify-matlab-html
Rik
il 25 Set 2020
Thanks for the suggestion, I will look into it.
Risposta accettata
Più risposte (1)
Nicolas Douillet
il 24 Set 2020
0 voti
1 Commento
Rik
il 24 Set 2020
I have made a Mathworks employee aware of this issue when I happened to have contact, and I'm sure that person has forwarded that bug-report to the appropriate team. My personal estimate is that it will take until the next big update to the FEX until it is solved.
Categorie
Scopri di più su Whos in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!