- Timestamp:
- 07/10/07 13:01:04 (18 months ago)
- Files:
-
- 1 modified
-
trunk/doc/export-wiki.sh (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/export-wiki.sh
r801 r982 4 4 5 5 export SERVER=http://www.opensc-project.org 6 export WIKI=openct/wiki 6 export PROJECT=openct 7 export WIKI=$PROJECT/wiki 7 8 export XSL=export-wiki.xsl 8 9 … … 25 26 wget -nv $SERVER/$WIKI/TitleIndex -O "$SRCDIR"/TitleIndex.tmp 26 27 27 grep "\"/$WIKI/[^\"]*\"" "$SRCDIR"/TitleIndex.tmp \ 28 sed -e "s#</li>#</li>\n#g" < "$SRCDIR"/TitleIndex.tmp \ 29 | grep "\"/$WIKI/[^\"]*\"" \ 28 30 |sed -e "s#.*\"/$WIKI/\([^\"]*\)\".*#\1#g" \ 29 31 > "$SRCDIR"/WikiWords.tmp … … 45 47 -O "$SRCDIR"/trac.css 46 48 49 cat *.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 52 do 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 59 done 60 61 for A in *.html 62 do 63 sed -e 's#href="/'$PROJECT'/wiki/\([^"]*\)"#href="\1.html"#g' \ 64 -i $A 65 done 66 47 67 rm "$SRCDIR"/*.tmp
