initial commit
This commit is contained in:
commit
f548894d84
34086
ChronoArr_Srt.txt
Normal file
34086
ChronoArr_Srt.txt
Normal file
File diff suppressed because it is too large
Load Diff
26
gen_html.py
Normal file
26
gen_html.py
Normal 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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user