Difference between revisions of "Wiki2html"

From VNUML-WIKI
Jump to: navigation, search
Line 14: Line 14:
 
   cd vnumlweb
 
   cd vnumlweb
 
   httrack www.dit.upm.es/vnuml
 
   httrack www.dit.upm.es/vnuml
 +
 +
<li>Create a script named vnuml-clean-web with the following content:
 +
 +
<pre>
 +
#!/bin/bash
 +
 +
for X in *
 +
do
 +
  echo "Filtering file $X"
 +
  cp $X $X.tmp
 +
  cat $X.tmp                                        | \
 +
  sed -e '/BEGINMENU/,/ENDMENU/d'                  | \
 +
  sed -e '/BEGINSEARCH/,/ENDSEARCH/d'              | \
 +
  sed -e '/BEGINPERSONALTOOLS/,/ENDPERSONALTOOLS/d' | \
 +
  sed -e '/BEGINTOOLBOX2/,/ENDTOOLBOX2/d'          | \
 +
  sed -e 's/<span class="editsection">.*]<\/span>//g' \
 +
    > $X
 +
  rm $X.tmp
 +
 +
done
 +
</pre>
 +
 +
<li>Execute that script on the directory where the main files reside, that is:
 +
</li>
 +
 +
  cd www.dit.upm.es/vnuml
 +
  cd index.php
 +
  vnuml-clean-web
  
  

Revision as of 00:52, 12 March 2007

How to generate a local html copy of the documentation from the VNUML wiki

Tested on Suse linux, although it should work on any distribution.

  1. Download and install htttrack from http://www.httrack.com/
  2. Get a copy of VNUML wiki:
  3.  mkdir vnumlweb
     cd vnumlweb
     httrack www.dit.upm.es/vnuml
    
  4. Create a script named vnuml-clean-web with the following content:
    #!/bin/bash
    
    for X in *
    do
      echo "Filtering file $X"
      cp $X $X.tmp
      cat $X.tmp                                        | \
      sed -e '/BEGINMENU/,/ENDMENU/d'                   | \
      sed -e '/BEGINSEARCH/,/ENDSEARCH/d'               | \
      sed -e '/BEGINPERSONALTOOLS/,/ENDPERSONALTOOLS/d' | \
      sed -e '/BEGINTOOLBOX2/,/ENDTOOLBOX2/d'           | \
      sed -e 's/<span class="editsection">.*]<\/span>//g' \
        > $X
      rm $X.tmp
    
    done
    
  5. Execute that script on the directory where the main files reside, that is:
  6.  cd www.dit.upm.es/vnuml
     cd index.php
     vnuml-clean-web