File: make-am-html

package info (click to toggle)
altos 1.9.22-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 83,712 kB
  • sloc: ansic: 120,853; java: 42,921; makefile: 8,573; sh: 4,995; xml: 2,154; pascal: 2,008
file content (30 lines) | stat: -rwxr-xr-x 784 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
cat << 'EOF'
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content=
"text/html; charset=utf-8" />
<title>Altus Metrum Documentation</title>
<link rel="stylesheet" type="text/css" href="am.css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
</head>
<body>
<h1>Altus Metrum Documentation</h1>
EOF

for i in "$@"; do
	echo '<p>'
	grep '<title>' $i | head -1 | sed -e 's/.*<title>//' -e 's;</title>.*;;'
	pdf=`basename "$i" .html`.pdf
	echo '<a href="'$i'">html</a>'
	echo '<a href="'$pdf'">pdf</a>'
	echo '</p>'
done

cat << 'EOF'
</body>
</html>
EOF