]> git.phdru.name Git - phdru.name/phdru.name.git/blob - phd_pp_ru.py
Scripts to (re)build phd.pp.ru site.
[phdru.name/phdru.name.git] / phd_pp_ru.py
1 #!/usr/bin/env python
2 # -*- coding: koi8-r -*-
3
4 """
5 Autogenerated by CHEETAH: The Python-Powered Template Engine
6  CHEETAH VERSION: 1.0
7  Generation time: Mon Jan  2 23:48:51 2006
8    Source file: phd_pp_ru.tmpl
9    Source file last modified: Mon Jan  2 23:48:44 2006
10 """
11
12 __CHEETAH_genTime__ = 'Mon Jan  2 23:48:51 2006'
13 __CHEETAH_src__ = 'phd_pp_ru.tmpl'
14 __CHEETAH_version__ = '1.0'
15
16 ##################################################
17 ## DEPENDENCIES
18
19 import sys
20 import os
21 import os.path
22 from os.path import getmtime, exists
23 import time
24 import types
25 import __builtin__
26 from Cheetah.Template import Template
27 from Cheetah.DummyTransaction import DummyTransaction
28 from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
29 from Cheetah.CacheRegion import CacheRegion
30 import Cheetah.Filters as Filters
31 import Cheetah.ErrorCatchers as ErrorCatchers
32 from phd_pp import phd_pp
33 import time
34
35 ##################################################
36 ## MODULE CONSTANTS
37
38 try:
39     True, False
40 except NameError:
41     True, False = (1==1), (1==0)
42 VFFSL=valueFromFrameOrSearchList
43 VFSL=valueFromSearchList
44 VFN=valueForName
45 currentTime=time.time
46
47 ##################################################
48 ## CLASSES
49
50 class phd_pp_ru(phd_pp):
51     """
52     
53     Autogenerated by CHEETAH: The Python-Powered Template Engine
54     """
55
56     ##################################################
57     ## GENERATED METHODS
58
59
60     def __init__(self, *args, **KWs):
61         """
62         
63         """
64
65         phd_pp.__init__(self, *args, **KWs)
66
67     def respond(self,
68             trans=None,
69             VFFSL=valueFromFrameOrSearchList,
70             VFN=valueForName):
71
72
73         """
74         This is the main method generated by Cheetah
75         """
76
77         if not trans: trans = self.transaction # is None unless self.awake() was called
78         if not trans:
79             trans = DummyTransaction()
80             dummyTrans = True
81         else: dummyTrans = False
82         write = trans.response().write
83         SL = self._searchList
84         globalSetVars = self._globalSetVars
85         filter = self._currentFilter
86         
87         ########################################
88         ## START - generated method body
89         
90         write('''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
91    "http://www.w3.org/TR/html4/loose.dtd">
92 <html>
93 <!-- THIS PAGE IS AUTOMATICALLY GENERATED USING CheetahTemplate. DO NOT EDIT. -->
94 <head>
95 <meta HTTP-Equiv="Content-Type" content="text/html">
96 <meta HTTP-Equiv="Content-Location" content="http://phd.pp.ru''')
97         __v = VFFSL(SL,"path",True)
98         if __v is not None: write(filter(__v, rawExpr='$path')) # from line 21, col 62.
99         write('">\n<meta HTTP-Equiv="Last-Modified" content="')
100         __v = VFFSL(SL,"last_modified_en",True)
101         if __v is not None: write(filter(__v, rawExpr='$last_modified_en')) # from line 22, col 43.
102         write('">\n<title>')
103         __v = VFFSL(SL,"Title",True)
104         if __v is not None: write(filter(__v, rawExpr='$Title')) # from line 23, col 8.
105         write('</title>\n')
106         if VFFSL(SL,"refresh",True):
107             write('<meta HTTP-Equiv="Refresh" content="')
108             __v = VFFSL(SL,"refresh",True)
109             if __v is not None: write(filter(__v, rawExpr='$refresh')) # from line 25, col 37.
110             write('">\n')
111         if VFFSL(SL,"Description",True):
112             write('<meta name="description" content="')
113             __v = VFFSL(SL,"Description",True)
114             if __v is not None: write(filter(__v, rawExpr='$Description')) # from line 28, col 35.
115             write('">\n')
116         if VFFSL(SL,"Keywords",True):
117             write('<meta name="keywords" content="')
118             __v = VFFSL(SL,"Keywords",True)
119             if __v is not None: write(filter(__v, rawExpr='$Keywords')) # from line 31, col 32.
120             write('">\n')
121         if VFFSL(SL,"Copyright",True):
122             full_copyright = VFFSL(SL,"copyright",False)(VFFSL(SL,"Copyright",True))
123             write('<meta name="author" content="Oleg BroytMann">\n<meta name="copyright" content="&copy; ')
124             __v = VFFSL(SL,"full_copyright",True)
125             if __v is not None: write(filter(__v, rawExpr='$full_copyright')) # from line 36, col 40.
126             write(' PhiloSoft Design">\n<link rel="copyright" href="." title="&copy; ')
127             __v = VFFSL(SL,"full_copyright",True)
128             if __v is not None: write(filter(__v, rawExpr='$full_copyright')) # from line 37, col 46.
129             write(' PhiloSoft Design">\n')
130         write('<meta name="generator" content="CheetahTemplate">\n<link rev="made" href="mailto:phd@phd.pp.ru">\n')
131         if VFFSL(SL,"root",True):
132             write('<link rel="top" href="')
133             __v = VFFSL(SL,"root",True)
134             if __v is not None: write(filter(__v, rawExpr='$root')) # from line 42, col 23.
135             write('">\n<link rel="up" href="../">\n')
136         if VFFSL(SL,"Prev",True):
137             write('<link rel="prev" href="')
138             __v = VFFSL(SL,"Prev",True)
139             if __v is not None: write(filter(__v, rawExpr='$Prev')) # from line 46, col 24.
140             write('">\n')
141         if VFFSL(SL,"Next",True):
142             write('<link rel="next" href="')
143             __v = VFFSL(SL,"Next",True)
144             if __v is not None: write(filter(__v, rawExpr='$Next')) # from line 49, col 24.
145             write('">\n')
146         write('<link rel="stylesheet" type="text/css" media="screen" href="')
147         __v = VFFSL(SL,"root",True)
148         if __v is not None: write(filter(__v, rawExpr='${root}')) # from line 51, col 61.
149         write('phd.css">\n')
150         if VFFSL(SL,"styles",True):
151             for media, style in VFFSL(SL,"styles",True):
152                 write('<STYLE type="text/css" media="')
153                 __v = VFFSL(SL,"media",True)
154                 if __v is not None: write(filter(__v, rawExpr='$media')) # from line 54, col 31.
155                 write('">\n<!--\n')
156                 __v = VFFSL(SL,"style",True)
157                 if __v is not None: write(filter(__v, rawExpr='$style')) # from line 56, col 1.
158                 write('\n--></STYLE>\n')
159         write('''<meta name="MSSmartTagsPreventParsing" content="TRUE"> <!-- MUST DIE -->
160 </head>
161 <body bgcolor="#CCCCCC" text="#000000"
162       link="#0000bb"  vlink="#551a8b" alink="#ff0000">
163 ''')
164         __v = VFFSL(SL,"body",True)
165         if __v is not None: write(filter(__v, rawExpr='$body')) # from line 64, col 1.
166         write('\n')
167         if VFN(VFFSL(SL,"path",True),"endswith",False)("index.html"):
168             path = VFFSL(SL,"path",True)[:-len("index.html")]
169         write('<hr width="90%">\n')
170         if VFN(VFFSL(SL,"path",True),"startswith",False)("/Russian/"):
171             write('<p class="head" style="font-size: 60%">\xfc\xd4\xc1 \xd3\xd4\xd2\xc1\xce\xc9\xc3\xc1 <a href="http://phd.pp.ru')
172             __v = VFFSL(SL,"path",True)
173             if __v is not None: write(filter(__v, rawExpr='$path')) # from line 70, col 78.
174             write('">http://phd.pp.ru')
175             __v = VFFSL(SL,"path",True)
176             if __v is not None: write(filter(__v, rawExpr='$path')) # from line 70, col 101.
177             write('</a>\n\xc2\xd9\xcc\xc1 \xd3\xc7\xc5\xce\xc5\xd2\xc9\xd2\xcf\xd7\xc1\xce\xc1 ')
178             __v = VFFSL(SL,"last_modified_ru",True)
179             if __v is not None: write(filter(__v, rawExpr='$last_modified_ru')) # from line 71, col 20.
180             write(' \xc9\xda \xdb\xc1\xc2\xcc\xcf\xce\xc1 CheetahTemplate <a href="')
181             __v = VFFSL(SL,"_fileBaseName",True)
182             if __v is not None: write(filter(__v, rawExpr='$_fileBaseName')) # from line 71, col 74.
183             write('">')
184             __v = VFFSL(SL,"_fileBaseName",True)
185             if __v is not None: write(filter(__v, rawExpr='$_fileBaseName')) # from line 71, col 90.
186             write('</a>;\n\xf7\xd9 \xcd\xcf\xd6\xc5\xd4\xc5 \xd5\xda\xce\xc1\xd4\xd8 <a href="')
187             __v = VFFSL(SL,"root",True)
188             if __v is not None: write(filter(__v, rawExpr='${root}')) # from line 72, col 27.
189             write('about/">\xcf</a> <a href="')
190             __v = VFFSL(SL,"root",True)
191             if __v is not None: write(filter(__v, rawExpr='${root}')) # from line 72, col 57.
192             write('about/technical.html">\xd4\xc5\xc8\xce\xc9\xde\xc5\xd3\xcb\xc9\xc8</a> \xc1\xd3\xd0\xc5\xcb\xd4\xc1\xc8 \xdc\xd4\xcf\xc7\xcf \xd3\xc1\xca\xd4\xc1.\n</p>\n')
193         else:
194             write('<p class="head" style="font-size: 60%">This is the page <a href="http://phd.pp.ru')
195             __v = VFFSL(SL,"path",True)
196             if __v is not None: write(filter(__v, rawExpr='$path')) # from line 75, col 82.
197             write('">http://phd.pp.ru')
198             __v = VFFSL(SL,"path",True)
199             if __v is not None: write(filter(__v, rawExpr='$path')) # from line 75, col 105.
200             write('</a>.\nIt was generated on ')
201             __v = VFFSL(SL,"last_modified_en",True)
202             if __v is not None: write(filter(__v, rawExpr='$last_modified_en')) # from line 76, col 21.
203             write(' from CheetahTemplate <a href="')
204             __v = VFFSL(SL,"_fileBaseName",True)
205             if __v is not None: write(filter(__v, rawExpr='$_fileBaseName')) # from line 76, col 69.
206             write('">')
207             __v = VFFSL(SL,"_fileBaseName",True)
208             if __v is not None: write(filter(__v, rawExpr='$_fileBaseName')) # from line 76, col 85.
209             write('</a>;\nread more <a href="')
210             __v = VFFSL(SL,"root",True)
211             if __v is not None: write(filter(__v, rawExpr='${root}')) # from line 77, col 20.
212             write('about/">about</a> <a href="')
213             __v = VFFSL(SL,"root",True)
214             if __v is not None: write(filter(__v, rawExpr='${root}')) # from line 77, col 54.
215             write('about/technical.html">technical</a> aspects of the site.\n</p>\n')
216         write('</body>\n</html>')
217         
218         ########################################
219         ## END - generated method body
220         
221         return dummyTrans and trans.response().getvalue() or ""
222         
223     ##################################################
224     ## GENERATED ATTRIBUTES
225
226
227     Title = ''
228
229     Description = None
230
231     Keywords = None
232
233     Copyright = None
234
235     Prev = None
236
237     Next = None
238
239     refresh = None
240
241     last_modified_en = time.strftime("%a, %d %b %Y %T GMT", time.gmtime())
242
243     last_modified_ru = time.strftime("%d.%m.%Y в %T", time.localtime())
244
245     styles = None
246
247     __str__ = respond
248
249     _mainCheetahMethod_for_phd_pp_ru= 'respond'
250
251
252 # CHEETAH was developed by Tavis Rudd, Mike Orr, Ian Bicking and Chuck Esterbrook;
253 # with code, advice and input from many other volunteers.
254 # For more information visit http://www.CheetahTemplate.org
255
256 ##################################################
257 ## if run from command line:
258 if __name__ == '__main__':
259     phd_pp_ru().runAsMainProgram()
260