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 > $@
|
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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,10 @@ for epnum in sys.argv[1:]:
|
||||||
|
|
||||||
for piece in pieces[1:]:
|
for piece in pieces[1:]:
|
||||||
try:
|
try:
|
||||||
timestamp =int(piece[:string.index(piece, ' ')])
|
if ' ' in piece:
|
||||||
|
timestamp = int(piece[:string.index(piece, ' ')])
|
||||||
|
else:
|
||||||
|
timestamp = int(piece)
|
||||||
except:
|
except:
|
||||||
timestamp = 0
|
timestamp = 0
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue