From: Ian Jackson Date: Sun, 17 May 2009 01:12:28 +0000 (+0100) Subject: Merge branch 'ceb' X-Git-Tag: 1.0~49 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=commitdiff_plain;h=b83d2a9134944c69385218acf91122a65d0c6ab8 Merge branch 'ceb' Conflicts: yoweb-scrape --- b83d2a9134944c69385218acf91122a65d0c6ab8 diff --cc yoweb-scrape index 1eeb8a3,5e24e57..517d5e1 --- a/yoweb-scrape +++ b/yoweb-scrape @@@ -649,6 -642,6 +649,7 @@@ class ChatLogTracker return self._vessel def aboard(self): # returns a list of PirateAboard sorted by name ++ if self._v is None: return [] return [ self._v[pn] for pn in sorted(self._v.keys()) if not pn.startswith('#') ] @@@ -706,14 -693,12 +707,14 @@@ def prep_chat_log(args, bu max_myself_age=3600): if len(args) != 1: bu('this action takes only chat log filename') logfn = args[0] - logfn_re = '(?:.*/)?([A-Z][a-z]+)_([a-z]+)_chat-log-\\w+$' + logfn_re = '(?:.*/)?([A-Z][a-z]+)_([a-z]+)_' match = regexp.match(logfn_re, logfn) - if not match: bu('chat log filename is not in default format') + if not match: bu('chat log filename is not in expected format') - (pirate, fetcher.ocean) = match.groups() + (pirate, ocean) = match.groups() + fetcher.default_ocean(ocean) myself = PirateInfo(pirate,max_myself_age) + progress.show_init(pirate, fetcher.ocean) track = ChatLogTracker(myself, logfn) opts.debug -= 1 @@@ -815,11 -739,13 +816,9 @@@ def do_ship_aid(args, bu) s = "%s" % track.myname() vn = track.vessel() -- if vn is None: - s += " not on a vessel?!" - else: - s += " on board the %s at %s\n" % ( - vn, time.strftime("%Y-%m-%d %H:%M:%S")) - print s + " ...?" - time.sleep(1) - continue - - s += " on board the %s at %s\n" % ( - vn, time.strftime("%Y-%m-%d %H:%M:%S")) ++ if vn is None: s += " not on a vessel?!" ++ else: s += " on board the %s" % vn ++ s += " at %s\n" % time.strftime("%Y-%m-%d %H:%M:%S") tbl = StandingsTable() tbl.headings()