-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex_make2.py
616 lines (567 loc) · 20 KB
/
index_make2.py
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
# coding=utf-8
""" index_make2.py July 9, 2014,
Make Sanskrit-Lexicon home page.
Use indexdirs.xml
Revised June 5, 2015
Revised June 23, 2015
Revised Dec 13, 2016 - Add new apidev display
Dec 21, 2017. Added 'simple' display
Jan 31, 2018. Moved BHS from san_english to san_special
Tamil Lexicon
May 31, 2018. Add privacy notice section
Jun 12, 2018. Add Impressum link in privacy section
"""
import sys,codecs
import re
import os
import xml.etree.cElementTree as ET
import string
# True means funded DFG-NEH Project 2010-2013
# False means not so funded
asteriskData = {"ACC":True , "AE":False , "AP":False , "AP90":True,
"BEN":True , "BHS":True , "BOP":True , "BOR":True,
"BUR":True , "CAE":False , "CCS":True , "GRA":True,
"GST":True , "IEG":True , "INM":True , "KRM":True,
"MCI":True , "MD":False , "MW":False , "MW72":True,
"MWE":True , "PD":True , "PE":True , "PGN":True,
"PUI":True , "PWG":False , "PW":False , "SCH":False,
"SHS":False , "SKD":True , "SNP":True , "STC":True,
"VCP":True , "VEI":True , "WIL":False , "YAT":True}
class Scan(object):
def __init__(self,e):
self.pfx = e.find('pfx').text
self.year = e.find('year').text
self.title = e.find('title').text
self.dsize = e.find('dsize').text
self.dyear = e.find('dyear').text
self.authors = e.find('authors').text
textdate = e.find('textdate').text
textpages = e.find('textpages').text
m = re.search(r'^([0-9]+)',textdate)
if m:
textdate = m.group(1)
self.textdate = textdate
m = re.search(r'^([0-9]+)',textpages)
if m:
textpages = m.group(1)
self.textpages = textpages
def toStringdbg(self):
parts = [
"pfx=%s" % self.pfx,
"title=%s" % self.title,
"dsize=%s" % self.dsize,
"dyear=%s" % self.dyear,
"authors=%s" % self.authors,
"textdate=%s" % self.textdate,
"textpages=%s" % self.textpages,
]
return ','.join(parts)
def parse_indexdirs(filein):
"returns a dict of Scan objects, indexed by pfx"
d = {} # returned
parser = ET.XMLParser(encoding="utf-8")
tree = ET.parse(filein,parser=parser)
root = tree.getroot()
for entry in root:
rec = Scan(entry)
d[rec.pfx]=rec
return d
def prev_headerdiv():
div ="""
<div id="header">
<table>
<tr>
<td>
<img src="/images/cologne_univ_seal.gif" id="logo" alt="IITS" title="Cologne Sanskrit Lexicon"/>
<br/>
<span class="style19">
UNIVERSITÄT ZU KÖLN <br />
</span>
</td>
<!-- -->
<td>
<span class="style1">Cologne Digital Sanskrit Dictionaries</span>
</td>
</tr>
</table>
<hr/>
</div>
"""
lines = string.split(div, '\n\r')
return lines
def headerdiv():
""" Aug 1, 2018. clarin logo.
Changed to use flexbox.
"""
div ="""
<div id="header" style="display:flex; flex-flow: row wrap; justify-content:space-between; width:89%; align-items:center;">
<div class="child1">
<img src="/images/cologne_univ_seal.gif" id="logo" alt="IITS" title="Cologne Sanskrit Lexicon"/>
<br/>
<span class="style19">
UNIVERSITÄT ZU KÖLN <br />
</span>
</div>
<div class="child2" >
<span class="style1">Cologne Digital Sanskrit Dictionaries</span>
</div>
<div class="child3" >
<a href="https://www.clarin.eu/" class="child3" target="_blank" >
<img src="/images/clarin-400x400.png"
width="90px" height="90px"
title="CLARIN - European Research Infrastructure for Language Resources and Technology" >
</a>
</div>
</div> <!-- header-->
<hr style="width:89%; margin-left:0px;"/>
"""
lines = string.split(div, '\n\r')
return lines
def purpos1ediv():
divunused ="""
<div id="purpose1">
<h2>Purpose</h2>
<p>
This web page provides access to some of the Sanskrit lexicons prepared
by the Institute of Indology and Tamil Studies, Cologne University.
A 1997 review of the Cologne Digital Sanskrit Lexicon project
(<a href="/CDSL.pdf">CDSL</a>)
may be of interest.</p>
<p>
The data is made available to scholars
and students in two forms. The first form is that of <em>scanned images</em> of the
works, which provides a convenient substitute to the physical books.
The second form is a <em>digitization</em> of the scanned images, which
permits computer-aided analyses and displays of the work.
</p>
</div>
"""
div ="""
<div id="purpose1">
<!-- Removed 08/08/2018
<p>
This web page provides access to many of the Sanskrit lexicons prepared
by the Institute of Indology and Tamil Studies, Cologne University.
<br/>
The dictionaries are organized primarily by the secondary language
(English, German, etc.), and then by date of publication.
<br/>
Each dictionary has several types of display, as well as a comprehensive
selection of materials for download.
</p>
-->
<p>
Welcome to the Sanskrit lexicons prepared since 1994 by the Institute of Indology and Tamil Studies, Cologne University.
<br/>
The 36 dictionaries are organized primarily by the secondary language (English, German, etc.), and then by date of publication (1832 till 1976).
<br/>
Each dictionary has several types of display (B L A M), as well as PDF scan and XML (in <a href="https://en.wikipedia.org/wiki/SLP1">SLP1</a>) files for download (D).
</p>
<p>
<a href='/scans/csldev/csldoc/build/index.html' target="_csldoc"><b>Documentation</b></a>
<!--
<a href='/scans/csldoc/index.html' target="_csldoc"><b>Documentation</b></a>
-->
<!-- Removed: Dec 13, 2016
(Previous Cologne Sanskrit-Lexicon <a href='index_prev.html'>Home Page</a>)
-->
<!--
<a href="//www.sanskrit-lexicon.uni-koeln.de/scans/awork/apidev/sample/list-0.2.html"> <img src="/images/new_item.png"> display</a>
-->
<!-- removed 12-21-2017
<a href="//www.sanskrit-lexicon.uni-koeln.de/scans/awork/apidev/sample/list-0.2.html"> <b>New Display</b> (Dec 2016)</a>
-->
<b>New Displays: </b>
<a href="//www.sanskrit-lexicon.uni-koeln.de/scans/awork/apidev/sample/list-0.2.html">(Dec 2016)</a>
<a href="//www.sanskrit-lexicon.uni-koeln.de/scans/awork/apidev/simple-search/v1.0/list-0.2s.html">(Dec 2017)</a>
<span style="position:absolute;right:11%">
Found an error?
<a href='/scans/csldoc/contrib/index.html' target="_csldoc">
<b>Help us on <img src="/images/github-9-16.gif">GitHub</b>
</a>
</span>
</p>
</div>
"""
lines = string.split(div, '\n\r')
return lines
def make_link(href,title,text):
return "<a href='%s' title='%s'>%s</a>" %(href,title,text)
def make_links(data):
parts=[]
for (href,title,text) in data:
parts.append(make_link(href,title,text))
parts.append(" ")
return parts
def dict_line_extralinks(s):
"return extra links"
extradata = {
'WIL':[
('/scans/WILScan/index.php?sfx=jpg','Scanned edition, jpg','S'),
('#deprecated','Deprecated','Deprecated')
],
'MD':[
('/scans/MDScan/index.php?sfx=jpg','Scanned edition, jpg','S')
],
'MW':[
('/scans/MWScan/index.php?sfx=pdf','Scanned edition, pdf','S1'),
('/scans/MWScan/index.php?sfx=jpg','Scanned edition, jpg','S2'),
('/talkMay2008/markingMonier.html','Marking-Monier','Markup'),
('#deprecated','Deprecated','Deprecated')
],
'AE': [
('/scans/AEScan/index.php?sfx=pdf','Scanned edition, pdf','S1'),
('/scans/AEScan/index.php?sfx=jpg','Scanned edition, jpg','S2'),
('#deprecated','Deprecated','Deprecated')
],
'PWG':[
('/pwgindex.html','Scanned edition','S'),
('#deprecated','Deprecated','Deprecated')
],
'PW':[
('/pwindex.html','Scanned edition','S'),
('#deprecated','Deprecated','Deprecated')
],
'SCH':[
('/scans/SCHScan/index.php','Scanned edition','S')
],
'CCS':[
('/scans/CCSScan/index.php?sfx=png','Scanned edition','S')
],
'CAE':[
('/scans/CAEScan/index.php?sfx=png','Scanned edition','S')
],
'STC':[
('/scans/STCScan/index.php?sfx=jpg','Scanned edition','S'),
('/scans/STCScan/web/index_fr.php',u'semi-numérique','SD'),
],
'PGN':[
('/scans/PGNScan/2014/web/webscan/index.php','Scanned edition','S')
]
}
if s.pfx in extradata:
return make_links(extradata[s.pfx])
else:
return [] # no extra links for this pfx
def dict_line_links(s):
"""Return list of strings
June 15: for AP,PD, return special message
"""
if s.pfx in ['AP','PD']:
message = "<i>available on special request for research purposes</i>"
parts = [message]
return parts
# usual case : links to various displays
basedir = "/scans/%sScan/%s/web" % (s.pfx,s.year)
data = [
('%s/webtc/indexcaller.php' % basedir,'Basic Display','B'),
('%s/webtc1/index.php' % basedir,'List Display','L'),
('%s/webtc2/index.php' % basedir,'Advanced Search','A'),
('%s/mobile1/index.php' % basedir,'Mobile-Friendly','M'),
('%s/webtc/download.html' % basedir,'Downloads','D')
]
if s.pfx == 'STC':
data = [
('%s/webtc/indexcaller_fr.php' % basedir,'Recherche simple','B'),
('%s/webtc1/index.php' % basedir,'Recherche par liste','L'),
('%s/webtc2/index.php' % basedir,u'Recherche avancée','A'),
('%s/mobile1/index.php' % basedir,u'Écran de recherche pour téléphones portables','M'),
('%s/webtc/download_fr.html' % basedir,u'Téléchargements','D')
]
parts = make_links(data)
for link in dict_line_extralinks(s):
parts.append(link)
return parts
def dict_line(s,title_in):
"'s' is a Scan element. Returns a string."
parts=[]
if title_in != '':
title = title_in
title1=s.title
else:
title = s.title
title1= s.title # ?
pfx1 = s.pfx
# June 5, 2015
asterisk = ''
if asteriskData[pfx1]:
asterisk = ' <span title="funded by the DFG-NEH Project 2010-2013">*</span>'
pfx1 = "%s%s" %(pfx1,asterisk)
parts.append(" <td width='6%%'><span style='font-size:10px;'>%s</span></td>" % pfx1)
parts.append(" <td width='6%%'><span style='font-size:10px;'>%s</span></td>" % s.textdate)
basedir = "/scans/%sScan/%s/web" % (s.pfx,s.year)
titlelink = "<a href='%s/index.php'>%s</a>" %(basedir,title)
if s.pfx == 'STC':
titlelink = "<a href='%s/index_fr.php'>%s</a>" %(basedir,title)
elif s.pfx == 'AP':
basedir1 = "/scans/awork/homepage"
titlelink = "<a href='%s/ap-sample.php'>%s</a>" % (basedir1,title)
elif s.pfx == 'PD':
basedir1 = "/scans/awork/homepage"
titlelink = "<a href='%s/pd-sample.php'>%s</a>" % (basedir1,title)
parts.append(" <td width='58%%' style='font-size:12pt;' title='%s,%s,%s pages'>%s</td>" % (s.authors,title1,s.textpages,titlelink))
parts.append("<td class='tdlist'>")
for link in dict_line_links(s):
parts.append(link)
parts.append("</td>")
try:
ans = "\n ".join(parts)
except:
print "ERROR JOINING"
for part in parts:
print "part = ",part
exit(1)
return ans
def section_sort(pfxs,pfxdict):
""" pfxs is a list of pairs (pfx,title)
"""
def sortkey(t):
(pfx,title)=t
return pfxdict[pfx].textdate
return sorted(pfxs,key = sortkey)
def table_headers():
""" returns a string ( <tr><th></th>...</tr>)
compare dict_line
"""
parts=[]
bgcolor="#FFFFCC" #pale yellow
bgcolor="#D3D3D3" #LightGray
style = "background:%s; font-size=12px; font-weight:bold; font-color:black;text-align:left;" % bgcolor
parts.append('<tr style="%s">' % style)
parts.append(' <th>ID</th>')
parts.append(' <th>date</th>')
parts.append(' <th>Dictionary</th>')
parts.append(' <th>Displays and Downloads</th>')
parts.append('</tr>')
return '\n'.join(parts)
def section_lines(pfxs,section_title,pfxdict):
pfxs = section_sort(pfxs,pfxdict)
lines = []
lines.append('\n')
colspan=4
lines.append('<tr style="background:#FFFFCC"><td colspan="%s" style="vertical-align:center;"><h2>%s</h2></td></tr>' % (colspan,section_title))
#add column titles for first one
if section_title.startswith('Sanskrit-English'):
lines.append(table_headers())
for (pfx,title) in pfxs:
lines.append('<tr style="background:#FFFFCC">%s</tr>' %dict_line(pfxdict[pfx],title))
return lines
def san_english(pfxdict):
pfxs = [
("AP90","Apte Practical Sanskrit-English Dictionary"),
("BEN","Benfey Sanskrit-English Dictionary"),
#("BHS","Edgerton Buddhist Hybrid Sanskrit Dictionary"),
("CAE","Cappeller Sanskrit-English Dictionary"),
("GST",u"Goldstücker Sanskrit-English Dictionary"),
("MD","Macdonell Sanskrit-English Dictionary"),
("MW72","Monier-Williams Sanskrit-English Dictionary"),
("MW","Monier-Williams Sanskrit-English Dictionary"),
("SHS","Shabda-Sagara Sanskrit-English Dictionary"),
("WIL","Wilson Sanskrit-English Dictionary"),
("YAT","Yates Sanskrit-English Dictionary"),
("AP","Practical Sanskrit-English Dictionary, revised edition"),
("PD","An Encyclopedic Dictionary of Sanskrit on Historical Principles")
]
section_title='Sanskrit-English Dictionaries'
return section_lines(pfxs,section_title,pfxdict)
def english_san(pfxdict):
pfxs=[
("AE","Apte Student's English-Sanskrit Dictionary"),
("MWE","Monier-Williams English-Sanskrit Dictionary"),
("BOR","Borooah English-Sanskrit Dictionary")
]
section_title='English-Sanskrit Dictionaries'
return section_lines(pfxs,section_title,pfxdict)
def san_french(pfxdict):
pfxs=[
("BUR",u"Burnouf Dictionnaire Sanscrit-Français"),
("STC",u"Stchoupak Dictionnaire Sanscrit-Français")
]
section_title='Sanskrit-French Dictionaries'
return section_lines(pfxs,section_title,pfxdict)
def san_german(pfxdict):
pfxs=[
("PW",u"Böhtlingk Sanskrit-Wörterbuch in kürzerer Fassung"),
("PWG",u"Böhtlingk and Roth Grosses Petersburger Wörterbuch"),
("SCH",u"Schmidt Nachträge zum Sanskrit-Wörterbuch"),
("CCS",u"Cappeller Sanskrit Wörterbuch"),
("GRA",u"Grassman Wörterbuch zum Rig Veda")
]
section_title='Sanskrit-German Dictionaries'
return section_lines(pfxs,section_title,pfxdict)
def san_latin(pfxdict):
pfxs = [
("BOP","Bopp Glossarium Sanscritum")
]
section_title='Sanskrit-Latin Dictionaries'
return section_lines(pfxs,section_title,pfxdict)
def san_san(pfxdict):
pfxs_sandict=[
("SKD",""),
("VCP","")
]
pfxs=pfxs_sandict
#section_title='Sanskrit-Sanskrit Dictionaries and Concordances'
section_title='Sanskrit-Sanskrit Dictionaries'
return section_lines(pfxs,section_title,pfxdict)
def san_special(pfxdict):
pfxs=[
("KRM",""),
("ACC","Aufrecht's Catalogus Catalogorum"),
("BHS","Edgerton Buddhist Hybrid Sanskrit Dictionary"),
("PUI",""),
("VEI",""),
("PE",""),
("MCI",""),
("SNP","Meulenbeld's Sanskrit Names of Plants"),
("PGN",""),
("IEG",""),
("INM","")
]
section_title = 'Specialized Dictionaries'
return section_lines(pfxs,section_title,pfxdict)
def deprecated_line(href,title):
colspan=4
return '<tr style="background:#FFFFCC"><td colspan="%s"><a href="%s">%s</a></td></tr>\n' % (colspan,href,title)
def deprecated(pfxdict):
colspan=4
lines=[]
section_title = '<a id="deprecated">Deprecated Editions</a>'
lines.append('\n')
lines.append('<tr style="background:#FFFFCC"><td colspan="%s"><h2>%s</h2></td></tr>' % (colspan,section_title))
def dl(h,t): # for convenience
return deprecated_line(h,t)
lines.append(dl('/scans/MWScan/2012/web/index.php','Monier-Williams Sanskrit-English Dictionary, 2012/2013 displays'))
lines.append(dl('/monier/indexcaller.php','Monier-Williams Sanskrit-English Dictionary, 2008'))
lines.append(dl('/mwquery/index.html','Monier-Williams Advanced Search, 2008'))
lines.append(dl('/scans/MWScan/tamil/index.html','Sanskrit and Tamil Dictionaries, 2005'))
lines.append(dl('/scans/WILScan/web/index.php','Wilson Sanskrit-English Dictionary, semi-digitized edition, 2008'))
lines.append(dl('/aequery/index.html','Apte English-Sanskrit Dictionary, 2007'))
lines.append(dl('/scans/PWGScan/disp2/index.php','Boehtlingk & Roth Sanskrit-German Dictionary, 2011'))
lines.append(dl('/scans/PWScan/disp2/index.php','Boehtlingk + Schmidt Sanskrit-German Dictionary, 2012'))
return lines
def misc():
colspan=4
lines=[]
section_title = '<a">Miscellany</a>'
lines.append('\n')
lines.append('<tr style="background:#FFFFCC"><td colspan="%s"><h2>%s</h2></td></tr>' % (colspan,section_title))
def dl(h,t): # for convenience
return deprecated_line(h,t)
lines.append(dl('/scans/KALEScan/disp1/index1.php?sfx=png','Kale Higher Sanskrit Grammar, 1894 (Scanned)'))
lines.append(dl('/scans/MWScan/Westergaard/disp/index.php','Westergaard Linguae Sanscritae, 1841 (Scanned)'))
lines.append(dl('/scans/KALEScan/WRScan/disp2/index.php',"Whitney's Roots, 1885 (Scanned)"))
lines.append(dl('/work/fflexphp/web/index.php','MW Inflected forms'))
lines.append(dl('/work/fflexphp/web1/index.php','MW Inflected forms, v2'))
lines.append(dl('/tamildictionaries/index.html','Tamil Lexicon'))
return lines
def dictdiv(pfxdict):
"""The list of dictionaries, and their forms. Return list of string.
"""
ans = []
ans.append('<table width="90%">')
parts = [san_english(pfxdict),english_san(pfxdict),
san_french(pfxdict), san_german(pfxdict),
san_latin(pfxdict), san_san(pfxdict),
san_special(pfxdict),
deprecated(pfxdict),
misc()]
for part in parts:
ans = ans + ['<tr><td>'] + part + ['</td></tr>']
ans.append('</table>')
return ans
def index01_bodylines(pfxdict):
# use '+' on lists to concatenate them
lines=headerdiv() + purpos1ediv() + dictdiv(pfxdict)
return lines
def index01(filein,fileout):
pfxdict = parse_indexdirs(filein)
#print pfxdict["PW"].toStringdbg().encode('utf-8')
lines = [] # array of lines to be output
#head = """<?xml version="1.0" encoding="UTF-8"?>
# Aug 21, 2015. Change to HTML5
head = """<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>IITS Koeln </title>
<link type="text/css" rel="stylesheet" href="/scans/awork/Cologne.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<style>
a.child3 {background-color: transparent !important;}
</style>
</head>
<body>
"""
tail = u"""
<!--
<hr/>
<h2>Funding</h2>
<p>Die mit * gekennzeichneten Werke sind unter dem
DFG-NEH Project 2010-2013 <br/>
entstanden:
26*/37 digitalisierte Wörterbücher = *198/300 MB
</p>
-->
<hr style="width:89%; margin-left:0px;"/>
<h2>Credits</h2>
<p>The digitizations of works marked with an asterisk (*) were funded by the DFG-NEH Project 2010-2013.</p>
</p>
<p>The markup of the Monier-Williams Sanskrit-English Dictionary is described in detail
<a href='talkMay2008/markingMonier.html'>here</a>.
<br/>
The markup of the various dictionaries was designed and implemented by: </p>
<ul>
<li>
<a href="mailto:[email protected]">Thomas Malten</a> (Cologne University) and <a href="/images/Aurorachana_Staff_2006(1).jpg">assistants</a> in India
</li>
<li>
<a href="//www.sanskritlibrary.org">Peter Scharf</a> (The Sanskrit Library)
</li>
<li>
Malcolm D. Hyman
(Max-Planck-Institut für Wissenschaftsgeschichte, Berlin)
</li>
<li>
Jim Funderburk
</li>
</ul>
<hr style="width:89%; margin-left:0px;"/>
<div id="privacy">
<h2>Data protection</h2>
<p><a href="https://www.portal.uni-koeln.de/impressum.html?L=0">Impressum</a></p>
<p> This site uses cookies to save settings related to dictionary displays.
<br/> We aim to comply with
<a href="https://www.portal.uni-koeln.de/9468.html">Cologne University data protection policies.</a>
</p>
</div>
<hr style="width:89%; margin-left:0px;"/>
<div id="footer">
Jim Funderburk maintains this web site.
<p>Last modified: Nov 23, 2018</p>
</div>
<script type="text/javascript" src="/js/piwik_analytics.js"></script>
</body>
</html>
"""
headlines = string.split(head, '\n\r')
taillines = string.split(tail, '\n\r')
bodylines=index01_bodylines(pfxdict)
for line in headlines:
lines.append(line)
for line in bodylines:
lines.append(line)
for line in taillines:
lines.append(line)
fout = codecs.open(fileout,"w","utf-8")
for line in lines:
fout.write("%s\n" % line)
fout.close()
if __name__ =="__main__":
filein = sys.argv[1]
fileout = sys.argv[2]
index01(filein,fileout)
print "DID YOU CHANGE 'Date last modified'?"