Don't require space at end of timestamp line in gen.py
This commit is contained in:
parent
ae24e5a753
commit
9791c5899d
8
Makefile
8
Makefile
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,10 @@ for epnum in sys.argv[1:]:
|
|||
|
||||
for piece in pieces[1:]:
|
||||
try:
|
||||
timestamp =int(piece[:string.index(piece, ' ')])
|
||||
if ' ' in piece:
|
||||
timestamp = int(piece[:string.index(piece, ' ')])
|
||||
else:
|
||||
timestamp = int(piece)
|
||||
except:
|
||||
timestamp = 0
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue