CoCalc Public Fileswww / sga / sga / scripts / makepage_individual.pyOpen in with one click!
Author: William A. Stein
1
#! /usr/bin/python
2
3
#############################################################
4
# Make an HTML page for the SGA project
5
#
6
# Call it like this
7
# makepage_individual.py $prev $current $next $book > "$current"html
8
#
9
# William Stein, 14 August 2001
10
#############################################################
11
12
import string, sys
13
14
if len(sys.argv) != 5:
15
print "Usage: " + sys.argv[0] + " previous current next book\n"
16
sys.exit(1)
17
18
previous = sys.argv[1]
19
current = sys.argv[2]
20
next = sys.argv[3]
21
book = sys.argv[4]
22
23
print '<html>'
24
print '<title>%shtml</title>'%(current)
25
print '<link REL=STYLESHEET TYPE="text/css"'
26
print 'HREF="../sga.css" TITLE="%shtml">'%(current)
27
print '<body>\n'
28
print '<a href="%shtml">[Prev]</a>&nbsp&nbsp&nbsp&nbsp&nbsp'%(previous)
29
print '<a href="%shtml">[Next]</a>&nbsp&nbsp&nbsp&nbsp&nbsp'%(next)
30
print '<a href="index.html">[Index]</a>&nbsp&nbsp&nbsp&nbsp&nbsp'
31
print '<a href="../index.html">[Root]</a>&nbsp&nbsp&nbsp&nbsp&nbsp'
32
print '<a href="#annotate">[Annotation]</a>&nbsp&nbsp&nbsp&nbsp&nbsp'
33
print '<hr>'
34
print '<img src="%sjpeg" alt="%sjpeg">&nbsp'%(current, current)
35
print '<a href="%stif" alt="%stif">%stif</a>'%(current,current,current)
36
print '<br><hr>'
37
print '<a href="%shtml">[Prev]</a>&nbsp&nbsp&nbsp&nbsp&nbsp'%(previous)
38
print '<a href="%shtml">[Next]</a>&nbsp&nbsp&nbsp&nbsp&nbsp'%(next)
39
print '<a href="index.html">[Index]</a>&nbsp&nbsp&nbsp&nbsp&nbsp'
40
print '<a href="../index.html">[Root]</a>&nbsp&nbsp&nbsp&nbsp&nbsp'
41
print '<a href="#annotate">[Annotation]</a>&nbsp&nbsp&nbsp&nbsp&nbsp'
42
print '<hr><br>'
43
print '<form method="post" action="/cgi-bin/annotate">'
44
print '<input type="hidden" name="url" value="sga/files/%s/%shtml">'%(book,current)
45
print '<h4>Enter text below to add a new annotation:</h4>'
46
print 'Your name: <input type="text" name="name">'
47
print '<br>'
48
print '<textarea type="text" name="annotation" rows=7 cols=70></textarea>'
49
print '<br>'
50
print '<input type="submit" value="Submit"> <input type="reset" value="Clear">'
51
print '</form>'
52
print '<a name=annotate><h2>Annotation</h2>'
53
54
55
56