Wiki2html

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



Download and install htttrack from http://www.httrack.com/ 

Get a copy of VNUML wiki: 

mkdir vnumlweb cd vnumlweb httrack http://www.dit.upm.es/vnuml

Create a script named vnuml-clean-web with the content shown below.

Execute that script on the directory where the main files reside, that is: 

cd www.dit.upm.es/vnuml cd index.php vnuml-clean-web

Use "--doc-only" option if you want to eliminate the "Navigation" menu on the left side of the pages.

Delete the auxiliary files httrack generate in upper directory (it seems they are not needed): 

cd .. rm index????*.{html,css,php} opensearch_desc.php

Load the index.html file in www.dit.upm.es/vnuml directory and you will have access to the local copy of the documentation. 



vnuml-clean-web script

 * 1) !/bin/bash

FILES=`ls -F1 | sed -e 's/.*\///'`
 * 1) get a list of files, excluding directories

for X in $FILES do echo "Filtering file $X" cp $X $X.tmp cat $X.tmp | \ awk 'BEGIN {RS="" } { gsub(".*", "", $0); gsub(".*", "", $0); gsub(".*", "", $0); gsub(".*", "", $0); print $0 }' > $X
 * 1) Process each file

if [ "$1" == "--doc-only" ]; then # Remove navigation menu cp $X $X.tmp cat $X.tmp | \ awk 'BEGIN {RS="" } { # delete navigation sidebar gsub(".*", "", $0); # change image link from Main_Page to Docintro.html gsub("Home", "<a href=\"Docintro.html\" id=\"home\">Home</a>", $0); print $0 }' > $X fi rm $X.tmp

done

cd ../skins/fratman_enhanced CSSFILE=`ls main????.css` echo "Changing style sheet: $CSSFILE" echo ".editsection { visibility: hidden }" >> $CSSFILE cd ../../index.php
 * 1) get css file name

Old version:


 * 1) !/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>//g' \ > $X rm $X.tmp

done