How to make the doc visible in the file exchange after git hub connexion ?

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

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.
Ok thanks Rik.
Not 100% sure, but after looking at the other authors I figured out it has to be in .mlx format.
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.
Ok, thank you.
I don't know about you, but I already have my doc.m file for most of my contributions.
Once I publish it (e.g. publish('doc.m'); in Matlab console), I automatically get the html folder with its content generated.
I then enclosed it in the .zip and this is all folks.
Personnaly I am going try to convert my .doc files it into .mlx files, or simply write .mlx if no conversion is possible.
"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.
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'.
"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.
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.
"...having more options for the layout would be nicer..."
Thanks for the suggestion, I will look into it.

Accedi per commentare.

 Risposta accettata

To answer the question : after looking at the other file exchange contributors I figured out it has to be in .mlx format.
I still have to try, and will be back here to validate.

2 Commenti

I really hope this answer is not correct. I can't add a .mlx placeholder to my submissions, because mlx has a higher precedence level than m.
And it contradicts the FEX documentation, but that might just be a lack of updating.
Ok Rik, so I did it here for example.
I named it my_function_name_ls.mlx as you can see.
This way I have not a doc, but some illustrated examples, let's say. The doc is however well included in the package as you can see in the Github.
The only thing is that in the examples tab I have in first position this file with my function name and no preview available.

Accedi per commentare.

Più risposte (1)

Ok, I actually still have the same problem (preview not available for documentations one connected to Github).
My live scripts are visible, but they are not equivalent to file documentation.
Thank you for any help / tip.
Nicolas

1 Commento

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.

Accedi per commentare.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by