cookutils rev 897

Restore web/*: this is for local Busybox-driven web interface.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu May 11 00:14:04 2017 +0300 (2017-05-11)
parents 810344d9b6e0
children 2aaf73fe2cd4
files web/cooker.cgi web/cookiso.cgi web/prism.css web/prism.js web/style.css
line diff
     1.1 --- a/web/cooker.cgi	Fri Apr 21 21:24:26 2017 +0100
     1.2 +++ b/web/cooker.cgi	Thu May 11 00:14:04 2017 +0300
     1.3 @@ -23,222 +23,60 @@
     1.4  cooktime="$CACHE/cooktime"
     1.5  wokrev="$CACHE/wokrev"
     1.6  
     1.7 -# Path to markdown to html convertor
     1.8 -if [ -n "$(which cmark 2>/dev/null)" ]; then
     1.9 -	md2html="$(which cmark) --smart -e table -e strikethrough -e autolink -e tagfilter"
    1.10 -elif [ -x "./cmark" ]; then
    1.11 -	md2html="./cmark --smart -e table -e strikethrough -e autolink -e tagfilter"
    1.12 -elif [ -n "$(which sundown 2>/dev/null)" ]; then
    1.13 -	md2html=$(which sundown)
    1.14 -elif [ -x "./sundown" ]; then
    1.15 -	md2html="./sundown"
    1.16 -fi
    1.17 -
    1.18  # We're not logged and want time zone to display correct server date.
    1.19  export TZ=$(cat /etc/TZ)
    1.20  
    1.21 +case "$QUERY_STRING" in
    1.22 +recook=*)
    1.23 +	case "$HTTP_USER_AGENT" in
    1.24 +	*SliTaz*)
    1.25 +		grep -qs "^${QUERY_STRING#recook=}$" $CACHE/recook-packages ||
    1.26 +		echo ${QUERY_STRING#recook=} >> $CACHE/recook-packages
    1.27 +	esac
    1.28 +	cat <<EOT
    1.29 +Location: ${HTTP_REFERER:-${REQUEST_URI%\?*}}
    1.30  
    1.31 -# HTML page header. Pages can be customized with a separated header.html file
    1.32 +EOT
    1.33 +	exit ;;
    1.34 +poke)
    1.35 +	touch $CACHE/cooker-request
    1.36 +	cat <<EOT
    1.37 +Location: ${HTTP_REFERER:-${REQUEST_URI%\?*}}
    1.38  
    1.39 -page_header() {
    1.40 -	echo -e 'Content-Type: text/html; charset=UTF-8\n'
    1.41 -	if [ -f "header.html" ]; then
    1.42 -		cat header.html
    1.43 -	else
    1.44 -		cat <<EOT
    1.45 -<!DOCTYPE html>
    1.46 -<html lang="en">
    1.47 -<head>
    1.48 -	<meta charset="UTF-8">
    1.49 -	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    1.50 -	<title>SliTaz Cooker</title>
    1.51 -	<link rel="shortcut icon" href="favicon.ico">
    1.52 -	<link rel="stylesheet" href="style.css">
    1.53 -	<script src="prism.js"></script>
    1.54 -	<link rel="stylesheet" href="prism.css">
    1.55 -	<link rel="alternate" type="application/rss+xml" title="Cooker Feed" href="?rss">
    1.56 -	<meta name="robots" content="nofollow">
    1.57 -</head>
    1.58 -<body>
    1.59 +EOT
    1.60 +	exit ;;
    1.61 +src*)
    1.62 +	file=$(busybox httpd -d "$SRC/${QUERY_STRING#*=}")
    1.63 +	cat <<EOT
    1.64 +Content-Type: application/octet-stream
    1.65 +Content-Length: $(stat -c %s "$file")
    1.66 +Content-Disposition: attachment; filename="$(basename "$file")"
    1.67  
    1.68 -<div id="header">
    1.69 -	<div id="logo"></div>
    1.70 -	<h1><a href="cooker.cgi">SliTaz Cooker</a></h1>
    1.71 -</div>
    1.72  EOT
    1.73 -	fi
    1.74 -}
    1.75 +	cat "$file"
    1.76 +	exit ;;
    1.77 +download*)
    1.78 +	file=$(busybox httpd -d "$PKGS/${QUERY_STRING#*=}")
    1.79 +	cat <<EOT
    1.80 +Content-Type: application/octet-stream
    1.81 +Content-Length: $(stat -c %s "$file")
    1.82 +Content-Disposition: attachment; filename="$(basename "$file")"
    1.83  
    1.84 +EOT
    1.85 +	cat "$file"
    1.86 +	exit ;;
    1.87 +rss)
    1.88 +	cat <<EOT
    1.89 +Content-Type: application/rss+xml
    1.90  
    1.91 -# HTML page footer. Pages can be customized with a separated footer.html file
    1.92 +EOT
    1.93 +	;;
    1.94 +*)
    1.95 +	cat <<EOT
    1.96 +Content-Type: text/html; charset=utf-8
    1.97  
    1.98 -page_footer() {
    1.99 -	if [ -f "footer.html" ]; then
   1.100 -		cat footer.html
   1.101 -	else
   1.102 -		cat <<EOT
   1.103 -</div>
   1.104 -
   1.105 -<div id="footer">
   1.106 -	<a href="http://www.slitaz.org/">SliTaz Website</a>
   1.107 -	<a href="cooker.cgi">Cooker</a>
   1.108 -	<a href="doc/cookutils/cookutils.html">Documentation</a>
   1.109 -</div>
   1.110 -
   1.111 -</body>
   1.112 -</html>
   1.113  EOT
   1.114 -	fi
   1.115 -}
   1.116 -
   1.117 -
   1.118 -not_found() {
   1.119 -	local file="${1#$PKGS/}"; file="${file#$LOGS/}"; file="${file#$WOK/}"
   1.120 -	echo "HTTP/1.1 404 Not Found"
   1.121 -	page_header
   1.122 -	echo "<div id='content'><h2>Not Found</h2>"
   1.123 -	case $2 in
   1.124 -		pkg)
   1.125 -			echo "<p>The requested package <b>$(basename "$(dirname "$file")")</b> was not found on this server.</p>" ;;
   1.126 -		*)
   1.127 -			echo "<p>The requested file <b>$file</b> was not found on this server.</p>" ;;
   1.128 -	esac
   1.129 -	page_footer
   1.130 -}
   1.131 -
   1.132 -
   1.133 -manage_modified() {
   1.134 -	local file="$1" option="$2" nul day mon year time hh mm ss date_s
   1.135 -	if [ ! -f "$file" ]; then
   1.136 -		if [ "$option" == 'silently-absent' ]; then
   1.137 -			echo "HTTP/1.1 404 Not Found"
   1.138 -			return
   1.139 -		else
   1.140 -			not_found "$file" "$2"
   1.141 -			exit
   1.142 -		fi
   1.143 -	fi
   1.144 -	[ "$option" == 'no-last-modified' ] && return
   1.145 -	if [ -n "$HTTP_IF_MODIFIED_SINCE" ]; then
   1.146 -		echo "$HTTP_IF_MODIFIED_SINCE" | \
   1.147 -		while read nul day mon year time nul; do
   1.148 -			case $mon in
   1.149 -				Jan) mon='01';; Feb) mon='02';; Mar) mon='03';; Apr) mon='04';;
   1.150 -				May) mon='05';; Jun) mon='06';; Jul) mon='07';; Aug) mon='08';;
   1.151 -				Sep) mon='09';; Oct) mon='10';; Nov) mon='11';; Dec) mon='12';;
   1.152 -			esac
   1.153 -			hh=$(echo $time | cut -d: -f1)
   1.154 -			mm=$(echo $time | cut -d: -f2)
   1.155 -			ss=$(echo $time | cut -d: -f3)
   1.156 -			date_s=$(date -ud "$year$mon$day$hh$mm.$ss" +%s)
   1.157 -#			if [ "$date_s" -ge "$(date -ur "$file" +%s)" ]; then
   1.158 -#				echo -e 'HTTP/1.1 304 Not Modified\n'
   1.159 -#				exit
   1.160 -#			fi
   1.161 -# TODO: improve caching control
   1.162 -		done
   1.163 -	fi
   1.164 -	echo "Last-Modified: $(date -Rur "$file" | sed 's|UTC|GMT|')"
   1.165 -	echo "Cache-Control: public, max-age=3600"
   1.166 -}
   1.167 -
   1.168 -
   1.169 -case "$QUERY_STRING" in
   1.170 -	recook=*)
   1.171 -		case "$HTTP_USER_AGENT" in
   1.172 -			*SliTaz*)
   1.173 -				grep -qs "^$(GET recook)$" $CACHE/recook-packages ||
   1.174 -				echo "$(GET recook)" >> $CACHE/recook-packages
   1.175 -		esac
   1.176 -		echo -e "Location: ${HTTP_REFERER:-${REQUEST_URI%\?*}}\n"
   1.177 -		exit
   1.178 -		;;
   1.179 -
   1.180 -	poke)
   1.181 -		touch $CACHE/cooker-request
   1.182 -		echo -e "Location: ${HTTP_REFERER:-${REQUEST_URI%\?*}}\n"
   1.183 -		exit
   1.184 -		;;
   1.185 -
   1.186 -	src*)
   1.187 -		file=$(busybox httpd -d "$SRC/$(GET src)")
   1.188 -		manage_modified "$file"
   1.189 -		content_type='application/octet-stream'
   1.190 -		case $file in
   1.191 -			*.tar.gz)   content_type='application/x-compressed-tar' ;;
   1.192 -			*.tar.bz2)  content_type='application/x-bzip-compressed-tar' ;;
   1.193 -			*.tar.xz)   content_type='application/x-xz-compressed-tar' ;;
   1.194 -			*.tar.lzma) content_type='application/x-lzma-compressed-tar' ;;
   1.195 -			*.zip)      content_type='application/zip' ;;
   1.196 -		esac
   1.197 -		echo "Content-Type: $content_type"
   1.198 -		echo "Content-Length: $(stat -c %s "$file")"
   1.199 -		filename=$(basename "$file")
   1.200 -		echo "Content-Disposition: attachment; filename=\"$filename\"" # Note, no conversion '+' -> '%2B' here
   1.201 -		echo
   1.202 -
   1.203 -		cat "$file"
   1.204 -		exit
   1.205 -		;;
   1.206 -
   1.207 -	download*)
   1.208 -		file="$PKGS/$(GET download)"
   1.209 -		manage_modified "$file"
   1.210 -		content_type='application/octet-stream'
   1.211 -		case $file in
   1.212 -			*.txt|*.conf|*/README|*/receipt)
   1.213 -			              content_type='text/plain; charset=UTF-8' ;;
   1.214 -			*.css)        content_type='text/css; charset=UTF-8' ;;
   1.215 -			*.htm|*.html) content_type='text/html; charset=UTF-8' ;;
   1.216 -			*.js)         content_type='application/javascript; charset=UTF-8' ;;
   1.217 -			*.desktop)    content_type='application/x-desktop; charset=UTF-8' ;;
   1.218 -			*.png)        content_type='image/png' ;;
   1.219 -			*.gif)        content_type='image/gif' ;;
   1.220 -			*.svg)        content_type='image/svg+xml' ;;
   1.221 -			*.jpg|*.jpeg) content_type='image/jpeg' ;;
   1.222 -			*.sh|*.cgi)   content_type='application/x-shellscript' ;;
   1.223 -			*.gz)         content_type='application/gzip' ;;
   1.224 -			*.ico)        content_type='image/vnd.microsoft.icon' ;;
   1.225 -			*.tazpkg)     content_type='application/x-tazpkg' ;;
   1.226 -		esac
   1.227 -
   1.228 -		echo "Content-Type: $content_type"
   1.229 -		echo "Content-Length: $(stat -c %s "$file")"
   1.230 -		filename=$(basename "$file")
   1.231 -		echo "Content-Disposition: inline; filename=\"$filename\"" # Note, no conversion '+' -> '%2B' here
   1.232 -		echo
   1.233 -
   1.234 -		cat "$file"
   1.235 -		exit
   1.236 -		;;
   1.237 -
   1.238 -	rss)
   1.239 -		echo -e 'Content-Type: application/rss+xml\n'
   1.240 -		;;
   1.241 -
   1.242 -	stuff*)
   1.243 -		file="$wok/$(GET stuff)"
   1.244 -		manage_modified "$file"
   1.245 -		;;
   1.246 -
   1.247 -	pkg=*|receipt=*|description=*|files=*|log=*|man=*|doc=*|info=*)
   1.248 -		type=${QUERY_STRING%%=*}
   1.249 -		pkg=$(GET $type)
   1.250 -		case "$type" in
   1.251 -			description)
   1.252 -				manage_modified "$wok/$pkg/receipt" 'no-last-modified'
   1.253 -				manage_modified "$wok/$pkg/description.txt" 'silently-absent'
   1.254 -				;;
   1.255 -			log)
   1.256 -				manage_modified "$wok/${pkg%%.log*}/receipt" 'no-last-modified'
   1.257 -				manage_modified "$LOGS/$pkg"
   1.258 -				;;
   1.259 -			*)
   1.260 -				manage_modified "$wok/$pkg/receipt" pkg
   1.261 -				;;
   1.262 -		esac
   1.263 -		;;
   1.264 -
   1.265 +	;;
   1.266  esac
   1.267  
   1.268  
   1.269 @@ -288,21 +126,20 @@
   1.270  
   1.271  info2html() {
   1.272  	sed \
   1.273 -		-e 's|&|\&amp;|g; s|<|\&lt;|g; s|>|\&gt;|g' \
   1.274 +		-e 's|&|\&amp;|g' -e 's|<|\&lt;|g' \
   1.275  		-e 's|^\* \(.*\)::|* <a href="#\1">\1</a>  |' \
   1.276  		-e 's|\*note \(.*\)::|<a href="#\1">\1</a>|' \
   1.277 -		-e '/^File: / s|(dir)|Top|g' \
   1.278 -		-e '/^File: / s|Next: \([^,]*\)|<a class="button" href="#\1">Next: \1</a>|' \
   1.279 -		-e '/^File: / s|Prev: \([^,]*\)|<a class="button" href="#\1">Prev: \1</a>|' \
   1.280 -		-e '/^File: / s|Up: \([^,]*\)|<a class="button" href="#\1">Up: \1</a>|' \
   1.281 -		-e '/^File: / s|^.* Node: \([^,]*\), *\(.*\)$|<pre id="\1">\2|' \
   1.282 -		-e '/^<pre id=/ s|^\([^>]*>\)\(<a[^>]*>Next: [^,]*\), *\(<a[^>]*>Prev: [^,]*\), *\(<a[^>]*>Up: .*\)|\1 \3 \4 \2|' \
   1.283 +		-e '/^File: /s|(dir)|Top|g' \
   1.284 +		-e '/^File: /s|Node: \([^,]*\)|Node: <a name="\1"></a><u>\1</u>|' \
   1.285 +		-e '/^File: /s|Next: \([^,]*\)|Next: <a href="#\1">\1</a>|' \
   1.286 +		-e '/^File: /s|Prev: \([^,]*\)|Prev: <a href="#\1">\1</a>|' \
   1.287 +		-e '/^File: /s|Up: \([^,]*\)|Up: <a href="#\1">\1</a>|' \
   1.288 +		-e '/^File: /s|^.*$|<i>&</i>|' \
   1.289  		-e '/^Tag Table:$/,/^End Tag Table$/d' \
   1.290  		-e '/INFO-DIR/,/^END-INFO-DIR/d' \
   1.291 -		-e "s|https*://[^>),'\"\`’ ]*|<a href=\"&\">&</a>|g" \
   1.292 +		-e "s|https*://[^>),'\"\` ]*|<a href=\"&\">&</a>|g" \
   1.293  		-e "s|ftp://[^>),\"\` ]*|<a href=\"&\">&</a>|g" \
   1.294 -		-e 's|^\* Menu:|<b>Menu:</b>|' \
   1.295 -		-e "s|^|</pre>|"
   1.296 +		-e "s|^|</pre><pre>|"
   1.297  }
   1.298  
   1.299  
   1.300 @@ -364,43 +201,34 @@
   1.301  					s|\[93m|<span style='color: #FF0'>|;
   1.302  					s|\[94m|<span style='color: #00F'>|;
   1.303  					s|\[95m|<span style='color: #808'>|;
   1.304 -					s|\[96m|<span style='color: #088'>|;
   1.305 +					s|\[96m|<span style='color: #0CC'>|;
   1.306  					s|\[39m|</span>|;"
   1.307 -			;;
   1.308 +				;;
   1.309  
   1.310 -		files)
   1.311 -			sed \
   1.312 -				-e "s|\[[01];31m|<span style='color: #F00'>|g;
   1.313 -					s|\[[01];32m|<span style='color: #080'>|g;
   1.314 -					s|\[[01];33m|<span style='color: #FF0'>|g;
   1.315 -					s|\[[01];34m|<span style='color: #00F'>|g;
   1.316 -					s|\[[01];35m|<span style='color: #808'>|g;
   1.317 -					s|\[[01];36m|<span style='color: #088'>|g;
   1.318 -					s|\[[01];0m|<span style='color: #333'>|g;
   1.319 -					s|\[0m|</span>|g;"
   1.320 -			;;
   1.321 +		receipt)
   1.322 +			sed	-e s'|&|\&amp;|g' -e 's|<|\&lt;|g' -e 's|>|\&gt;|'g \
   1.323 +				-e s"#^\#\([^']*\)#<span class='sh-comment'>\0</span>#"g \
   1.324 +				-e s"#\"\([^']*\)\"#<span class='sh-val'>\0</span>#"g ;;
   1.325 +
   1.326 +		diff)
   1.327 +			sed -e 's|&|\&amp;|g' -e 's|<|\&lt;|g' -e 's|>|\&gt;|g' \
   1.328 +				-e s"#^-\([^']*\).#<span class='span-red'>\0</span>#"g \
   1.329 +				-e s"#^+\([^']*\).#<span class='span-ok'>\0</span>#"g \
   1.330 +				-e s"#@@\([^']*\)@@#<span class='span-sky'>@@\1@@</span>#"g ;;
   1.331  
   1.332  		activity)
   1.333 -			sed s"#^\([^']* : \)#<span class='log-date'>\0</span>#"g
   1.334 -			;;
   1.335 +			sed s"#^\([^']* : \)#<span class='log-date'>\0</span>#"g ;;
   1.336  	esac
   1.337  }
   1.338  
   1.339  
   1.340 -show_code() {
   1.341 -	echo "<pre><code class=\"language-$1\">"
   1.342 -	sed 's|&|\&amp;|g; s|<|\&lt;|g; s|>|\&gt;|g'
   1.343 -	echo '</code></pre>'
   1.344 -}
   1.345 -
   1.346 -
   1.347  # Latest build pkgs.
   1.348  
   1.349  list_packages() {
   1.350  	cd $PKGS
   1.351  	ls -1t *.tazpkg | head -n 20 | \
   1.352  	while read file; do
   1.353 -		echo -n $(TZ=UTC stat -c '%y' $PKGS/$file | cut -d. -f1 | sed s/:[0-9]*$//)
   1.354 +		echo -n $(TZ=UTC stat -c '%y' $PKGS/$file | cut -d . -f 1 | sed s/:[0-9]*$//)
   1.355  		echo " : $file"
   1.356  	done
   1.357  }
   1.358 @@ -409,19 +237,23 @@
   1.359  # Optional full list button
   1.360  
   1.361  more_button() {
   1.362 -	[ $(wc -l < ${3:-$CACHE/$1}) -gt ${4:-12} ] &&
   1.363 -	echo "<a class='button r' href='?file=$1'>$2</a>"
   1.364 +	[ $(wc -l < ${3:-$CACHE/$1}) -gt ${4:-12} ] && cat <<EOT
   1.365 +<div style="float: right;">
   1.366 +	<a class="button" href="?file=$1">$2</a>
   1.367 +</div>
   1.368 +EOT
   1.369  }
   1.370  
   1.371  
   1.372  # Show the running command and its progression
   1.373  
   1.374 -running_command() {
   1.375 +running_command()
   1.376 +{
   1.377  	local state="Not running"
   1.378  	if [ -s "$command" ]; then
   1.379  		state="$(cat $command)"
   1.380  		set -- $(grep "^$state" $cooktime)
   1.381 -		if [ -n "$1" ]; then
   1.382 +		if [ -n "$1" -a $2 -ne 0 ]; then
   1.383  			state="$state $((($(date +%s)-$3)*100/$2))%"
   1.384  			[ $2 -gt 300 ] && state="$state (should end $(date -u -d @$(($2+$3))))"
   1.385  		fi
   1.386 @@ -430,139 +262,43 @@
   1.387  }
   1.388  
   1.389  
   1.390 -datalist() {
   1.391 -	(
   1.392 -		cd $wok
   1.393 +# xHTML header. Pages can be customized with a separated html.header file.
   1.394  
   1.395 -		ls | awk '
   1.396 -		BEGIN{printf("<datalist id=\"packages\">")}
   1.397 -		     {printf("<option>%s</option>",$1)}
   1.398 -		END  {printf("</datalist>")}
   1.399 -		'
   1.400 -	)
   1.401 -}
   1.402 +if [ -f "header.html" ]; then
   1.403 +	cat header.html
   1.404 +else
   1.405 +	cat <<EOT
   1.406 +<!DOCTYPE html>
   1.407 +<html lang="en">
   1.408 +<head>
   1.409 +	<meta charset="UTF-8">
   1.410 +	<title>SliTaz Cooker</title>
   1.411 +	<link rel="shortcut icon" href="favicon.ico">
   1.412 +	<link rel="stylesheet" href="style.css">
   1.413 +	<meta name="robots" content="nofollow">
   1.414 +</head>
   1.415 +<body>
   1.416  
   1.417 +<div id="header">
   1.418 +	<div id="logo"></div>
   1.419 +	<h1><a href="cooker.cgi">SliTaz Cooker</a></h1>
   1.420 +</div>
   1.421  
   1.422 -summary() {
   1.423 -	log="$1"
   1.424 -	pkg="$(basename ${log%%.log*})"
   1.425 -	if [ -f "$log" ]; then
   1.426 -		if grep -q "cook:$pkg$" $command; then
   1.427 -			echo "<pre>The Cooker is currently building: $pkg</pre>"
   1.428 -		fi
   1.429 -		if fgrep -q "Summary for:" $log; then
   1.430 -			echo "<pre>"
   1.431 -			sed '/^Summary for:/,$!d' $log | sed /^$/d | syntax_highlighter log
   1.432 -			echo "</pre>"
   1.433 -		fi
   1.434 -
   1.435 -		if fgrep -q "Debug information" $log; then
   1.436 -			echo '<pre>'
   1.437 -			sed '/^Debug information/,$!d' $log | sed /^$/d | \
   1.438 -			if [ -n "$2" ]; then
   1.439 -				syntax_highlighter log | \
   1.440 -				sed 's|\([0-9][0-9]*\):|<a href="#l\1">\1</a>:|'
   1.441 -			else
   1.442 -				sed 's|^[0-9][0-9]*:||' | syntax_highlighter log
   1.443 -			fi
   1.444 -			echo '</pre>'
   1.445 -		fi
   1.446 -	else
   1.447 -		[ -n "$pkg" -a -d "$wok/$pkg" ] && echo "<pre>No log for $pkg</pre>"
   1.448 -	fi
   1.449 -}
   1.450 -
   1.451 -
   1.452 -pkg_info() {
   1.453 -	local log cmd active bpkg
   1.454 -	log=$LOGS/$pkg.log
   1.455 -	cmd=${QUERY_STRING%%=*}
   1.456 -	echo '<div id="info">'
   1.457 -	active=''; [ "$cmd" == 'receipt' -o "$cmd" == 'stuff' ] && active=' active'
   1.458 -	echo "<a class='button green$active' href='?receipt=${pkg//+/%2B}'>receipt &amp; stuff</a>"
   1.459 -
   1.460 -	unset WEB_SITE WANTED
   1.461 -	bpkg=$pkg
   1.462 -	. $wok/$pkg/receipt
   1.463 -
   1.464 -	[ -n "$WANTED" ] && bpkg="${WANTED%% *}" # see locale-* with multiple WANTED
   1.465 -
   1.466 -	[ -n "$WEB_SITE" ] &&
   1.467 -	echo "<a class='button sky' href='$WEB_SITE'>web site</a>"
   1.468 -
   1.469 -	if [ -f "$wok/$pkg/taz/$PACKAGE-$VERSION/receipt" ]; then
   1.470 -		active=''; [ "$cmd" == 'files' ] && active=' active'
   1.471 -		echo "<a class='button khaki$active' href='?files=${pkg//+/%2B}'>files</a>"
   1.472 -
   1.473 -		unset EXTRAVERSION
   1.474 -		. $wok/$pkg/taz/$PACKAGE-$VERSION/receipt
   1.475 -
   1.476 -		if [ -f $wok/$pkg/taz/$PACKAGE-$VERSION/description.txt ]; then
   1.477 -			active=''; [ "$cmd" == 'description' ] && active=' active'
   1.478 -			echo "<a class='button brown$active' href='?description=${pkg//+/%2B}'>description</a>"
   1.479 -		fi
   1.480 -
   1.481 -		if [ -f $PKGS/$PACKAGE-$VERSION$EXTRAVERSION.tazpkg ]; then
   1.482 -			echo "<a class='button gold' href='?download=${PACKAGE//+/%2B}-${VERSION//+/%2B}${EXTRAVERSION//+/%2B}.tazpkg'>download</a>"
   1.483 -		fi
   1.484 -
   1.485 -		if [ -f $PKGS/$PACKAGE-$VERSION$EXTRAVERSION-$ARCH.tazpkg ]; then
   1.486 -			echo "<a class='button gold' href='?download=${PACKAGE//+/%2B}-${VERSION//+/%2B}${EXTRAVERSION//+/%2B}-${ARCH//+/%2B}.tazpkg'>download</a>"
   1.487 -		fi
   1.488 -	fi
   1.489 -
   1.490 -	[ -n "$TARBALL" ] && [ -s "$SRC/$TARBALL" ] &&
   1.491 -	echo "<a class='button yellow' href='?src=${TARBALL//+/%2B}'>source</a>"
   1.492 -
   1.493 -	[ -x ./man2html ] &&
   1.494 -	if [ -d $wok/$bpkg/install/usr/man ] ||
   1.495 -	   [ -d $wok/$bpkg/install/usr/share/man ] ||
   1.496 -	   [ -d $wok/$bpkg/taz/*/fs/usr/man ] ||
   1.497 -	   [ -d $wok/$bpkg/taz/*/fs/usr/share/man ]; then
   1.498 -		active=''; [ "$cmd" == 'man' ] && active=' active'
   1.499 -		echo "<a class='button plum$active' href='?man=${bpkg//+/%2B}'>man</a>"
   1.500 -	fi
   1.501 -
   1.502 -	if [ -d $wok/$bpkg/install/usr/doc ] ||
   1.503 -	   [ -d $wok/$bpkg/install/usr/share/doc ] ||
   1.504 -	   [ -d $wok/$bpkg/taz/*/fs/usr/doc ] ||
   1.505 -	   [ -d $wok/$bpkg/taz/*/fs/usr/share/doc ]; then
   1.506 -		active=''; [ "$cmd" == 'doc' ] && active=' active'
   1.507 -		echo "<a class='button plum$active' href='?doc=${bpkg//+/%2B}'>doc</a>"
   1.508 -	fi
   1.509 -
   1.510 -	if [ -d $wok/$bpkg/install/usr/info ] ||
   1.511 -	   [ -d $wok/$bpkg/install/usr/share/info ] ||
   1.512 -	   [ -d $wok/$bpkg/taz/*/fs/usr/info ] ||
   1.513 -	   [ -d $wok/$bpkg/taz/*/fs/usr/share/info ]; then
   1.514 -		active=''; [ "$cmd" == 'info' ] && active=' active'
   1.515 -		echo "<a class='button plum$active' href='?info=${bpkg//+/%2B}#Top'>info</a>"
   1.516 -	fi
   1.517 -
   1.518 -	[ -n "$(echo $REQUEST_URI | sed 's|/[^/]*?pkg.*||')" ] ||
   1.519 -	echo "<a class='button' href='ftp://${HTTP_HOST%:*}/${pkg//+/%2B}/'>browse</a>"
   1.520 -
   1.521 -	if [ -s "$log" ]; then
   1.522 -		active=''; [ "$cmd" == 'log' ] && active=' active'
   1.523 -		echo "<a class='button gray$active' href='?log=${pkg//+/%2B}.log'>logs</a>"
   1.524 -	fi
   1.525 -
   1.526 -	echo '</div>'
   1.527 -}
   1.528 -
   1.529 -
   1.530 +<!-- Content -->
   1.531 +<div id="content">
   1.532 +EOT
   1.533 +fi
   1.534  
   1.535  
   1.536  #
   1.537  # Load requested page
   1.538  #
   1.539  
   1.540 -page_header
   1.541 -
   1.542  case "${QUERY_STRING}" in
   1.543  	pkg=*)
   1.544 -		pkg=$(GET pkg)
   1.545 +		pkg=${QUERY_STRING#pkg=}
   1.546  		log=$LOGS/$pkg.log
   1.547 +		echo "<h2>Package: $pkg</h2>"
   1.548  
   1.549  		# Define cook variables for syntax highlighter
   1.550  		if [ -s "$WOK/$pkg/receipt" ]; then
   1.551 @@ -575,18 +311,59 @@
   1.552  		fi
   1.553  
   1.554  		# Package info.
   1.555 +		echo '<div id="info">'
   1.556  		if [ -f "$wok/$pkg/receipt" ]; then
   1.557 -			echo "<div id='content'>"
   1.558 -			echo "<h2>Package: $pkg</h2>"
   1.559 -			pkg_info
   1.560 +			echo "<a href='?receipt=$pkg'>receipt</a>"
   1.561 +			unset WEB_SITE
   1.562 +			unset WANTED
   1.563 +			bpkg=$pkg
   1.564 +			. $wok/$pkg/receipt
   1.565 +
   1.566 +			[ -n "$WANTED" ] && bpkg="${WANTED%% *}" # see locale-* with multiple WANTED
   1.567 +			[ -n "$WEB_SITE" ] && # busybox wget -s $WEB_SITE &&
   1.568 +			echo "<a href='$WEB_SITE'>home</a>"
   1.569 +
   1.570 +			if [ -f "$wok/$pkg/taz/$PACKAGE-$VERSION/receipt" ]; then
   1.571 +				echo "<a href='?files=$pkg'>files</a>"
   1.572 +				unset EXTRAVERSION
   1.573 +				. $wok/$pkg/taz/$PACKAGE-$VERSION/receipt
   1.574 +				if [ -f $wok/$pkg/taz/$PACKAGE-$VERSION/description.txt ]; then
   1.575 +					echo "<a href='?description=$pkg'>description</a>"
   1.576 +				fi
   1.577 +				if [ -f $PKGS/$PACKAGE-$VERSION$EXTRAVERSION.tazpkg ]; then
   1.578 +					echo "<a href='?download=$PACKAGE-$VERSION$EXTRAVERSION.tazpkg'>download</a>"
   1.579 +				fi
   1.580 +				if [ -f $PKGS/$PACKAGE-$VERSION$EXTRAVERSION-$ARCH.tazpkg ]; then
   1.581 +					echo "<a href='?download=$PACKAGE-$VERSION$EXTRAVERSION-$ARCH.tazpkg'>download</a>"
   1.582 +				fi
   1.583 +			fi
   1.584 +			[ -x ./man2html ] &&
   1.585 +			if [ -d $wok/$bpkg/install/usr/man ] ||
   1.586 +			   [ -d $wok/$bpkg/install/usr/share/man ] ||
   1.587 +			   [ -d $wok/$bpkg/taz/*/fs/usr/man ] ||
   1.588 +			   [ -d $wok/$bpkg/taz/*/fs/usr/share/man ]; then
   1.589 +				echo "<a href='?man=$bpkg'>man</a>"
   1.590 +			fi
   1.591 +			if [ -d $wok/$bpkg/install/usr/doc ] ||
   1.592 +			   [ -d $wok/$bpkg/install/usr/share/doc ] ||
   1.593 +			   [ -d $wok/$bpkg/taz/*/fs/usr/doc ] ||
   1.594 +			   [ -d $wok/$bpkg/taz/*/fs/usr/share/doc ]; then
   1.595 +				echo "<a href='?doc=$bpkg'>doc</a>"
   1.596 +			fi
   1.597 +			if [ -d $wok/$bpkg/install/usr/info ] ||
   1.598 +			   [ -d $wok/$bpkg/install/usr/share/info ] ||
   1.599 +			   [ -d $wok/$bpkg/taz/*/fs/usr/info ] ||
   1.600 +			   [ -d $wok/$bpkg/taz/*/fs/usr/share/info ]; then
   1.601 +				echo "<a href='?info=$bpkg'>info</a>"
   1.602 +			fi
   1.603 +			[ -n "$(echo $REQUEST_URI | sed 's|/[^/]*?pkg.*||')" ] ||
   1.604 +			echo "<a href='ftp://${HTTP_HOST%:*}/$pkg/'>browse</a>"
   1.605  		else
   1.606  			if [ $(ls $wok/*$pkg*/receipt 2>/dev/null | wc -l) -eq 0 ]; then
   1.607 -				echo "<div id='content'><h2>Not Found</h2>"
   1.608 -				echo "<p>The requested package <b>$pkg</b> was not found on this server.</p>"
   1.609 +				echo "No package named: $pkg"
   1.610  			else
   1.611 -				echo "<div id='content'>"
   1.612  				ls $wok/$pkg/receipt >/dev/null 2>&1 || pkg="*$pkg*"
   1.613 -				echo '<table class="zebra" style="width:100%">'
   1.614 +				echo '<table style="width:100%">'
   1.615  				for i in $(cd $wok ; ls $pkg/receipt); do
   1.616  					pkg=$(dirname $i)
   1.617  					unset SHORT_DESC CATEGORY
   1.618 @@ -603,78 +380,88 @@
   1.619  				unset pkg
   1.620  			fi
   1.621  		fi
   1.622 +		echo '</div>'
   1.623  
   1.624  		# Check for a log file and display summary if it exists.
   1.625 -		summary "$log"
   1.626 +		if [ -f "$log" ]; then
   1.627 +			if grep -q "cook:$pkg$" $command; then
   1.628 +				echo "<pre>The Cooker is currently building: $pkg</pre>"
   1.629 +			fi
   1.630 +			if fgrep -q "Summary for:" $LOGS/$pkg.log; then
   1.631 +				echo '<h3>Cook summary</h3>'
   1.632 +				echo '<pre>'
   1.633 +				grep -A 12 "^Summary for:" $LOGS/$pkg.log | sed /^$/d | \
   1.634 +					syntax_highlighter log
   1.635 +				echo '</pre>'
   1.636 +			fi
   1.637 +			if fgrep -q "Debug information" $LOGS/$pkg.log; then
   1.638 +				echo '<h3>Cook failed</h3>'
   1.639 +				echo '<pre>'
   1.640 +				grep -A 8 "^Debug information" $LOGS/$pkg.log | sed /^$/d | \
   1.641 +						syntax_highlighter log
   1.642 +				echo '</pre>'
   1.643 +			fi
   1.644 +			echo "<h3>Cook log $(stat -c %y $log | sed 's/:..\..*//')</h3>"
   1.645 +			for i in $(ls -t $log.*); do
   1.646 +				echo -n "<a href=\"?log=$(basename $i)\">"
   1.647 +				echo "$(stat -c %y $i | sed 's/ .*//')</a>"
   1.648 +			done
   1.649 +			echo '<pre>'
   1.650 +			cat $log | syntax_highlighter log
   1.651 +			echo '</pre>'
   1.652 +			case "$HTTP_USER_AGENT" in
   1.653 +			*SliTaz*)
   1.654 +				[ -f $CACHE/cooker-request ] && [ -n "$HTTP_REFERER" ] &&
   1.655 +				echo "<a class=\"button\" href=\"?recook=$pkg\">Recook $pkg</a>"
   1.656 +			esac
   1.657 +		else
   1.658 +			[ "$pkg" ] && echo "<pre>No log: $pkg</pre>"
   1.659 +		fi ;;
   1.660  
   1.661 -		# Display <Recook> button only for SliTaz web browser
   1.662 -		if [ -f "$log" ]; then
   1.663 -			case "$HTTP_USER_AGENT" in
   1.664 -				*SliTaz*)
   1.665 -					[ -f $CACHE/cooker-request ] && [ -n "$HTTP_REFERER" ] &&
   1.666 -					echo "<a class=\"button\" href=\"?recook=$pkg\">Recook $pkg</a>"
   1.667 -					;;
   1.668 -			esac
   1.669 +	log=*)
   1.670 +		log=$LOGS/${QUERY_STRING#log=}
   1.671 +		if [ -s $log ]; then
   1.672 +			echo "<h3>Cook log $(stat -c %y $log | sed 's/:..\..*//')</h3>"
   1.673 +			if fgrep -q "Summary" $log; then
   1.674 +				echo '<pre>'
   1.675 +				grep -A 20 "^Summary" $log | sed /^$/d | \
   1.676 +					syntax_highlighter log
   1.677 +				echo '</pre>'
   1.678 +			fi
   1.679 +			echo '<pre>'
   1.680 +			cat $log | syntax_highlighter log
   1.681 +			echo '</pre>'
   1.682  		fi
   1.683  		;;
   1.684 -
   1.685 -	log=*)
   1.686 -		log=$(GET log)
   1.687 -		logfile=$LOGS/$log
   1.688 -		pkg=${log%.log*}
   1.689 -		if [ -s "$logfile" ]; then
   1.690 -			echo "<div id='content'>"
   1.691 -
   1.692 -			echo "<h2>Cook log $(stat -c %y $logfile | sed 's/:..\..*//')</h2>"
   1.693 -			pkg_info
   1.694 -
   1.695 -			case $log in
   1.696 -				*.log) baselog=$logfile ;;
   1.697 -				*)     baselog=${logfile%.*} ;;
   1.698 -			esac
   1.699 -			for i in $(ls -t $baselog $baselog.* 2>/dev/null); do
   1.700 -				class=''; [ $i == $logfile ] && class=' gray'
   1.701 -				j=$(basename "$i")
   1.702 -				echo -n "<a class='button$class' href=\"?log=${j//+/%2B}\">"
   1.703 -				echo "$(stat -c %y $i | cut -d: -f1,2)</a>"
   1.704 -			done
   1.705 -
   1.706 -			summary "$logfile" links
   1.707 -
   1.708 -			cat $logfile | syntax_highlighter log | awk '
   1.709 -			BEGIN { print "<pre class=\"log\">"; }
   1.710 -			      { printf("<a name=\"l%d\" href=\"#l%d\">%5d</a>  %s\n", NR, NR, NR, $0); }
   1.711 -			END   { print "</pre>"; }
   1.712 -			'
   1.713 -		fi
   1.714 -		;;
   1.715 -
   1.716  	file=*)
   1.717 -		echo "<div id='content'>"
   1.718  		# Don't allow all files on the system for security reasons.
   1.719 -		file=$(GET file)
   1.720 +		file=${QUERY_STRING#file=}
   1.721  		case "$file" in
   1.722  			activity|cooknotes|cooklist)
   1.723  				[ "$file" == "cooklist" ] && \
   1.724  					nb="- Packages: $(cat $cooklist | wc -l)"
   1.725 -				echo '<div id="content2">'
   1.726  				echo "<h2>DB: $file $nb</h2>"
   1.727 -				echo '<ul class="activity">'
   1.728 -				tac $CACHE/$file | syntax_highlighter activity | \
   1.729 -				sed 's|^|<li>|; s|$|</li>|'
   1.730 -				echo '</ul></div>'
   1.731 -				;;
   1.732 +				echo '<pre>'
   1.733 +				tac $CACHE/$file | syntax_highlighter activity
   1.734 +				echo '</pre>' ;;
   1.735  
   1.736  			broken)
   1.737 -				nb=$(wc -l < $broken)
   1.738 -				echo '<div id="content2">'
   1.739 +				nb=$(cat $broken | wc -l)
   1.740  				echo "<h2>DB: broken - Packages: $nb</h2>"
   1.741 -				echo '<ul class="activity">'
   1.742 +				echo '<pre>'
   1.743  				cat $CACHE/$file | sort | \
   1.744 -					sed "s#^[^']*#<a href='?pkg=\0'>\0</a>#g" | \
   1.745 -					sed 's|^|<li>|; s|$|</li>|'
   1.746 -				echo '</ul></div>'
   1.747 -				;;
   1.748 +					sed s"#^[^']*#<a href='?pkg=\0'>\0</a>#"g
   1.749 +				echo '</pre>' ;;
   1.750 +
   1.751 +			*.diff)
   1.752 +				diff=$CACHE/$file
   1.753 +				echo "<h2>Diff for: ${file%.diff}</h2>"
   1.754 +				[ "$file" == "installed.diff" ] && echo \
   1.755 +					"<p>This is the latest diff between installed packages \
   1.756 +					and installed build dependencies to cook.</p>"
   1.757 +				echo '<pre>'
   1.758 +				cat $diff | syntax_highlighter diff
   1.759 +				echo '</pre>' ;;
   1.760  
   1.761  			*.log)
   1.762  				log=$LOGS/$file
   1.763 @@ -692,143 +479,63 @@
   1.764  					echo '</pre>'
   1.765  				else
   1.766  					echo "<pre>No log file: $log</pre>"
   1.767 -				fi
   1.768 -				;;
   1.769 -		esac
   1.770 -		;;
   1.771 +				fi ;;
   1.772 +		esac ;;
   1.773  
   1.774  	stuff=*)
   1.775 -		echo "<div id='content'>"
   1.776 -		file=$(GET stuff)
   1.777 -		pkg=${file%%/*}
   1.778 -		if [ -f "$wok/$file" ]; then
   1.779 -			echo "<h2>$file</h2>"
   1.780 -			pkg_info
   1.781 -			echo "<a class='button' href='?receipt=${pkg//+/%2B}'>receipt</a>"
   1.782 -
   1.783 -			( cd $wok/$pkg ; find stuff -type f 2> /dev/null ) | sort | \
   1.784 -			while read i ; do
   1.785 -				class=''; [ "$pkg/$i" == "$file" ] && class=" green"
   1.786 -				echo "<a class='button$class' href='?stuff=${pkg//+/%2B}/${i//+/%2B}'>$i</a>"
   1.787 -			done
   1.788 -
   1.789 -			case $file in
   1.790 -				*.desktop|*.theme)   class="ini" ;;
   1.791 -				*.patch|*.diff|*.u)  class="diff" ;;
   1.792 -				*.sh)                class="bash" ;;
   1.793 -				*.conf*)
   1.794 -					class="bash"
   1.795 -					[ -n "$(cut -c1 < $wok/$file | fgrep '[')" ] && class="ini"
   1.796 -					;;
   1.797 -				*.pl)           class="perl" ;;
   1.798 -				*.c|*.h|*.awk)  class="clike" ;;
   1.799 -				*.svg)          class="svg" ;;
   1.800 -				*Makefile*)     class="makefile" ;;
   1.801 -				*.po|*.pot)     class="bash" ;;
   1.802 -				*.css)          class="css" ;;
   1.803 -				*.htm|*.html)   class="html" ;;
   1.804 -				*.js)           class="js" ;;
   1.805 -				*.txt)          class="asciidoc" ;;
   1.806 -				*)
   1.807 -					case $(head -n1 $wok/$file) in
   1.808 -						*!/bin/sh*|*!/bin/bash*) class="bash" ;;
   1.809 -					esac
   1.810 -					if [ -z "$class" -a "$(head -n1 $wok/$file | cut -b1)" == '#' ]; then
   1.811 -						class="bash"
   1.812 -					fi
   1.813 -					if [ -z "$class" ]; then
   1.814 -						# Follow Busybox restrictions. Search for non-printable chars
   1.815 -						if [ $(tr -d '[:alnum:][:punct:][:blank:][:cntrl:]' < "$wok/$file" | wc -c) -gt 0 ]; then
   1.816 -							raw="true"
   1.817 -						fi
   1.818 -					fi
   1.819 -					;;
   1.820 -			esac
   1.821 -
   1.822 -			# Display image
   1.823 -			case $file in
   1.824 -				*.png|*.svg|*.jpg|*.jpeg|*.ico)
   1.825 -					echo "<img src='?download=../wok/${file//+/%2B}' style='display: block; max-width: 100%; margin: auto'/>"
   1.826 -					;;
   1.827 -			esac
   1.828 -
   1.829 -			# Display colored listing for all text-based documents (also for *.svg)
   1.830 -			case $file in
   1.831 -				*.png|*.jpg|*.jpeg|*.ico) ;;
   1.832 -				*)
   1.833 -					if [ -z "$raw" ]; then
   1.834 -						cat $wok/$file | show_code $class
   1.835 -					fi
   1.836 -					;;
   1.837 -			esac
   1.838 -
   1.839 -			# Display hex dump for binary files
   1.840 -			if [ -n "$raw" ]; then
   1.841 -				hexdump -C $wok/$file | show_code $class
   1.842 -			fi
   1.843 -		else
   1.844 -			echo "<pre>File '$file' absent!</pre>"
   1.845 -		fi
   1.846 -		;;
   1.847 +		file=${QUERY_STRING#stuff=}
   1.848 +		echo "<h2>$file</h2>"
   1.849 +		echo '<pre>'
   1.850 +		cat $wok/$file | sed 's/&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'
   1.851 +		echo '</pre>' ;;
   1.852  
   1.853  	receipt=*)
   1.854 -		echo "<div id='content'>"
   1.855 -		pkg=$(GET receipt)
   1.856 +		pkg=${QUERY_STRING#receipt=}
   1.857  		echo "<h2>Receipt for: $pkg</h2>"
   1.858 -		pkg_info
   1.859 -		echo "<a class='button green' href='?receipt=${pkg//+/%2B}'>receipt</a>"
   1.860 -		. $wok/$pkg/receipt
   1.861 +		if [ -f "$wok/$pkg/receipt" ]; then
   1.862 +			. $wok/$pkg/receipt
   1.863 +			[ -n "$TARBALL" ] && [ -s "$SRC/$TARBALL" ] &&
   1.864 +			echo "<a href='?src=$TARBALL'>source</a>"
   1.865  
   1.866 -		( cd $wok/$pkg; find stuff -type f 2> /dev/null ) | sort | \
   1.867 -		while read file; do
   1.868 -			echo "<a class='button' href='?stuff=${pkg//+/%2B}/${file//+/%2B}'>$file</a>"
   1.869 -		done | sort
   1.870 -		cat $wok/$pkg/receipt | show_code bash
   1.871 -		;;
   1.872 +			( cd $wok/$pkg ; find stuff -type f 2> /dev/null ) | \
   1.873 +			while read file ; do
   1.874 +				echo "<a href=\"?stuff=$pkg/$file\">$file</a>"
   1.875 +			done | sort
   1.876 +			echo '<pre>'
   1.877 +			cat $wok/$pkg/receipt | \
   1.878 +				syntax_highlighter receipt
   1.879 +			echo '</pre>'
   1.880 +		else
   1.881 +			echo "<pre>No receipt for: $pkg</pre>"
   1.882 +		fi ;;
   1.883  
   1.884  	files=*)
   1.885 -		echo "<div id='content'>"
   1.886 -		pkg=$(GET files)
   1.887 -		dir=$(ls -d $WOK/$pkg/taz/$pkg-* 2>/dev/null)
   1.888 -		size=$(du -hs $dir/fs | awk '{ print $1 }')
   1.889 -		echo "<h2>Files installed by the package \"$pkg\" ($size)</h2>"
   1.890 -		pkg_info
   1.891 -
   1.892 -		echo '<pre class="files">'
   1.893 -
   1.894 -		find $dir/fs -not -type d -print0 | sort -z | \
   1.895 -		xargs -0 ls -ld --color=always | \
   1.896 -		syntax_highlighter files | \
   1.897 -		sed "s|\([^/]*\)/.*\(${dir#*wok}/fs\)\([^<]*\)\(<.*\)$|\1<a href=\"?download=../wok\2\3\">\3</a>\4|" |\
   1.898 -		awk '
   1.899 -			BEGIN { FS="\""; }
   1.900 -			{ gsub("+", "%2B", $2); print; }
   1.901 -			'
   1.902 -
   1.903 -		echo '</pre>'
   1.904 -		;;
   1.905 +		pkg=${QUERY_STRING#files=}
   1.906 +		dir=$(ls -d $WOK/$pkg/taz/$pkg-*)
   1.907 +		if [ -d "$dir/fs" ]; then
   1.908 +			echo "<h2>Installed files by: $pkg ($(du -hs $dir/fs | awk '{ print $1 }'))</h2>"
   1.909 +			echo '<pre>'
   1.910 +			find $dir/fs -not -type d -print0 | xargs -0 ls -ld | \
   1.911 +				sed "s|\(.*\) /.*\(${dir#*wok}/fs\)\(.*\)|\1 <a href=\"?download=../wok\2\3\">\3</a>|;s|^\([^-].*\)\(<a.*\)\">\(.*\)</a>|\1\3|"
   1.912 +			echo '</pre>'
   1.913 +		else
   1.914 +			echo "<pre>No files list for: $pkg</pre>"
   1.915 +		fi ;;
   1.916  
   1.917  	description=*)
   1.918 -		echo "<div id='content'>"
   1.919 -		pkg=$(GET description)
   1.920 -		dir=$(ls -d $WOK/$pkg/taz/$pkg-* 2>/dev/null)
   1.921 +		pkg=${QUERY_STRING#description=}
   1.922  		echo "<h2>Description of $pkg</h2>"
   1.923 -		pkg_info
   1.924 +		dir=$(ls -d $WOK/$pkg/taz/$pkg-*)
   1.925  		if [ -s "$dir/description.txt" ]; then
   1.926 -			if [ -n "$md2html" ]; then
   1.927 -				echo '<div id="content2">'
   1.928 -				$md2html $dir/description.txt
   1.929 -				echo '</div>'
   1.930 -			else
   1.931 -				cat $dir/description.txt | show_code markdown
   1.932 -			fi
   1.933 +			echo '<pre>'
   1.934 +			cat $dir/description.txt | \
   1.935 +				sed 's/&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'
   1.936 +			echo '</pre>'
   1.937  		else
   1.938 -			echo "<pre>No description of $pkg</pre>"
   1.939 -		fi
   1.940 -		;;
   1.941 +			echo "<pre>No description for: $pkg</pre>"
   1.942 +		fi ;;
   1.943  
   1.944  	man=*|doc=*|info=*)
   1.945 -		echo '<div id="content">'
   1.946  		type=${QUERY_STRING%%=*}
   1.947  		pkg=$(GET $type)
   1.948  		dir=$WOK/$pkg/install/usr/share/$type
   1.949 @@ -840,93 +547,37 @@
   1.950  			page=$(find $dir -type f | sed q)
   1.951  			page=${page#$dir/}
   1.952  		fi
   1.953 -
   1.954 +		find $dir -type f | while read file ; do
   1.955 +			[ -s $file ] || continue
   1.956 +			case "$file" in
   1.957 +			*.jp*g|*.png|*.gif|*.svg) continue
   1.958 +			esac
   1.959 +			file=${file#$dir/}
   1.960 +			echo "<a href='?$type=$pkg&amp;file=$file'>$(basename $file)</a>"
   1.961 +		done | sort -t \> -k 2
   1.962  		echo "<h2>$(basename $page)</h2>"
   1.963 -
   1.964 -		pkg_info
   1.965 -		echo '<div style="max-height: 5em; overflow: auto">'
   1.966 -		find $dir -type f | sort | while read i ; do
   1.967 -			[ -s $i ] || continue
   1.968 -			case "$i" in
   1.969 -				*.jp*g|*.png|*.gif|*.svg|*.css) continue
   1.970 -			esac
   1.971 -			i=${i#$dir/}
   1.972 -			class=''; [ "$page" == "$i" ] && class=" plum"
   1.973 -			case "$type" in
   1.974 -				man)
   1.975 -					man=$(basename $i .gz)
   1.976 -					echo "<a class='button$class' href='?$type=$pkg&amp;file=$i'>${man%.*} (${man##*.})</a>"
   1.977 -					;;
   1.978 -				info)
   1.979 -					info=$(basename $i)
   1.980 -					echo "<a class='button$class' href='?$type=$pkg&amp;file=$i#Top'>${info/.info/}</a>"
   1.981 -					;;
   1.982 -				*)
   1.983 -					echo "<a class='button$class' href='?$type=$pkg&amp;file=$i'>$(basename $i .gz)</a>"
   1.984 -					;;
   1.985 -			esac
   1.986 -		done
   1.987 -		echo '</div>'
   1.988 -
   1.989 -		if [ -f "$dir/$page" ]; then
   1.990 -			tmp="$(mktemp)"
   1.991 -			docat "$dir/$page" > $tmp
   1.992 -			[ -s "$tmp" ] &&
   1.993 -			case "$type" in
   1.994 -				info)
   1.995 -					echo '<div id="content2" class="texinfo"><pre class="first">'
   1.996 -					info2html < "$tmp"
   1.997 -					echo '</pre></div>'
   1.998 -					;;
   1.999 -				doc)
  1.1000 -					case "$page" in
  1.1001 -						*.sgml) class='xml';;
  1.1002 -						*.py)   class='python';; # pycurl package
  1.1003 -						*)      class='asciidoc';;
  1.1004 -					esac
  1.1005 -					case "$page" in
  1.1006 -						*.htm*)
  1.1007 -							echo '<div id="content2">'
  1.1008 -							cat
  1.1009 -							echo '</div>'
  1.1010 -							;;
  1.1011 -						*)
  1.1012 -							show_code $class
  1.1013 -							;;
  1.1014 -					esac < "$tmp"
  1.1015 -					;;
  1.1016 -				man)
  1.1017 -					export TEXTDOMAIN='man2html'
  1.1018 -					echo "<div id='content2'>"
  1.1019 -
  1.1020 -					html=$(./man2html "$tmp" | sed -e '1,/<header>/d' \
  1.1021 -					-e 's|<a href="file:///[^>]*>\([^<]*\)</a>|\1|g' \
  1.1022 -					-e 's|<a href="?[1-9]\+[^>]*>\([^<]*\)</a>|\1|g')
  1.1023 -
  1.1024 -					if [ -n "$(echo "$html" | fgrep 'The requested file /tmp/tmp.')" ]; then
  1.1025 -						# Process the pre-formatted man-cat page
  1.1026 -						echo '<pre>'
  1.1027 -						sed '
  1.1028 -							s|M-bM-^@M-^S|—|g;
  1.1029 -							s|M-bM-^@M-^\\|<b>|g;
  1.1030 -							s|M-bM-^@M-^]|</b>|g
  1.1031 -							s|M-bM-^@M-^X|<u>|g;
  1.1032 -							s|M-bM-^@M-^Y|</u>|g;
  1.1033 -							s|M-BM-||g;
  1.1034 -							' "$tmp"
  1.1035 -						echo '</pre>'
  1.1036 -					else
  1.1037 -						echo "$html"
  1.1038 -					fi
  1.1039 -					echo "</div>"
  1.1040 -					;;
  1.1041 -			esac
  1.1042 -			rm -f $tmp
  1.1043 -		else
  1.1044 -			echo "<pre>File '$page' not exists!</pre>"
  1.1045 -		fi
  1.1046 +		tmp="$(mktemp)"
  1.1047 +		docat "$dir/$page" > $tmp
  1.1048 +		[ -s "$tmp" ] && case "$type" in
  1.1049 +		info)
  1.1050 +			echo '<pre>'
  1.1051 +			info2html < "$tmp"
  1.1052 +			echo '</pre>' ;;
  1.1053 +		doc)
  1.1054 +			echo '<pre>'
  1.1055 +			case "$page" in
  1.1056 +			*.htm*)	cat ;;
  1.1057 +			*)	sed 's/&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'
  1.1058 +			esac < "$tmp"
  1.1059 +			echo '</pre>' ;;
  1.1060 +		man)
  1.1061 +			export TEXTDOMAIN='man2html'
  1.1062 +			./man2html "$tmp" | sed -e '1,/<header>/d' \
  1.1063 +			-e 's|<a href="file:///[^>]*>\([^<]*\)</a>|\1|g' \
  1.1064 +			-e 's|<a href="?[1-9]\+[^>]*>\([^<]*\)</a>|\1|g' ;;
  1.1065 +		esac
  1.1066 +		rm -f $tmp
  1.1067  		;;
  1.1068 -
  1.1069  	*)
  1.1070  		# We may have a toolchain.cgi script for cross cooker's
  1.1071  		if [ -f "toolchain.cgi" ]; then
  1.1072 @@ -942,57 +593,56 @@
  1.1073  		pct=0
  1.1074  		[ $inwok -gt 0 ] && pct=$(( ($cooked * 100) / $inwok ))
  1.1075  		cat <<EOT
  1.1076 -<div id="content2">
  1.1077 -
  1.1078 -<form method="get" action="" class="r">
  1.1079 -	<input type="search" name="pkg" placeholder="Package" list="packages" autocorrect="off" autocapitalize="off"/>
  1.1080 -</form>
  1.1081 +<div style="float: right;">
  1.1082 +	<form method="get" action="$SCRIPT_NAME">
  1.1083 +		Package:
  1.1084 +		<input type="text" name="pkg" />
  1.1085 +	</form>
  1.1086 +</div>
  1.1087  
  1.1088  <h2>Summary</h2>
  1.1089  
  1.1090 -<table>
  1.1091 -<tr><td>Running command</td><td>: $(running_command)</td></tr>
  1.1092 -<tr><td>Wok revision</td><td>: <a href="$WOK_URL">$(cat $wokrev)</a></td></tr>
  1.1093 -<tr><td>Commits to cook</td><td>: $(wc -l < $commits)</td></tr>
  1.1094 -<tr><td>Current cooklist</td><td>: $(wc -l < $cooklist)</td></tr>
  1.1095 -<tr><td>Broken packages</td><td>: $(wc -l < $broken)</td></tr>
  1.1096 -<tr><td>Blocked packages</td><td>: $(wc -l < $blocked)</td></tr>
  1.1097 -<tr><td>Architecture</td><td>: $ARCH, <a href="$toolchain">toolchain</a></td></tr>
  1.1098 -<tr><td>Server date</td><td>: $(date -u '+%F %R %Z')</td></tr>
  1.1099 -
  1.1100 -</table>
  1.1101 +<pre>
  1.1102 +Running command  : $(running_command)
  1.1103 +Wok revision     : <a href="$WOK_URL">$(cat $wokrev)</a>
  1.1104 +Commits to cook  : $(cat $commits | wc -l)
  1.1105 +Current cooklist : $(cat $cooklist | wc -l)
  1.1106 +Broken packages  : $(cat $broken | wc -l)
  1.1107 +Blocked packages : $(cat $blocked | wc -l)
  1.1108 +</pre>
  1.1109  EOT
  1.1110 -
  1.1111  		[ -e $CACHE/cooker-request ] &&
  1.1112 -		[ $CACHE/activity -nt $CACHE/cooker-request ] &&
  1.1113 -		echo '<a class="button r" href="?poke">Poke cooker</a>'
  1.1114 -
  1.1115 +		[ $CACHE/activity -nt $CACHE/cooker-request ] && cat <<EOT
  1.1116 +<div style="float: right;">
  1.1117 +	<a class="button" href="?poke">Poke cooker</a>
  1.1118 +</div>
  1.1119 +EOT
  1.1120  		cat <<EOT
  1.1121 -<p class="info">Packages: $inwok in the wok · $cooked cooked · $unbuilt unbuilt</p>
  1.1122 -
  1.1123 +<p class="info">
  1.1124 +	Packages: $inwok in the wok | $cooked cooked | $unbuilt unbuilt |
  1.1125 +	Server date: $(date -u '+%F %R %Z')
  1.1126 +</p>
  1.1127  <div class="pctbar">
  1.1128  	<div class="pct" style="width: ${pct}%;">${pct}%</div>
  1.1129  </div>
  1.1130  
  1.1131  <p>
  1.1132 -	Service logs:
  1.1133 -	<a href="?file=cookorder.log">cookorder</a> ·
  1.1134 -	<a href="?file=commits.log">commits</a> ·
  1.1135 -	<a href="?file=pkgdb.log">pkgdb</a><!-- ·
  1.1136 -	<a href="?file=installed.diff">installed.diff</a> -->
  1.1137 +	Latest:
  1.1138 +	<a href="?file=cookorder.log">cookorder.log</a>
  1.1139 +	<a href="?file=commits.log">commits.log</a>
  1.1140 +	<a href="?file=pkgdb.log">pkgdb.log</a>
  1.1141 +	<a href="?file=installed.diff">installed.diff</a>
  1.1142 +	- Architecture $ARCH:
  1.1143 +	<a href="$toolchain">toolchain</a>
  1.1144  </p>
  1.1145  
  1.1146  $(more_button activity "More activity" $CACHE/activity 12)
  1.1147  <h2 id="activity">Activity</h2>
  1.1148 -
  1.1149 -<ul class="activity">
  1.1150 +<pre>
  1.1151 +$(tac $CACHE/activity | head -n 12 | syntax_highlighter activity)
  1.1152 +</pre>
  1.1153  EOT
  1.1154  
  1.1155 -		tac $CACHE/activity | head -n 12 | syntax_highlighter activity | \
  1.1156 -		sed 's|cooker.cgi||; s|^|<li>|; s|$|</li>|;'
  1.1157 -
  1.1158 -		echo '</ul>'
  1.1159 -
  1.1160  		[ -s $cooknotes ] && cat <<EOT
  1.1161  $(more_button cooknotes "More notes" $cooknotes 12)
  1.1162  <h2 id="cooknotes">Cooknotes</h2>
  1.1163 @@ -1003,46 +653,57 @@
  1.1164  
  1.1165  		[ -s $commits ] && cat <<EOT
  1.1166  <h2 id="commits">Commits</h2>
  1.1167 -<ul class="activity">
  1.1168 -$(sed 's|^|<li>|; s|$|</li>|' $commits)
  1.1169 -</ul>
  1.1170 +<pre>
  1.1171 +$(cat $commits)
  1.1172 +</pre>
  1.1173  EOT
  1.1174  
  1.1175  		[ -s $cooklist ] && cat <<EOT
  1.1176  $(more_button cooklist "Full cooklist" $cooklist 20)
  1.1177  <h2 id="cooklist">Cooklist</h2>
  1.1178 -<ul class="activity">
  1.1179 -$(head -n 20 $cooklist | sed 's|^|<li>|; s|$|</li>|')
  1.1180 -</ul>
  1.1181 +<pre>
  1.1182 +$(cat $cooklist | head -n 20)
  1.1183 +</pre>
  1.1184  EOT
  1.1185  
  1.1186  		[ -s $broken ] && cat <<EOT
  1.1187  $(more_button broken "All broken packages" $broken 20)
  1.1188  <h2 id="broken">Broken</h2>
  1.1189 -<ul class="activity">
  1.1190 -$(head -n 20 $broken | sed "s#^[^']*#<a href='?pkg=\0'>\0</a>#g" | sed 's|^|<li>|; s|$|</li>|')
  1.1191 -</ul>
  1.1192 +<pre>
  1.1193 +$(cat $broken | head -n 20 | sed s"#^[^']*#<a href='?pkg=\0'>\0</a>#"g)
  1.1194 +</pre>
  1.1195  EOT
  1.1196  
  1.1197  		[ -s $blocked ] && cat <<EOT
  1.1198  <h2 id="blocked">Blocked</h2>
  1.1199 -<ul class="activity">
  1.1200 -$(sed "s#^[^']*#<a href='?pkg=\0'>\0</a>#g" $blocked | sed 's|^|<li>|; s|$|</li>|')
  1.1201 -</ul>
  1.1202 +<pre>
  1.1203 +$(cat $blocked | sed s"#^[^']*#<a href='?pkg=\0'>\0</a>#"g)
  1.1204 +</pre>
  1.1205  EOT
  1.1206  
  1.1207  		cat <<EOT
  1.1208  <h2 id="lastcook">Latest cook</h2>
  1.1209 -<ul class="activity">
  1.1210 -$(list_packages | sed 's|.tazpkg$||' | \
  1.1211 -sed "s|^.* :|<span class='log-date'>\0</span> <span style='white-space:nowrap'>|g; s|^|<li>|; s|$|</span></li>|")
  1.1212 -</ul>
  1.1213 -
  1.1214 +<pre>
  1.1215 +$(list_packages | sed s"#^\([^']*\).* : #<span class='log-date'>\0</span>#"g)
  1.1216 +</pre>
  1.1217  EOT
  1.1218 -		datalist
  1.1219  	;;
  1.1220  esac
  1.1221  
  1.1222  
  1.1223 -page_footer
  1.1224 +# Close xHTML page
  1.1225 +
  1.1226 +cat <<EOT
  1.1227 +</div>
  1.1228 +
  1.1229 +<div id="footer">
  1.1230 +	<a href="http://www.slitaz.org/">SliTaz Website</a>
  1.1231 +	<a href="cooker.cgi">Cooker</a>
  1.1232 +	<a href="doc/cookutils/cookutils.en.html">Documentation</a>
  1.1233 +</div>
  1.1234 +
  1.1235 +</body>
  1.1236 +</html>
  1.1237 +EOT
  1.1238 +
  1.1239  exit 0
     2.1 --- a/web/prism.css	Fri Apr 21 21:24:26 2017 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,123 +0,0 @@
     2.4 -/* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+asciidoc+bash+c+css-extras+diff+ini+markdown+perl+python */
     2.5 -/**
     2.6 - * okaidia theme for JavaScript, CSS and HTML
     2.7 - * Loosely based on Monokai textmate theme by http://www.monokai.nl/
     2.8 - * @author ocodia
     2.9 - */
    2.10 -
    2.11 -code[class*="language-"],
    2.12 -pre[class*="language-"] {
    2.13 -	color: #f8f8f2;
    2.14 -	background: none;
    2.15 -	text-shadow: 0 1px rgba(0, 0, 0, 0.3);
    2.16 -	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    2.17 -	text-align: left;
    2.18 -	white-space: pre;
    2.19 -	word-spacing: normal;
    2.20 -	word-break: normal;
    2.21 -	word-wrap: normal;
    2.22 -	line-height: 1.5;
    2.23 -
    2.24 -	-moz-tab-size: 4;
    2.25 -	-o-tab-size: 4;
    2.26 -	tab-size: 4;
    2.27 -
    2.28 -	-webkit-hyphens: none;
    2.29 -	-moz-hyphens: none;
    2.30 -	-ms-hyphens: none;
    2.31 -	hyphens: none;
    2.32 -}
    2.33 -
    2.34 -/* Code blocks */
    2.35 -pre[class*="language-"] {
    2.36 -	padding: 1em;
    2.37 -	margin: .5em 0;
    2.38 -	overflow: auto;
    2.39 -	border-radius: 0.3em;
    2.40 -}
    2.41 -
    2.42 -:not(pre) > code[class*="language-"],
    2.43 -pre[class*="language-"] {
    2.44 -	background: #272822;
    2.45 -}
    2.46 -
    2.47 -/* Inline code */
    2.48 -:not(pre) > code[class*="language-"] {
    2.49 -	padding: .1em;
    2.50 -	border-radius: .3em;
    2.51 -	white-space: normal;
    2.52 -}
    2.53 -
    2.54 -.token.comment,
    2.55 -.token.prolog,
    2.56 -.token.doctype,
    2.57 -.token.cdata {
    2.58 -	color: slategray;
    2.59 -}
    2.60 -
    2.61 -.token.punctuation {
    2.62 -	color: #f8f8f2;
    2.63 -}
    2.64 -
    2.65 -.namespace {
    2.66 -	opacity: .7;
    2.67 -}
    2.68 -
    2.69 -.token.property,
    2.70 -.token.tag,
    2.71 -.token.constant,
    2.72 -.token.symbol,
    2.73 -.token.deleted {
    2.74 -	color: #f92672;
    2.75 -}
    2.76 -
    2.77 -.token.boolean,
    2.78 -.token.number {
    2.79 -	color: #ae81ff;
    2.80 -}
    2.81 -
    2.82 -.token.selector,
    2.83 -.token.attr-name,
    2.84 -.token.string,
    2.85 -.token.char,
    2.86 -.token.builtin,
    2.87 -.token.inserted {
    2.88 -	color: #a6e22e;
    2.89 -}
    2.90 -
    2.91 -.token.operator,
    2.92 -.token.entity,
    2.93 -.token.url,
    2.94 -.language-css .token.string,
    2.95 -.style .token.string,
    2.96 -.token.variable {
    2.97 -	color: #f8f8f2;
    2.98 -}
    2.99 -
   2.100 -.token.atrule,
   2.101 -.token.attr-value,
   2.102 -.token.function {
   2.103 -	color: #e6db74;
   2.104 -}
   2.105 -
   2.106 -.token.keyword {
   2.107 -	color: #66d9ef;
   2.108 -}
   2.109 -
   2.110 -.token.regex,
   2.111 -.token.important {
   2.112 -	color: #fd971f;
   2.113 -}
   2.114 -
   2.115 -.token.important,
   2.116 -.token.bold {
   2.117 -	font-weight: bold;
   2.118 -}
   2.119 -.token.italic {
   2.120 -	font-style: italic;
   2.121 -}
   2.122 -
   2.123 -.token.entity {
   2.124 -	cursor: help;
   2.125 -}
   2.126 -
     3.1 --- a/web/prism.js	Fri Apr 21 21:24:26 2017 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,16 +0,0 @@
     3.4 -/* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+asciidoc+bash+c+css-extras+diff+ini+makefile+markdown+perl+python */
     3.5 -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e){var t=n.util.type(e);switch(t){case"Object":var a={};for(var r in e)e.hasOwnProperty(r)&&(a[r]=n.util.clone(e[r]));return a;case"Array":return e.map&&e.map(function(e){return n.util.clone(e)})}return e}},languages:{extend:function(e,t){var a=n.util.clone(n.languages[e]);for(var r in t)a[r]=t[r];return a},insertBefore:function(e,t,a,r){r=r||n.languages;var l=r[e];if(2==arguments.length){a=arguments[1];for(var i in a)a.hasOwnProperty(i)&&(l[i]=a[i]);return l}var o={};for(var s in l)if(l.hasOwnProperty(s)){if(s==t)for(var i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);o[s]=l[s]}return n.languages.DFS(n.languages,function(t,n){n===r[e]&&t!=e&&(this[t]=o)}),r[e]=o},DFS:function(e,t,a,r){r=r||{};for(var l in e)e.hasOwnProperty(l)&&(t.call(e,l,e[l],a||l),"Object"!==n.util.type(e[l])||r[n.util.objId(e[l])]?"Array"!==n.util.type(e[l])||r[n.util.objId(e[l])]||(r[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,l,r)):(r[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,null,r)))}},plugins:{},highlightAll:function(e,t){var a={callback:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",a);for(var r,l=a.elements||document.querySelectorAll(a.selector),i=0;r=l[i++];)n.highlightElement(r,e===!0,a.callback)},highlightElement:function(t,a,r){for(var l,i,o=t;o&&!e.test(o.className);)o=o.parentNode;o&&(l=(o.className.match(e)||[,""])[1].toLowerCase(),i=n.languages[l]),t.className=t.className.replace(e,"").replace(/\s+/g," ")+" language-"+l,o=t.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(e,"").replace(/\s+/g," ")+" language-"+l);var s=t.textContent,u={element:t,language:l,grammar:i,code:s};if(n.hooks.run("before-sanity-check",u),!u.code||!u.grammar)return u.code&&(u.element.textContent=u.code),n.hooks.run("complete",u),void 0;if(n.hooks.run("before-highlight",u),a&&_self.Worker){var g=new Worker(n.filename);g.onmessage=function(e){u.highlightedCode=e.data,n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(u.element),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},g.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else u.highlightedCode=n.highlight(u.code,u.grammar,u.language),n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(t),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},highlight:function(e,t,r){var l=n.tokenize(e,t);return a.stringify(n.util.encode(l),r)},tokenize:function(e,t){var a=n.Token,r=[e],l=t.rest;if(l){for(var i in l)t[i]=l[i];delete t.rest}e:for(var i in t)if(t.hasOwnProperty(i)&&t[i]){var o=t[i];o="Array"===n.util.type(o)?o:[o];for(var s=0;s<o.length;++s){var u=o[s],g=u.inside,c=!!u.lookbehind,h=!!u.greedy,f=0,d=u.alias;if(h&&!u.pattern.global){var p=u.pattern.toString().match(/[imuy]*$/)[0];u.pattern=RegExp(u.pattern.source,p+"g")}u=u.pattern||u;for(var m=0,y=0;m<r.length;y+=r[m].length,++m){var v=r[m];if(r.length>e.length)break e;if(!(v instanceof a)){u.lastIndex=0;var b=u.exec(v),k=1;if(!b&&h&&m!=r.length-1){if(u.lastIndex=y,b=u.exec(e),!b)break;for(var w=b.index+(c?b[1].length:0),_=b.index+b[0].length,P=m,A=y,j=r.length;j>P&&_>A;++P)A+=r[P].length,w>=A&&(++m,y=A);if(r[m]instanceof a||r[P-1].greedy)continue;k=P-m,v=e.slice(y,A),b.index-=y}if(b){c&&(f=b[1].length);var w=b.index+f,b=b[0].slice(f),_=w+b.length,x=v.slice(0,w),O=v.slice(_),S=[m,k];x&&S.push(x);var N=new a(i,g?n.tokenize(b,g):b,d,b,h);S.push(N),O&&S.push(O),Array.prototype.splice.apply(r,S)}}}}}return r},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,l=0;r=a[l++];)r(t)}}},a=n.Token=function(e,t,n,a,r){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length,this.greedy=!!r};if(a.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return a.stringify(n,t,e)}).join("");var l={type:e.type,content:a.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if("comment"==l.type&&(l.attributes.spellcheck="true"),e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,"&quot;")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+"</"+l.tag+">"},!_self.document)return _self.addEventListener?(_self.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,r=t.code,l=t.immediateClose;_self.postMessage(n.highlight(r,n.languages[a],a)),l&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,!document.addEventListener||n.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
     3.6 -Prism.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/i,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup;
     3.7 -Prism.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:{pattern:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\w\W]*?>)[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css"}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag));
     3.8 -Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};
     3.9 -Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*\*?|\/|~|\^|%|\.{3}/}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\\\|\\?[^\\])*?`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript"}}),Prism.languages.js=Prism.languages.javascript;
    3.10 -!function(a){var i={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\]\\]|\\.)*\]|[^\]\\]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}};a.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} +.+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:i,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)<?\d*>/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{"function":/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:i.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?: ['`]|.)+?(?:(?:\r?\n|\r)(?: ['`]|.)+?)*['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:i,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}},i.inside.interpreted.inside.rest={macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity},a.languages.asciidoc["passthrough-block"].inside.rest={macro:a.languages.asciidoc.macro},a.languages.asciidoc["literal-block"].inside.rest={callout:a.languages.asciidoc.callout},a.languages.asciidoc.table.inside.rest={"comment-block":a.languages.asciidoc["comment-block"],"passthrough-block":a.languages.asciidoc["passthrough-block"],"literal-block":a.languages.asciidoc["literal-block"],"other-block":a.languages.asciidoc["other-block"],"list-punctuation":a.languages.asciidoc["list-punctuation"],"indented-block":a.languages.asciidoc["indented-block"],comment:a.languages.asciidoc.comment,title:a.languages.asciidoc.title,"attribute-entry":a.languages.asciidoc["attribute-entry"],attributes:a.languages.asciidoc.attributes,hr:a.languages.asciidoc.hr,"page-break":a.languages.asciidoc["page-break"],admonition:a.languages.asciidoc.admonition,"list-label":a.languages.asciidoc["list-label"],callout:a.languages.asciidoc.callout,macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity,"line-continuation":a.languages.asciidoc["line-continuation"]},a.languages.asciidoc["other-block"].inside.rest={table:a.languages.asciidoc.table,"list-punctuation":a.languages.asciidoc["list-punctuation"],"indented-block":a.languages.asciidoc["indented-block"],comment:a.languages.asciidoc.comment,"attribute-entry":a.languages.asciidoc["attribute-entry"],attributes:a.languages.asciidoc.attributes,hr:a.languages.asciidoc.hr,"page-break":a.languages.asciidoc["page-break"],admonition:a.languages.asciidoc.admonition,"list-label":a.languages.asciidoc["list-label"],macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity,"line-continuation":a.languages.asciidoc["line-continuation"]},a.languages.asciidoc.title.inside.rest={macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity},a.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,"&"))})}(Prism);
    3.11 -!function(e){var t={variable:[{pattern:/\$?\(\([\w\W]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\w\W]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b-?(?:0x[\dA-Fa-f]+|\d*\.?\d+(?:[Ee]-?\d+)?)\b/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[a-z0-9_#\?\*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)(?:"|')?(\w+?)(?:"|')?\s*\r?\n(?:[\s\S])*?\r?\n\2/g,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\\\|\\?[^\\])*?\1/g,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|\s|;|\||&)(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|\s|;|\||&)/,lookbehind:!0},keyword:{pattern:/(^|\s|;|\||&)(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|\s|;|\||&)/,lookbehind:!0},"boolean":{pattern:/(^|\s|;|\||&)(?:true|false)(?=$|\s|;|\||&)/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<<?|>>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a.boolean=e.languages.bash.boolean,a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation}(Prism);
    3.12 -Prism.languages.c=Prism.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(define|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|stdin|stdout|stderr)\b/}),delete Prism.languages.c["class-name"],delete Prism.languages.c["boolean"];
    3.13 -Prism.languages.css.selector={pattern:/[^\{\}\s][^\{\}]*(?=\s*\{)/,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,"class":/\.[-:\.\w]+/,id:/#[-:\.\w]+/,attribute:/\[[^\]]+\]/}},Prism.languages.insertBefore("css","function",{hexcode:/#[\da-f]{3,6}/i,entity:/\\[\da-f]{1,8}/i,number:/[\d%\.]+/});
    3.14 -Prism.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d+.*$/m],deleted:/^[-<].*$/m,inserted:/^[+>].*$/m,diff:{pattern:/^!(?!!).+$/m,alias:"important"}};
    3.15 -Prism.languages.ini={comment:/^[ \t]*;.*$/m,selector:/^[ \t]*\[.*?\]/m,constant:/^[ \t]*[^\s=]+?(?=[ \t]*=)/m,"attr-value":{pattern:/=.*/,inside:{punctuation:/^[=]/}}};
    3.16 -Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|.)*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},builtin:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,symbol:{pattern:/^[^:=\r\n]+(?=\s*:(?!=))/m,inside:{variable:/\$+(?:[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:[/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,{pattern:/(\()(?:addsuffix|abspath|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:s|list)?)(?=[ \t])/,lookbehind:!0}],operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/};
    3.17 -Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"}],title:[{pattern:/\w+.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])([\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^[*_]|[*_]$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.util.clone(Prism.languages.markdown.url),Prism.languages.markdown.italic.inside.url=Prism.util.clone(Prism.languages.markdown.url),Prism.languages.markdown.bold.inside.italic=Prism.util.clone(Prism.languages.markdown.italic),Prism.languages.markdown.italic.inside.bold=Prism.util.clone(Prism.languages.markdown.bold);
    3.18 -Prism.languages.perl={comment:[{pattern:/(^\s*)=\w+[\s\S]*?=cut.*/m,lookbehind:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0}],string:[{pattern:/\b(?:q|qq|qx|qw)\s*([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s+([a-zA-Z0-9])(?:[^\\]|\\[\s\S])*?\1/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\{(?:[^{}\\]|\\[\s\S])*\}/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\[(?:[^[\]\\]|\\[\s\S])*\]/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0},{pattern:/("|`)(?:[^\\]|\\[\s\S])*?\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:/\b(?:m|qr)\s*([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s+([a-zA-Z0-9])(?:[^\\]|\\.)*?\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngc]*/,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\2(?:[^\\]|\\[\s\S])*?\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s+([a-zA-Z0-9])(?:[^\\]|\\[\s\S])*?\2(?:[^\\]|\\[\s\S])*?\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\((?:[^()\\]|\\[\s\S])*\)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\{(?:[^{}\\]|\\[\s\S])*\}\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\[(?:[^[\]\\]|\\[\s\S])*\]\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*<(?:[^<>\\]|\\[\s\S])*>\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(lt|gt|le|ge|eq|ne|cmp|not|and|or|xor|x)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?((::)*'?(?!\d)[\w$]+)+(::)*/i,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*>|\b_\b/,alias:"symbol"},vstring:{pattern:/v\d+(\.\d+)*|\d+(\.\d+){2,}/,alias:"string"},"function":{pattern:/sub [a-z0-9_]+/i,inside:{keyword:/sub/}},keyword:/\b(any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b-?(0x[\dA-Fa-f](_?[\dA-Fa-f])*|0b[01](_?[01])*|(\d(_?\d)*)?\.?\d(_?\d)*([Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(lt|gt|le|ge|eq|ne|cmp|not|and|or|xor)\b/,punctuation:/[{}[\];(),:]/};
    3.19 -Prism.languages.python={"triple-quoted-string":{pattern:/"""[\s\S]+?"""|'''[\s\S]+?'''/,alias:"string"},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/("|')(?:\\\\|\\?[^\\\r\n])*?\1/,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/};
     4.1 --- a/web/style.css	Fri Apr 21 21:24:26 2017 +0100
     4.2 +++ b/web/style.css	Thu May 11 00:14:04 2017 +0300
     4.3 @@ -1,93 +1,69 @@
     4.4  /* CSS style for SliTaz Cooker */
     4.5  
     4.6 -body {
     4.7 -	font-family: sans-serif;
     4.8 -	font-size: 13px;
     4.9 -	margin: 0;
    4.10 -	min-height: 100%;
    4.11 -/*	position: absolute;*/
    4.12 -	left: 0;
    4.13 -	right: 0;
    4.14 -}
    4.15 -#content2 h2 {
    4.16 -	color: #444;
    4.17 -	border-bottom: 2px solid #CCC;
    4.18 -	height: 100%;
    4.19 -}
    4.20 +html { min-height: 102%; }
    4.21 +body { font: 13px sans-serif, vernada, arial; margin: 0; }
    4.22 +h1 { margin: 0; padding: 8px; color: #fff; font-size: 20px; }
    4.23 +h1 a { color: #fff; text-decoration: none; }
    4.24 +h2 { color: #444; }
    4.25  h3 { color: #666; font-size: 140%; }
    4.26 -a { text-decoration: none; color: #215090; }
    4.27 -a:hover { text-decoration: underline; }
    4.28 -.files a { text-decoration: none; color: inherit; }
    4.29 -.files a:hover { text-decoration: underline; }
    4.30 +a { text-decoration: underline; color: #215090; }
    4.31 +a:hover { text-decoration: none; }
    4.32  hr { margin: 0; border: 1px solid #cfcfcf; }
    4.33  pre {
    4.34  	background-color: #f8f8f8;
    4.35  	border: 1px solid #ddd;
    4.36 -	padding: 8px;
    4.37 +	padding: 10px;
    4.38  	overflow: auto;
    4.39 +	font-size: 96%;
    4.40  }
    4.41  
    4.42  /* Header */
    4.43 -body>header {
    4.44 -	display:block;
    4.45 -	background:#444;
    4.46 -	text-align:justify;
    4.47 -	line-height:0;
    4.48 -	box-shadow:0 -8px 8px #333 inset
    4.49 +
    4.50 +#header {
    4.51 +	color: #fff;
    4.52 +	background: #222;
    4.53 +	height: 40px;
    4.54 +	border-bottom: 4px solid #afafaf;
    4.55  }
    4.56 -h1 {
    4.57 -	display:inline-block;
    4.58 -	margin:auto 0;
    4.59 -	height:40px;
    4.60 -	white-space:nowrap;
    4.61 -	vertical-align:middle
    4.62 +
    4.63 +#header h1 {
    4.64 +	margin: 0;
    4.65 +	/* padding: 8px 0 0 42px; */
    4.66 +	width: 250px;
    4.67  }
    4.68 -h1::before {
    4.69 -	display:inline-block;
    4.70 -	content:url(images/logo.png);
    4.71 -	vertical-align:middle
    4.72 +
    4.73 +#header h1 a {
    4.74 +	color: #fff;
    4.75 +	text-decoration: none;
    4.76 +	font-size: 20px;
    4.77 +	font-style: italic;
    4.78  }
    4.79 -h1 a {
    4.80 -	color:#FFF;
    4.81 -	font-size:20px;
    4.82 -	font-style:italic
    4.83 +
    4.84 +#header h1 a:hover, #network a:hover {
    4.85 +	color: #afafaf;
    4.86  }
    4.87 -body>header::before,body>header::after,.block>div::before,.block>div::after {
    4.88 -	display:inline-block;
    4.89 -	width:100%;
    4.90 -	height:0;
    4.91 -	visibility:hidden;
    4.92 -	overflow:hidden;
    4.93 -	content:''
    4.94 +
    4.95 +/* Header links */
    4.96 +
    4.97 +#network {
    4.98 +	float: right;
    4.99 +	padding: 14px 5px 0;
   4.100 +	font-size: 12px;
   4.101  }
   4.102 -.network {
   4.103 -	display:inline-block;
   4.104 -	text-align:left;
   4.105 -	vertical-align:middle;
   4.106 -	font-size:12px;
   4.107 -	line-height:normal;
   4.108 -	color:#999
   4.109 -}
   4.110 -.network a {
   4.111 -	display:inline-block;
   4.112 -	padding:0 6px;
   4.113 -	vertical-align:middle;
   4.114 -	color:#FFF
   4.115 +
   4.116 +#network a {
   4.117 +	padding: 0 4px;
   4.118 +	color: #fff;
   4.119 +	font-weight: bold;
   4.120 +	text-decoration: none;
   4.121  }
   4.122  
   4.123  /* Content */
   4.124  
   4.125  #content {
   4.126 -	margin: auto;
   4.127 -	padding: 0.5em;
   4.128 +	margin: 40px 80px;
   4.129 +	text-align: justify;
   4.130  }
   4.131 -#content2 {
   4.132 -	width: 100%; box-sizing: border-box;
   4.133 -	max-width: 700px;
   4.134 -	margin: auto;
   4.135 -	padding: 0.5em;
   4.136 -}
   4.137 -
   4.138  
   4.139  .span-ok    { color: #0a0; }
   4.140  .span-red   { color: red; }
   4.141 @@ -102,9 +78,9 @@
   4.142  /* Buttons */
   4.143  
   4.144  .button {
   4.145 -	display: inline-block;
   4.146 +	cursor: pointer;
   4.147  	padding: 4px;
   4.148 -	margin: 2px 0;
   4.149 +	margin: 4px 0px;
   4.150  }
   4.151  
   4.152  a.button, .pctbar  {
   4.153 @@ -112,154 +88,39 @@
   4.154  	color: #666;
   4.155  }
   4.156  
   4.157 -.pct {
   4.158 -	background: #9dff4a;
   4.159 -	background-image: -webkit-linear-gradient(#CDFFA3, #9DFF4A 40%, #87DB40);
   4.160 -	background-image:    -moz-linear-gradient(#CDFFA3, #9DFF4A 40%, #87DB40);
   4.161 -	padding: 2px 4px;
   4.162 +.button:hover {
   4.163 +	border: 1px solid #999;
   4.164  }
   4.165 +
   4.166 +.pct { background: #9dff4a; padding: 2px 4px; }
   4.167  .pctbar { overflow: hidden; }
   4.168  
   4.169 -.button {
   4.170 -	text-decoration: none;
   4.171 -	color: #444;
   4.172 -	border: 1px solid #666;
   4.173 +.button, .pctbar {
   4.174 +	border: 1px solid #cccccc;
   4.175  	font-size: 14px;
   4.176  	line-height: 1.2em;
   4.177 -}
   4.178 -.button:hover {
   4.179 -	color: #000;
   4.180 -	border-color: #000;
   4.181 -}
   4.182 -.button.active {
   4.183 -	/*outline: 1px solid #999;
   4.184 -	outline-offset: 1px;*/
   4.185 -	color: #000;
   4.186 -	border-color: #000;
   4.187 +	background-image: -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5);
   4.188 +	background-image: -moz-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5);
   4.189 +	-webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
   4.190 +	-moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
   4.191 +	box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
   4.192  }
   4.193  
   4.194 -.pctbar {
   4.195 -	border: 1px solid #AAA;
   4.196 -	font-size: 14px;
   4.197 -	line-height: 1.2em;
   4.198 -	background-image: -webkit-linear-gradient(#E5E5E5, #F4F4F4 40%, #FAFAFA);
   4.199 -	background-image: -moz-linear-gradient(#E5E5E5, #F4F4F4 40%, #FAFAFA);
   4.200 -}
   4.201  /* Round corner */
   4.202  
   4.203  pre, .button, .pctbar {
   4.204 -	border-radius: 2px;
   4.205 +	-moz-border-radius: 4px;
   4.206 +	-webkit-border-radius: 4px;
   4.207 +	border-radius: 4px;
   4.208  }
   4.209  
   4.210  /* Footer */
   4.211  
   4.212  #footer {
   4.213  	text-align: center;
   4.214 -	padding: 20px 0;
   4.215 +	padding: 20px;
   4.216  	border-top: 1px solid #ddd;
   4.217  	font-size: 90%;
   4.218 -/*	position: absolute;*/
   4.219 -	bottom: 0;
   4.220 -	left: 0;
   4.221 -	right: 0;
   4.222  }
   4.223  
   4.224  #footer a { padding: 0 2px; }
   4.225 -
   4.226 -body>footer {
   4.227 -	background:#f1f1f1;
   4.228 -	text-align:center;
   4.229 -	border-top:1px solid #CCC;
   4.230 -	padding:6px;
   4.231 -	color:#666;
   4.232 -	clear:both;
   4.233 -	box-shadow:0 4px 8px #CCC inset
   4.234 -}
   4.235 -
   4.236 -footer a+a::before { display: inline-block; content: '• '; color: #E81; }
   4.237 -
   4.238 -body>footer div {
   4.239 -	margin:12px
   4.240 -}
   4.241 -
   4.242 -
   4.243 -
   4.244 -.log a { text-decoration: none; color: #666; }
   4.245 -.log a:hover { color: #000; }
   4.246 -
   4.247 -.activity { padding-left: 0.5em; }
   4.248 -.activity li { list-style-type: none; }
   4.249 -.activity li:before { color: #666; content: "•"; padding-right: 0.5em; }
   4.250 -
   4.251 -.r { float: right; }
   4.252 -
   4.253 -.zebra tr:nth-child(odd)  { background-color: #FFFFFF; }
   4.254 -.zebra tr:nth-child(even) { background-color: #ECECEC; }
   4.255 -
   4.256 -.gray   { background-color: lightgray; }
   4.257 -.gold   { background-color: gold; }
   4.258 -.green  { background-color: greenyellow; }
   4.259 -.sky    { background-color: skyblue; }
   4.260 -.plum   { background-color: plum; }
   4.261 -.yellow { background-color: yellow; }
   4.262 -.khaki  { background-color: khaki; }
   4.263 -.brown  { background-color: sandybrown; }
   4.264 -
   4.265 -a:target {background-color: yellow; }
   4.266 -
   4.267 -
   4.268 -/*
   4.269 -table {
   4.270 -	border-spacing: 0;
   4.271 -	padding: 0 2px;
   4.272 -	border-width: 1px;
   4.273 -	border-color: #666;
   4.274 -	border-radius: 4px;
   4.275 -	border-style: solid;
   4.276 -}
   4.277 -th {
   4.278 -	background-color: #CCC;
   4.279 -}
   4.280 -td {
   4.281 -	border-bottom: 1px solid #79B;
   4.282 -	padding: 2px;
   4.283 -}
   4.284 -tr:last-child td {
   4.285 -	border-bottom: unset;
   4.286 -}
   4.287 -*/
   4.288 -
   4.289 -table {
   4.290 -	/*width: 100%;*/
   4.291 -	border: 1px solid #CCC;
   4.292 -	border-radius: 4px;
   4.293 -	border-spacing: 0;
   4.294 -	padding: 0;
   4.295 -}
   4.296 -tr {
   4.297 -	margin: 0;
   4.298 -	padding: 2px;
   4.299 -}
   4.300 -td {
   4.301 -	margin: 0;
   4.302 -	padding: 3px;
   4.303 -	vertical-align: top;
   4.304 -	line-height: 1.1;
   4.305 -}
   4.306 -thead tr {
   4.307 -	background-color:#DDD
   4.308 -}
   4.309 -thead th {
   4.310 -	border-bottom:1px solid #BBB
   4.311 -}
   4.312 -
   4.313 -tbody tr:nth-child(odd)  { background-color: #FFFFFF; }
   4.314 -tbody tr:nth-child(even) { background-color: #ECECEC; }
   4.315 -
   4.316 -#content, #content2 {
   4.317 -	min-height: 80vh;
   4.318 -}
   4.319 -
   4.320 -.texinfo pre { display: none; }
   4.321 -/*.texinfo pre.first:not(:target) { display: block; }*/
   4.322 -.texinfo pre:target { display: block; }