-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdelicious.cgi
executable file
·77 lines (65 loc) · 1.65 KB
/
delicious.cgi
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/python
#
# delicious.cgi: CGI script for building home page from delicious
# bookmarks tagged home.
#
# Copyright (c) Nicholas J. Radcliffe 2008-2009
#
# See LICENSE for license.
#
import sys, re, socket
import cgi
host = socket.gethostbyaddr(socket.gethostname())[0]
from delicious import *
HEAD="""
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.sq {width: 4ex;}
.Sans {font-family : Helvetica, Arial, Verdana, Sans;}
.Serif {font-family : Times, Serif;}
.Mono {font-family : Courier, monospace;}
.Giant {font-size : 72pt;
font-family: Times, Garamond, Baskerville, Serif;}
.Subtitle { font-family : Garamond, Times, Serif;
font-style : italic;
font-size: large;
padding: 0 0 12pt 0;
color: darkgreen; }
.PushRight { padding: 0 0 0 40pt; }
.Help { font-family : Helvetica, Arial, Verdana, Sans;
font-size : small; }
a:link
{
color:#006000;
text-decoration:none;
}
a:visited
{
color:#003000;
text-decoration:none;
}
a:hover
{
color:#007F00;
text-decoration:underline;
}
a img
{
border-width:0;
}
</style>
<title>Delicious Updater</title>
</head>
<body>
<p>Hi</p>
"""
TAIL="""
</body>
</html>"""
def HTMLHeader ():
return 'Content-Type: text/html\n'
def TextHeader ():
return 'Content-Type: text/plain\n'
print (TextHeader ())
RefreshHomepageFromDelicious ()