Changeset 36

Show
Ignore:
Timestamp:
07/10/07 15:05:51 (17 months ago)
Author:
aj
Message:

update wiki export script, document latest changes.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/NEWS

    r35 r36  
    11NEWS for Pam_p11 -- History of user visible changes 
    22 
    3 New in 0.1.2; 2007-07-07 Andreas Jellinghaus 
     3New in 0.1.2; 2007-07-10; Andreas Jellinghaus 
     4* update wiki export script (add images, fix links). 
    45* make some functions static. 
    5 * rename variables to avoid names of glibc functions (e.g. random) 
     6* rename variables to avoid names of glibc functions (e.g. random). 
    67* do not save the password (i.e. pin - shouldn't go anywhere except 
    7   to the card) 
    8  
     8  to the card). 
  • trunk/doc/export-wiki.sh

    r26 r36  
    44 
    55export SERVER=http://www.opensc-project.org 
    6 export WIKI=pam_p11/wiki 
     6export PROJECT=pam_p11 
     7export WIKI=$PROJECT/wiki 
    78export XSL=export-wiki.xsl 
    89 
     
    2526wget -nv $SERVER/$WIKI/TitleIndex -O "$SRCDIR"/TitleIndex.tmp 
    2627 
    27 grep "\"/$WIKI/[^\"]*\"" "$SRCDIR"/TitleIndex.tmp \ 
     28sed -e "s#</li>#</li>\n#g" < "$SRCDIR"/TitleIndex.tmp \ 
     29        | grep "\"/$WIKI/[^\"]*\"" \ 
    2830        |sed -e "s#.*\"/$WIKI/\([^\"]*\)\".*#\1#g" \ 
    2931        > "$SRCDIR"/WikiWords.tmp 
     
    3537        F=`echo $A|sed -e 's/\//_/g'` 
    3638        wget -nv $SERVER/$WIKI/$A  -O "$SRCDIR"/$F.tmp 
    37         xsltproc --output "$SRCDIR"/$F.html "$SRCDIR"/$XSL "$SRCDIR"/$F.tmp 
     39        xsltproc --nonet --output "$SRCDIR"/$F.html "$SRCDIR"/$XSL "$SRCDIR"/$F.tmp 
    3840        sed -e "s#<a href=\"/$WIKI/\([^\"]*\)\"#<a href=\"\1.html\"#g" \ 
    3941                -i "$SRCDIR"/$F.html 
     
    4547        -O "$SRCDIR"/trac.css 
    4648 
     49cat *.html |grep "<img src=\"/$PROJECT/attachment/wiki" \ 
     50        |sed -e 's/.*<img src="\/'$PROJECT'\/attachment\/wiki\/\([^"]*\)?format=raw".*/\1/g' \ 
     51        |sort -u |while read A 
     52do 
     53        B="`echo $A |tr / _`" 
     54        wget -nv "$SERVER/$PROJECT/attachment/wiki/$A?format=raw" -O $B 
     55        for C in *.html 
     56        do 
     57                sed -e 's#\/'$PROJECT'\/attachment\/wiki\/'$A'?format=raw#'$B'#g' -i $C 
     58        done 
     59done 
     60 
     61for A in *.html 
     62do 
     63        sed -e 's#href="/'$PROJECT'/wiki/\([^"]*\)"#href="\1.html"#g' \ 
     64                -i $A 
     65done 
     66 
    4767rm "$SRCDIR"/*.tmp