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 > $@ sed -e 's/ BGSTART.*BGEND//' -e '/BGLINK/d' < lurker.html > $@
subdirs: subdirs:
@(cd guide; make) @(cd guide; sh genall.csh)
@(cd comic; make) @(cd comic; sh genall.csh)
@(cd synops; make) @(cd synops; sh genall.csh)
@(cd novels; make) @(cd novels; sh genall.csh)
tvlist: $(B5DIR)/b5tvlist.txt tvlist: $(B5DIR)/b5tvlist.txt

View File

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

View File

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