[pkg-opensc-commit] [libp11] 110/239: update wiki export scripts.

Eric Dorland eric at moszumanska.debian.org
Sat Oct 17 06:21:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit 6a0c014ae99e67fef0bcaee58ceadd87beddc1da
Author: Andreas Jellinghaus <andreas at ionisiert.de>
Date:   Tue Jul 10 13:04:11 2007 +0000

    update wiki export scripts.
---
 NEWS               |  5 +++--
 doc/export-wiki.sh | 26 +++++++++++++++++++++++---
 2 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/NEWS b/NEWS
index 8fa8b74..d7ae611 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,8 @@
 NEWS for Libp11 -- History of user visible changes
 
-New in 0.2.3; 2007-07-07 Andreas Jellinghaus
-* replaced rsa header files from rsalabs (official) with scute (open source)
+New in 0.2.3; 2007-07-10; Andreas Jellinghaus
+* update wiki export script (add images, fix links).
+* replaced rsa header files from rsalabs (official) with scute (open source).
 * allow CKR_USER_ALREADY_LOGGED_IN on C_Login.
 * mark internal functions as static.
 * add code to store public keys and generate keys.
diff --git a/doc/export-wiki.sh b/doc/export-wiki.sh
index 321a8de..9563fcc 100755
--- a/doc/export-wiki.sh
+++ b/doc/export-wiki.sh
@@ -3,7 +3,8 @@
 set -e
 
 export SERVER=http://www.opensc-project.org
-export WIKI=libp11/wiki
+export PROJECT=libp11
+export WIKI=$PROJECT/wiki
 export XSL=export-wiki.xsl
 
 SRCDIR=.
@@ -24,7 +25,8 @@ rm -rf "$SRCDIR"/*.html "$SRCDIR"/*.css
 
 wget -nv $SERVER/$WIKI/TitleIndex -O "$SRCDIR"/TitleIndex.tmp
 
-grep "\"/$WIKI/[^\"]*\"" "$SRCDIR"/TitleIndex.tmp \
+sed -e "s#</li>#</li>\n#g" < "$SRCDIR"/TitleIndex.tmp \
+	| grep "\"/$WIKI/[^\"]*\"" \
         |sed -e "s#.*\"/$WIKI/\([^\"]*\)\".*#\1#g" \
 	> "$SRCDIR"/WikiWords.tmp
 sed -e /^Trac/d -e /^Wiki/d -e /^TitleIndex/d -e /^RecentChanges/d \
@@ -34,7 +36,7 @@ for A in WikiStart `cat "$SRCDIR"/WikiWords.tmp`
 do
 	F=`echo $A|sed -e 's/\//_/g'`
 	wget -nv $SERVER/$WIKI/$A  -O "$SRCDIR"/$F.tmp
-	xsltproc --output "$SRCDIR"/$F.html "$SRCDIR"/$XSL "$SRCDIR"/$F.tmp
+	xsltproc --nonet --output "$SRCDIR"/$F.html "$SRCDIR"/$XSL "$SRCDIR"/$F.tmp
 	sed -e "s#<a href=\"/$WIKI/\([^\"]*\)\"#<a href=\"\1.html\"#g" \
 		-i "$SRCDIR"/$F.html
 done
@@ -44,4 +46,22 @@ mv "$SRCDIR"/WikiStart.html "$SRCDIR"/index.html
 wget -nv http://www.opensc-project.org/trac/css/trac.css \
 	-O "$SRCDIR"/trac.css
 
+cat *.html |grep "<img src=\"/$PROJECT/attachment/wiki" \
+	|sed -e 's/.*<img src="\/'$PROJECT'\/attachment\/wiki\/\([^"]*\)?format=raw".*/\1/g' \
+	|sort -u |while read A
+do
+	B="`echo $A |tr / _`"
+	wget -nv "$SERVER/$PROJECT/attachment/wiki/$A?format=raw" -O $B
+	for C in *.html
+	do
+		sed -e 's#\/'$PROJECT'\/attachment\/wiki\/'$A'?format=raw#'$B'#g' -i $C
+	done
+done
+
+for A in *.html
+do
+	sed -e 's#href="/'$PROJECT'/wiki/\([^"]*\)"#href="\1.html"#g' \
+		-i $A
+done
+
 rm "$SRCDIR"/*.tmp

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list