[pkg-opensc-commit] [pam-p11] 31/66: update wiki export script, document latest changes.
Eric Dorland
eric at moszumanska.debian.org
Tue Jun 13 04:06:50 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository pam-p11.
commit 146fd5e0a95a2f27865c9a3b6167a7e1ba050a50
Author: Andreas Jellinghaus <andreas at ionisiert.de>
Date: Tue Jul 10 13:05:51 2007 +0000
update wiki export script, document latest changes.
---
NEWS | 8 ++++----
doc/export-wiki.sh | 26 +++++++++++++++++++++++---
2 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/NEWS b/NEWS
index 048458c..b96895f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,8 @@
NEWS for Pam_p11 -- History of user visible changes
-New in 0.1.2; 2007-07-07 Andreas Jellinghaus
+New in 0.1.2; 2007-07-10; Andreas Jellinghaus
+* update wiki export script (add images, fix links).
* make some functions static.
-* rename variables to avoid names of glibc functions (e.g. random)
+* rename variables to avoid names of glibc functions (e.g. random).
* do not save the password (i.e. pin - shouldn't go anywhere except
- to the card)
-
+ to the card).
diff --git a/doc/export-wiki.sh b/doc/export-wiki.sh
index 072cf43..e5f6242 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=pam_p11/wiki
+export PROJECT=pam_p11
+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/pam-p11.git
More information about the pkg-opensc-commit
mailing list