Scilab Function
eng - fr


generate_swhatis - create main whatis.htm file of the html documentation of the toolbox

Library

Calling Sequence

generate_swhatis(Path,lang)

Parameters

File content


//Fonction qui genère le fichier whatis.htm
//des man pages de modnum
//Entrée : Path chemin ou enregister le fichier
function generate_swhatis(Path,lang)

   [lsh,rsh]=argn(0)
   if rsh<2 then
    if ~exists('lang') then
     lang='eng'
    elseif lang<>'eng' & lang<>'fr' then
     lang='eng'
    end
   end

   if lang=='fr' then
    l_i=2;
   else
    l_i=1;
   end

   tt_tile=['Scicos Diagrams','Diagrammes Scicos'
   'Chaotic dynamical systems','Systèmes dynamiques chaotiques'
   'Continous time systems','Systèmes à temps continu'
   'Discrete time systems','Systèmes à temps discret'
   'Oscillators and Phase Locked Loop systems','Oscillateurs et boucles à verrouillage de phase'
   'Open loop models of oscillators','Modèles boucle ouverte d''oscillateurs'
   'Integer N Frequency synthesizers','Synthétiseurs de fréquence à rapport de division N entier'
   'Fractional N/N+1 Frequency synthesizers','Synthétiseurs de fréquence à rapport de division fractionnaire'
   'Communication systems','Systèmes de communication'
   'PSK/QAM Transmission','Transmission PSK/QAM'
   'Delta-Sigma Transmission','Transmission Sigma-Delta'
   'FSK chaotic transmission','Transmission chaotique FSK'
   'Electrical circuits','Circuits électriques'
   'Simulation Scilab scripts','Scripts Scilab de simulations'
   'Simulations of chaotic systems','Simulations de systèmes chaotiques'
   'Simulations of oscillators and Phase Locked Loops','Simulations d''oscillateurs et de boucles à verrouillage de phase'
   'Simulations of communication systems','Simulations de systèmes de communication'
   'Scicos blocks','Blocs Scicos'
   'Scilab function libraries','Fonctions Scilab'
   'Communication','Communication'
   'Modnum internals','Guide interne de Modnum'
   'Utility Scilab scripts','Scripts Scilab utilitaires'
   'Utility macros libraries','Macros Scilab utilitaires'
   'Documentation generator macro libraries','Librairies Scilab du générateur de documentation'
   'Low level routines','Routines de calcul bas-niveau']

   printf("whatis.htm file generation... ")
   lines(0);
   //----------------------------------------------------------------------------------------
   //Header
   //----------------------------------------------------------------------------------------
   if lang=='fr' then
     whatis_title='Documentation Modnum'
   else
     whatis_title='Modnum Documentation'
   end
    head=["<html>"
         "<head>"
         "  <meta http-equiv=""Content-Type"" content=""text/html; charset=ISO-8859-1"">"
         "    <title>"+whatis_title+"</title>"
         "</head>"
         "<body bgcolor=""#FFFFFF"">"
         "<DIV ALIGN=""CENTER"">'
         whatis_title
         "<BR>"
         "<A HREF=""../eng/whatis.htm"">eng</A> - "
         "<A HREF=""../fr/whatis.htm"">fr</A>"
         "<font color=""black"">"
         "<BR>"
         "</DIV>"
         "<BR>"];
   //----------------------------------------------------------------------------------------
   //Scicos diagrams
   //----------------------------------------------------------------------------------------
   k=1;
   line(k)="<BR>";k=k+1;
   line(k)="<b><LI>"+tt_tile(1,l_i)+"</b>";k=k+1 //Scicos Diagrams
   line(k)="<UL>";k=k+1
   line(k)="<BR>";k=k+1;

   line(k)="<LI>"+tt_tile(5,l_i);k=k+1 //Oscillators and Phase Locked Loop systems
   line(k)="<UL>";k=k+1

   if diagr_os<>[] then
     line(k)="<P>";k=k+1
     line(k)="<LI>"+tt_tile(6,l_i);k=k+1 //Open loop models of oscillators
     for j=1:size(diagr_os,1)
       desc=return_xml_sdesc(xml_path+lang+'/'+diagr_os(j,2)+'.xml')
       line(k)="<BR><A HREF="""+diagr_os(j,2)+".htm"">"+...
       convstr(part(diagr_os(j,2),1),'u')+part(diagr_os(j,2),2:length(diagr_os(j,2)))+"</A> - "+...
       desc;k=k+1;
     end
     line(k)="</P>";k=k+1
   end

   if diagr_is<>[] then
     line(k)="<P>";k=k+1
     line(k)="<LI>"+tt_tile(7,l_i);k=k+1 //Integer N Frequency synthesizers
     for j=1:size(diagr_is,1)
       desc=return_xml_sdesc(xml_path+lang+'/'+diagr_is(j,2)+'.xml')
       line(k)="<BR><A HREF="""+diagr_is(j,2)+".htm"">"+...
       convstr(part(diagr_is(j,2),1),'u')+part(diagr_is(j,2),2:length(diagr_is(j,2)))+"</A> - "+...
       desc;k=k+1;
     end
     line(k)="</P>";k=k+1
   end

   if diagr_fs<>[] then
     line(k)="<P>";k=k+1
     line(k)="<LI>"+tt_tile(8,l_i);k=k+1 //Fractional N/N+1 Frequency synthesizers
     for j=1:size(diagr_fs,1)
       desc=return_xml_sdesc(xml_path+lang+'/'+diagr_fs(j,2)+'.xml')
       line(k)="<BR><A HREF="""+diagr_fs(j,2)+".htm"">"+...
       convstr(part(diagr_fs(j,2),1),'u')+part(diagr_fs(j,2),2:length(diagr_fs(j,2)))+"</A> - "+...
       desc;k=k+1;
     end
     line(k)="</P>";k=k+1
   end
   line(k)="<BR>";k=k+1
   line(k)="</UL>";k=k+1//close pll

   line(k)="<LI>"+tt_tile(9,l_i);k=k+1 //Communication systems
   line(k)="<UL>";k=k+1
   if diagr_PSK<>[] then
     line(k)="<P>";k=k+1
     line(k)="<LI>"+tt_tile(10,l_i);k=k+1 //PSK/QAM Transmission
     for j=1:size(diagr_PSK,1)
       desc=return_xml_sdesc(xml_path+lang+'/'+diagr_PSK(j,2)+'.xml')
       line(k)="<BR><A HREF="""+diagr_PSK(j,2)+".htm"">"+...
       convstr(part(diagr_PSK(j,2),1),'u')+part(diagr_PSK(j,2),2:length(diagr_PSK(j,2)))+"</A> - "+...
       desc;k=k+1;
     end
     line(k)="</P>";k=k+1//close PSK Transmission
   end

   if diagr_SD<>[] then
     line(k)="<P>";k=k+1
     line(k)="<LI>"+tt_tile(11,l_i);k=k+1 //Delta-Sigma Transmission
     for j=1:size(diagr_SD,1)
       desc=return_xml_sdesc(xml_path+lang+'/'+diagr_SD(j,2)+'.xml')
       line(k)="<BR><A HREF="""+diagr_SD(j,2)+".htm"">"+...
       convstr(part(diagr_SD(j,2),1),'u')+part(diagr_SD(j,2),2:length(diagr_SD(j,2)))+"</A> - "+...
       desc;k=k+1;
     end
     line(k)="</P>";k=k+1//close Delta-Sigma Transmission
   end

   if diagr_FSK_chaos<>[] then
     line(k)="<P>";k=k+1
     line(k)="<LI>"+tt_tile(12,l_i);k=k+1 //chaotic FSK Transmission
     for j=1:size(diagr_FSK_chaos,1)
       desc=return_xml_sdesc(xml_path+lang+'/'+diagr_FSK_chaos(j,2)+'.xml')
       line(k)="<BR><A HREF="""+diagr_FSK_chaos(j,2)+".htm"">"+...
       convstr(part(diagr_FSK_chaos(j,2),1),'u')+part(diagr_FSK_chaos(j,2),2:length(diagr_FSK_chaos(j,2)))+"</A> - "+...
       desc;k=k+1;
     end
     line(k)="</P>";k=k+1//close Delta-Sigma Transmission
   end
   line(k)="</UL>";k=k+1//close Comm sys

   line(k)="<BR>";k=k+1
   line(k)="<LI>"+tt_tile(2,l_i);k=k+1 //Chaotic dynamical systems
   line(k)="<UL>";k=k+1
   if diagr_cs<>[] then
     line(k)="<P>";k=k+1
     line(k)="<LI>"+tt_tile(3,l_i);k=k+1 //Continous time systems
     for j=1:size(diagr_cs,1)
       desc=return_xml_sdesc(xml_path+lang+'/'+diagr_cs(j,2)+'.xml')
       line(k)="<BR><A HREF="""+diagr_cs(j,2)+".htm"">"+...
       convstr(part(diagr_cs(j,2),1),'u')+part(diagr_cs(j,2),2:length(diagr_cs(j,2)))+"</A> - "+...
       desc;k=k+1;
     end
     line(k)="</P>";k=k+1
   end
   if diagr_ds<>[] then
     line(k)="<P>";k=k+1
     line(k)="<LI>"+tt_tile(4,l_i);k=k+1 //Discrete time systems
     for j=1:size(diagr_ds,1)
       desc=return_xml_sdesc(xml_path+lang+'/'+diagr_ds(j,2)+'.xml')
       line(k)="<BR><A HREF="""+diagr_ds(j,2)+".htm"">"+...
       convstr(part(diagr_ds(j,2),1),'u')+part(diagr_ds(j,2),2:length(diagr_ds(j,2)))+"</A> - "+...
       desc;k=k+1;
     end
     line(k)="</P>";k=k+1
   end
   line(k)="</UL>";k=k+1

   if diagr_elec<>[] then
     line(k)="<P>";k=k+1
     line(k)="<LI>"+tt_tile(13,l_i);k=k+1 //Electrical circuits
     for j=1:size(diagr_elec,1)
       desc=return_xml_sdesc(xml_path+lang+'/'+diagr_elec(j,2)+'.xml')
       line(k)="<BR><A HREF="""+diagr_elec(j,2)+".htm"">"+...
       convstr(part(diagr_elec(j,2),1),'u')+part(diagr_elec(j,2),2:length(diagr_elec(j,2)))+"</A> - "+...
       desc;k=k+1;
     end
     line(k)="</P>";k=k+1//close Electrical circuit
   end

   line(k)="</UL>";k=k+1 //close Scicos diagram

   //----------------------------------------------------------------------------------------
   //Scilab simulation scripts
   //----------------------------------------------------------------------------------------   
   line(k)="<BR>";k=k+1;
   line(k)="<b><LI>"+tt_tile(14,l_i)+"</b>";k=k+1 //Simulation Scilab scripts
   line(k)="<UL>";k=k+1

   if sim_chaos<>[] then
     line(k)="<P>";k=k+1
     line(k)="<LI>"+tt_tile(15,l_i);k=k+1 //Simulations of chaotic systems
     for j=1:size(sim_chaos,1)
       desc=return_xml_sdesc(xml_path+lang+'/'+sim_chaos(j,2)+'.xml')
       line(k)="<BR><A HREF="""+sim_chaos(j,2)+".htm"">"+...
       convstr(part(sim_chaos(j,2),1),'u')+part(sim_chaos(j,2),2:length(sim_chaos(j,2)))+"</A> - "+...
       desc;k=k+1;
     end
     line(k)="</P>";k=k+1
   end

   if sim_synthe<>[] then
     line(k)="<P>";k=k+1
     line(k)="<LI>"+tt_tile(16,l_i);k=k+1 //Simulations of oscillators and Phase Locked Loops
     for j=1:size(sim_synthe,1)
       desc=return_xml_sdesc(xml_path+lang+'/'+sim_synthe(j,2)+'.xml')
       line(k)="<BR><A HREF="""+sim_synthe(j,2)+".htm"">"+...
       convstr(part(sim_synthe(j,2),1),'u')+part(sim_synthe(j,2),2:length(sim_synthe(j,2)))+"</A> - "+...
       desc;k=k+1;
     end
     line(k)="</P>";k=k+1
   end

   if sim_PSK<>[] then
     line(k)="<P>";k=k+1
     line(k)="<LI>"+tt_tile(17,l_i);k=k+1 //Simulations of communication systems
     for j=1:size(sim_PSK,1)
       desc=return_xml_sdesc(xml_path+lang+'/'+sim_PSK(j,2)+'.xml')
       line(k)="<BR><A HREF="""+sim_PSK(j,2)+".htm"">"+...
       convstr(part(sim_PSK(j,2),1),'u')+part(sim_PSK(j,2),2:length(sim_PSK(j,2)))+"</A> - "+...
       desc;k=k+1;
     end
     line(k)="</P>";k=k+1
   end

   line(k)="</UL>";k=k+1 //close Scilab simulation Scripts

   //----------------------------------------------------------------------------------------
   //Scicos palettes & blocks
   //----------------------------------------------------------------------------------------
   line(k)="<BR>";k=k+1;
   line(k)="<b><LI>"+tt_tile(18,l_i)+"</b>";k=k+1 //Scicos blocks
   line(k)="<UL>";k=k+1
   Palrep=return_dir_in_dir(tt_ml,pal_path)
   for j=1:size(Palrep,1)
     PalName=basename(part(Palrep(j),1:length(Palrep(j))-1));
     desc=return_xml_sdesc(xml_path+lang+'/'+PalName+'.xml')
     line(k)="<P>"; k=k+1;
     line(k)="<LI><A HREF="""+PalName+".htm"">"+PalName+"</A> - "+desc;k=k+1;
     lisf_blocks=return_ext_file_in_dir(tt_ml,Palrep(j),'.sci');
     for i=1:size(lisf_blocks,1)
      name=basename(lisf_blocks(i,1));
      desc=return_xml_sdesc(xml_path+lang+'/'+name+'.xml')
      line(k)="<BR><A HREF="""+name+".htm"">"+name+"</A> - "+desc;
      k=k+1;
     end
     line(k)=["</P>"];k=k+1;
   end
   line(k)=["</UL>"];k=k+1;

   //----------------------------------------------------------------------------------------
   //Scilab functions
   //----------------------------------------------------------------------------------------
   line(k)="<BR>";k=k+1;
   line(k)="<b><LI>"+tt_tile(19,l_i)+"</b>";k=k+1  //Scilab function libraries
   line(k)="<UL>";k=k+1
   Librep=return_dir_in_dir(tt_ml,mac_path)
   for j=1:size(Librep,1)
     LibName=basename(part(Librep(j),1:length(Librep(j))-1));
     if grep(LibName,ex_lib_name)==[] then
        desc=return_xml_sdesc(xml_path+lang+'/'+LibName+'.xml')
        line(k)="<P>"; k=k+1;
        line(k)="<LI><A HREF="""+LibName+".htm"">"+...
                             convstr(part(LibName,1),'u')+part(LibName,2:length(LibName))+...
                             "</A> - "+desc;k=k+1;
        lisf_sci=return_ext_file_in_dir(tt_ml,Librep(j),'.sci');
        for i=1:size(lisf_sci,1)
          name=basename(lisf_sci(i,1));
          desc=return_xml_sdesc(xml_path+lang+'/'+name+'.xml');
          line(k)="<BR><A HREF="""+name+".htm"">"+name+"</A> - "+desc;
          k=k+1;
        end
        line(k)=["</P>"];k=k+1;
     end
   end
   //Mod_num_sci_lib
   LibName=mod_num_sci_lib
   desc=return_xml_sdesc(xml_path+lang+'/'+LibName+'.xml')
   line(k)="<P>"; k=k+1;
   line(k)="<LI><A HREF="""+LibName+".htm"">"+tt_tile(20,l_i)+"</A> - "+desc; //Communication function
   k=k+1;
   for i=1:size(modnum_sci_func,1)
     desc=return_xml_sdesc(xml_path+lang+'/'+modnum_sci_func(i)+'.xml')
     line(k)="<BR><A HREF="""+modnum_sci_func(i)+".htm"">"+modnum_sci_func(i)+"</A> - "+desc;
     k=k+1;
   end
   line(k)="</P>";k=k+1;
   line(k)="</UL>";k=k+1//close Scilab Functions

   //----------------------------------------------------------------------------------------
   //modnum internals
   //----------------------------------------------------------------------------------------   
   line(k)="<BR>";k=k+1;
   line(k)="<LI><b>"+tt_tile(21,l_i)+"</b>";k=k+1 //MODNUM internals
   line(k)="<UL>";k=k+1

   //----------------------------------------------------------------------------------------
   //Utility script
   //----------------------------------------------------------------------------------------
   //builder
   //load_generate_doc_function
   line(k)="<P>";k=k+1
   line(k)="<LI>"+tt_tile(22,l_i);k=k+1 //Utility scilab scripts
   if sce_all<>[] then
     for j=1:size(sce_all,1)
       desc=return_xml_sdesc(xml_path+lang+'/'+sce_all(j,2)+'.xml')
       line(k)="<BR><A HREF="""+sce_all(j,2)+".htm"">"+...
       convstr(part(sce_all(j,2),1),'u')+part(sce_all(j,2),2:length(sce_all(j,2)))+"</A> - "+...
       desc;k=k+1;
     end
     line(k)="</P>";k=k+1
   end
   line(k)="<BR>";k=k+1;

   //----------------------------------------------------------------------------------------
   //Utility macro libraries
   //----------------------------------------------------------------------------------------
   line(k)="<BR>";k=k+1;
   line(k)="<LI>"+tt_tile(23,l_i);k=k+1 //Utility macros libraries
   line(k)="<UL>";k=k+1
   Librep=return_dir_in_dir(tt_ml,mac_path)
   for j=1:size(Librep,1)
     LibName=basename(part(Librep(j),1:length(Librep(j))-1));
     if grep(LibName,lib_build)<>[] then
        desc=return_xml_sdesc(xml_path+lang+'/'+LibName+'.xml')
        line(k)="<P>"; k=k+1;
        line(k)="<LI><A HREF="""+LibName+".htm"">"+...
                             convstr(part(LibName,1),'u')+part(LibName,2:length(LibName))+...
                             "</A> - "+desc;k=k+1;
        lisf_sci=return_ext_file_in_dir(tt_ml,Librep(j),'.sci');
        for i=1:size(lisf_sci,1)
          name=basename(lisf_sci(i,1));
          desc=return_xml_sdesc(xml_path+lang+'/'+name+'.xml');
          line(k)="<BR><A HREF="""+name+".htm"">"+name+"</A> - "+desc;
          k=k+1;
        end
        line(k)=["</P>"];k=k+1;
     end
   end
   line(k)=["</UL>"];k=k+1;

   //----------------------------------------------------------------------------------------
   //Documentation generator macro libraries
   //----------------------------------------------------------------------------------------
   line(k)="<BR>";k=k+1;
   line(k)="<LI>"+tt_tile(24,l_i);k=k+1 //Documentation generator macro libraries
   line(k)="<UL>";k=k+1
   Librep=return_dir_in_dir(tt_ml,mac_path)
   for j=1:size(Librep,1)
     LibName=basename(part(Librep(j),1:length(Librep(j))-1));
     if grep(LibName,lib_gen_doc)<>[] then
        desc=return_xml_sdesc(xml_path+lang+'/'+LibName+'.xml')
        line(k)="<P>"; k=k+1;
        line(k)="<LI><A HREF="""+LibName+".htm"">"+...
                             convstr(part(LibName,1),'u')+part(LibName,2:length(LibName))+...
                             "</A> - "+desc;k=k+1;
        lisf_sci=return_ext_file_in_dir(tt_ml,Librep(j),'.sci');
        for i=1:size(lisf_sci,1)
          name=basename(lisf_sci(i,1));
          desc=return_xml_sdesc(xml_path+lang+'/'+name+'.xml');
          line(k)="<BR><A HREF="""+name+".htm"">"+name+"</A> - "+desc;
          k=k+1;
        end
        line(k)=["</P>"];k=k+1;
     end
   end
   line(k)=["</UL>"];k=k+1;

   //low level routines
   LibName=mod_num_rout_lib
   desc=return_xml_sdesc(xml_path+lang+'/'+LibName+'.xml')
   line(k)="<P>"; k=k+1;
   line(k)="<LI><A HREF="""+LibName+".htm"">"+tt_tile(25,l_i)+"</A> - "+desc;k=k+1 //Low level routines
   lisf_rout=return_ext_file_in_dir(tt_ml,low_rout_path,".c")
   for i=1:size(lisf_rout,1)
      name=basename(lisf_rout(i,1));
      desc=return_xml_sdesc(xml_path+lang+'/'+name+'.xml')
      line(k)="<BR><A HREF="""+name+".htm"">"+name+"</A> - "+desc;
      k=k+1;
   end
   line(k)="</P>";k=k+1;//close Low-level routines

   line(k)="</UL>";k=k+1//close MODNUM internals
   //----------------------------------------------------------------------------------------
   //Foot
   //----------------------------------------------------------------------------------------   
   text = [head;line;"</dl></body></html>"];
   mputl(text,Path+"whatis.htm");
   printf("Done\n");
endfunction

Authors

IRCOM Group Alan Layec