Don't require space at end of timestamp line in gen.py

This commit is contained in:
Steven Grimm 2019-05-26 19:33:05 +00:00
parent ae24e5a753
commit 9791c5899d
3 changed files with 10 additions and 7 deletions

View File

@ -9,10 +9,10 @@ lurker-nobg.html: lurker.html
sed -e 's/ BGSTART.*BGEND//' -e '/BGLINK/d' < lurker.html > $@
subdirs:
@(cd guide; make)
@(cd comic; make)
@(cd synops; make)
@(cd novels; make)
@(cd guide; sh genall.csh)
@(cd comic; sh genall.csh)
@(cd synops; sh genall.csh)
@(cd novels; sh genall.csh)
tvlist: $(B5DIR)/b5tvlist.txt

View File

@ -1,6 +1,6 @@
#!/usr/bin/python3
import sys,string,time,os
import sys,string,time,os,re
sys.path.append('../internal')
import otros
sys.path.insert(0, '.')
@ -89,7 +89,7 @@ for epnum in args[1:]:
for piece in pieces[1:]:
try:
timestamp =string.atoi(piece[:string.index(piece, ' ')])
timestamp = int(re.split('\\s', piece)[0])
except:
timestamp = 0

View File

@ -90,7 +90,10 @@ for epnum in sys.argv[1:]:
for piece in pieces[1:]:
try:
if ' ' in piece:
timestamp = int(piece[:string.index(piece, ' ')])
else:
timestamp = int(piece)
except:
timestamp = 0