chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.main.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prettier startup output
[ypp-sc-tools.main.git]
/
yoweb-scrape
diff --git
a/yoweb-scrape
b/yoweb-scrape
index ed9533ef51c513b4628673712880bc9a0b0b1e3c..03607451167a1d831c77f8137ad525e8783388ec 100755
(executable)
--- a/
yoweb-scrape
+++ b/
yoweb-scrape
@@
-884,9
+884,9
@@
def prep_chat_log(args, bu,
if not match: bu('chat log filename is not in expected format')
(pirate, ocean) = match.groups()
fetcher.default_ocean(ocean)
if not match: bu('chat log filename is not in expected format')
(pirate, ocean) = match.groups()
fetcher.default_ocean(ocean)
-
- myself = PirateInfo(pirate,max_myself_age)
+
progress.show_init(pirate, fetcher.ocean)
progress.show_init(pirate, fetcher.ocean)
+ myself = PirateInfo(pirate,max_myself_age)
track = ChatLogTracker(myself, logfn)
opts.debug -= 2
track = ChatLogTracker(myself, logfn)
opts.debug -= 2
@@
-983,30
+983,29
@@
def do_ship_aid(args, bu):
displayer.realstart()
displayer.realstart()
- while True:
- track.catchup()
- now = time.time()
-
- s = "%s" % track.myname()
-
+ def find_vessel():
vn = track.vesselname()
vn = track.vesselname()
- if vn is not None:
- s += " on board the %s" % vn
+ if vn: return (vn, " on board the %s" % vn)
+ vn = track.lastvesselname()
+ if vn: return (vn, " ashore from the %s" % vn)
+ return (None, " not on a vessel")
- if vn is None:
- vn = track.lastvesselname()
- if vn is not None:
- s += " ashore from the %s" % vn
+ displayer.show(track.myname() + find_vessel()[1] + '...')
- if vn is None:
- s += " not on a vessel"
+ while True:
+ track.catchup()
+ now = time.time()
+ (vn, s) = find_vessel()
+ s = track.myname() + s
s += " at %s\n" % time.strftime("%Y-%m-%d %H:%M:%S")
tbl = StandingsTable()
tbl.headings()
s += " at %s\n" % time.strftime("%Y-%m-%d %H:%M:%S")
tbl = StandingsTable()
tbl.headings()
- for pa in track.aboard():
+ aboard = track.aboard(vn)
+
+ for pa in aboard:
pi = pa.pirate_info()
xs = ''
pi = pa.pirate_info()
xs = ''