chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.web-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ChatLogTracker.chatline::disembark takes vessel and timestamp arguments
[ypp-sc-tools.web-live.git]
/
yoweb-scrape
diff --git
a/yoweb-scrape
b/yoweb-scrape
index 93ce3177b59d5370da7b90544b9bd21a98ec5990..0ceeaa13c35226ee898c64011b9295845de2b520 100755
(executable)
--- a/
yoweb-scrape
+++ b/
yoweb-scrape
@@
-523,9
+523,10
@@
class ChatLogTracker:
def ob1(did): ob_x(m.group(1), did); return d(did)
def oba(did): return ob1('%s %s' % (did, m.group(2)))
def ob1(did): ob_x(m.group(1), did); return d(did)
def oba(did): return ob1('%s %s' % (did, m.group(2)))
- def disembark(pirate, event):
- ob_x(pirate, 'leaving '+event)
- del self._v[pirate]
+ def disembark(v, timestamp, pirate, event):
+ self._onboard_event(
+ v, timestamp, pirate, 'leaving '+event)
+ del v[pirate]
del self._pl[pirate]
m = rm('Going aboard the (\\S.*\\S)\\.\\.\\.$')
del self._pl[pirate]
m = rm('Going aboard the (\\S.*\\S)\\.\\.\\.$')
@@
-579,7
+580,8
@@
class ChatLogTracker:
if cmdr == self._myself.name: how = 'manual: /%s' % cmd
else: how = '/%s %s' % (cmd,cmdr)
if cmd == 'a': each = ob_x
if cmdr == self._myself.name: how = 'manual: /%s' % cmd
else: how = '/%s %s' % (cmd,cmdr)
if cmd == 'a': each = ob_x
- else: each = disembark
+ else: each = lambda who,how: disembark(
+ self._v, timestamp, who, how)
if vn is not None:
vn = vn.title()
if vn is not None:
vn = vn.title()
@@
-626,7
+628,8
@@
class ChatLogTracker:
m = rm('(\\w+) has left the vessel\.')
if m:
m = rm('(\\w+) has left the vessel\.')
if m:
- disembark(m.group(1), 'disembarked')
+ pirate = m.group(1)
+ disembark(self._v, timestamp, pirate, 'disembarked')
return d('disembarked')
return d('not matched')
return d('disembarked')
return d('not matched')