initial commit

This commit is contained in:
Sanj 2011-09-03 19:58:41 +05:30
commit f548894d84
2 changed files with 34112 additions and 0 deletions

34086
ChronoArr_Srt.txt Normal file

File diff suppressed because it is too large Load Diff

26
gen_html.py Normal file
View File

@ -0,0 +1,26 @@
from ox.text import findRe
def do():
f = open("ChronoArr_Srt.txt")
txt = f.read()
tapes = txt.split("***")
indexHtml = ''
counter = 1
for t in tapes:
fullTxt = t.strip()
titleReg = r'Title: (.*?)\n'
outfile = "tapes/%d.html" % (counter,)
title = findRe(fullTxt, titleReg)
print title
indexHtml += "<a target='_blank' href='%s'>%s</a><br />\n" % (outfile, title,)
out = open(outfile, "w")
out.write("<pre>%s</pre>" % (fullTxt,))
out.close()
counter += 1
indexFile = open("index.html", "w")
indexFile.write(indexHtml)
indexFile.close()
f.close()