--- /dev/null
+#!/bin/zsh
+url="$(egrep -o '(^|&)(i=).+(&|$)' <<<"${QUERY_STRING}" |sed -r 's:^&?i=::;s:&.*::;s:\+: :g;s:%:\\x:g')"
+url="$(echo -e "${url}" |sed 's:\t: :g;s:\r::g;s:\\:\\\\:g' |head -n1)"
+rev="$(egrep -o '(^|&)(r=)[0-9]+(&|$)' <<<"${QUERY_STRING}" |tr -d 'r=&')"
+
+baseuri=$(egrep '^repo=.*$' project.meta |cut -d= -f2-)
+lastrev=$(svn info "$baseuri" |egrep '^Revision:' |cut -d\ -f2)
+[ -z "$rev" ] && rev="$lastrev"
+
+cat <<SVNEND
+ <div id="LEFT">
+ <h1>Path:</h1>
+ <a href='?p=Subversion&i=/&r=$rev'>[root]</a>
+SVNEND
+tmp=$url
+until [ -z "$tmp" -o "$tmp" = // ]; do
+ echo "<a href='?p=Subversion&i=$tmp&r=$rev'>/$(basename "$tmp")</a> "
+ tmp=$(dirname "$tmp")/
+done |tac
+echo '<hr><h1>Revisions:</h1>'
+for i in {1.."$lastrev"}; do
+ echo "<a href='?p=Subversion&i=$url&r=$i'>$i</a>"
+done
+
+cat <<SVNEND
+ </div>
+
+ <div id="RIGHT"></div>
+
+ <div id="MAIN">
+ <div class='wikitext'><h1>$(basename "$url"), Revision "$rev":</h1>
+SVNEND
+if (egrep -q '^(.*/|)$' <<<"$url"); then
+ svn ls -r "$rev" "${baseuri}/${url}" |sed -r "s:^.*$:<a href='?p=Subversion\&i=$url/&\&r=$rev'>&</a><br>:g"
+ echo '</div>'
+else
+ lang=$(source-highlight --lang-list |cut -d\ -f1 |grep -x "$(sed 's:.*\.::g' <<<"$url")" || echo sh)
+ grep -q '\.' <<<"$url" || lang=txt
+ svn cat -r "$rev" "${baseuri}/${url}" |source-highlight -s "$lang" #|sed 's:<:\<:g;s:>:\>:g;'
+fi
+cat <<SVNEND
+ </div></div>
+SVNEND
<div id="MENU">
<a href='/?p=Home'>Home</a>
<a href='/?p=Wiki'>Wiki</a>
- <a href='/?p=Code'>Code</a>
+ <a href='/?p=Subversion'>Code</a>
<a href='/?p=Tasks'>Tasks</a>
</div>
$(if [ -r "./${page}.page" ]; then