%% galleryAmP % Creates taxon_jpg.html in current directory %% function galleryAmP(taxon) % created 2021/03/07 Bas Kooijman, modified 2022/07/18 %% Syntax % <../galleryAmP.m *galleryAmP*> (taxon) %% Description % Writes html file with jpg's with name taxon_jpg.html in current directory, where taxon is replaced by name of taxon. % The html is opened in the system browser. % A click on a picture opens species_tree.html at the clicked taxon, where you can see the name of the species and its phylogenetic position. % Refresh the picture-page if you return to it, to reset previous selections. % % Input % % * taxon: string with name of taxon %% Remarks % Tree-view works for browsers Edge, Chrome and Firefox, but might require reload, by clicking on the picture in the tree, to present the result properly. %% Example of use % galleryAmP('Mollusca'), which results in opening Mollusca_jpg.html taxa = list_taxa(taxon,1); n_taxa = length(taxa); fnm = [taxon, '_jpg.html']; oid = fopen(fnm, 'w+'); % open file for writing, delete existing content path2jpg = [set_path2server, 'add_my_pet/img/tree/']; path2sys = [set_path2server, 'add_my_pet/sys/']; path2amp = [set_path2server, 'add_my_pet/']; fprintf(oid, '\n'); fprintf(oid, '\n'); fprintf(oid, '\n'); fprintf(oid, ' %s\n', taxon); fprintf(oid, ' \n\n', path2sys); fprintf(oid, ' \n', path2sys); fprintf(oid, ' \n', path2sys); fprintf(oid, ' \n\n', path2sys); fprintf(oid, ' \n\n'); fprintf(oid, ' \n'); fprintf(oid, '\n\n'); fprintf(oid, '\n\n'); fprintf(oid, '
\n'); fprintf(oid, '
\n'); fprintf(oid, '
\n\n'); for i = 1:n_taxa fprintf(oid, '
\n'); fprintf(oid, ' \n', path2jpg, taxa{i}, taxa{i}); fprintf(oid, '
%s
\n', taxa{i}); fprintf(oid, '
\n'); end fprintf(oid, '
\n\n'); fprintf(oid, '
\n'); fprintf(oid, '
\n'); fprintf(oid, '\n'); fprintf(oid, '\n'); fclose(oid); web(fnm,'-browser') end