home_dir = get_homedir()
-def add_headers(fname, prev, next):
+def add_headers(fname, start, prev, next):
head_fname = os.path.join(home_dir, fname + ".head")
head_file = open(head_fname, 'r')
head = head_file.read()
html_file.write("#implements respond\n")
html_file.write("#attr $Title = \"%s\"\n" % dot_name)
html_file.write("#attr $Copyright = 2003\n")
+ if start:
+ html_file.write("#attr $Start = \"index.html\"\n")
if prev:
html_file.write("#attr $Prev = \"%s.html\"\n" % prev)
if next:
html_file.write("#attr $Next = \"%s.html\"\n" % next)
- html_file.write('#attr $alternates = (("text/plain", "Plain text version", "%s"),)' % txt_name)
+ html_file.write('#attr $alternates = (("Plain text version", "text/plain", "%s"),)' % txt_name)
html_file.write("\n")
html_file.write("#def body_html\n")
html_file.write("#raw\n")
""" % (ftype, home_dir, fname))
if i == 0:
+ start = None
prev = None
else:
+ start = True
prev = file_types[i-1][0]
if i >= ft_len - 1:
next = None
else:
next = file_types[i+1][0]
- add_headers(fname, prev, next)
+ add_headers(fname, start, prev, next)
if os.path.exists(fname + ".tmpl") and filecmp.cmp(fname + ".html", fname + ".tmpl"):
os.remove(fname + ".html")
#attr $Description = None
#attr $Keywords = None
#attr $Copyright = None
+#attr $Start = None
#attr $Prev = None
#attr $Next = None
#attr $refresh = None
<link rev="made" href="mailto:phd@phd.pp.ru">
<meta name="robots" content="index, follow">
#if $root
-<link rel="top" href="$root">
-<link rel="up" href="../">
+<link rel="Top" href="$root">
+<link rel="Up" href="../">
+#end if
+#if $Start
+<link rel="Start" href="$Start">
#end if
#if $Prev
-<link rel="prev" href="$Prev">
+<link rel="Prev" href="$Prev">
#end if
#if $Next
-<link rel="next" href="$Next">
+<link rel="Next" href="$Next">
#end if
<link rel="stylesheet" type="text/css" media="screen" href="${root}phd.css">
#if $styles
#end for
#end if
#if $alternates
-#for $type, $title, $href in $alternates
-<link rel="alternate" type="$type" title="$title" href="$href">
+#for $title, $type, $href in $alternates
+<link rel="alternate" title="$title" type="$type" href="$href">
#end for
#end if
<link rel="shortcut icon" href="${root}favicon.ico">