1 Ian Jackson writes ("Choice of vessel for pillaging"):
2 > What I really want is something that redacts it into a table (ideally,
3 > by trawling the chat log). I don't suppose someone fancies writing
4 > the yoweb screenscraper :-) ?
6 Here it is. You run it like this:
7 ./yoweb-scrape ship-aid ~/yohoho/Aristarchus_midnight_chat-log-iwj
8 It has various other modes - see the usage message.
12 * Tracks boarding and departure of pirates and shows a table
13 of currently-aboard pirates with their relevant puzzle standings in
16 * Shows time and nature their last interaction with you as XO
17 (abandoning stations, being given orders) and where and when their
18 last to-you-visible chat was.
20 * Remembers whether you have ever given the pirate an order to gun
23 * Caches and severely rate-limits fetches from yoweb to avoid
24 overloading the Three Rings servers. In ship-aid mode, will
25 display twirling batons while you wait for data, so that crew
26 on board info remains correct.
28 I know of one key defect:
30 * If you leave and then reboard a vessel, the list of pirates on
31 board may be wrong. This is because the chat log doesn't contain
32 the necessary information. The script assumes that the set of
33 pirates on board doesn't change while you're off the ship (unless
34 you're away for more than an hour, in which case it assumes the
35 ship is empty when you return to it).
37 This means that there needs to be a way to manually add and remove
38 pirates - but there isn't. I think this could probably be added by
39 someone who could be bothered to replace the `sleep 1' in the main
40 loop by something which looked for keyboard input.
42 However it will notice that a pirate is on board if they abandon a
43 duty station (in circumstances where the game reports this in the
44 log, which doesn't seem to be all the time) or you give them a
45 stationing order, and from various other messages that might occur.
47 Other things to mention:
49 * There's nothing really resembling a manual.
51 * It doesn't notice when you yourself disembark. That's because
52 that's not recorded in the chat log.
54 * Many people may find the output rather basic - it's ASCII art - and
55 it's not very customisable.
57 * It spends a while reading the whole of your chat log which can be
58 very long. Perhaps it should be smarter (eg, bisect the log
59 to find `nearly now').
61 * It could have lots more features in general.
63 * The `tabulate details of my whole crew' mode takes a long time
64 to run. This is normal; it's trying to spread the load on yoweb
65 (perhaps excessively so).
67 * I have it in git right now but here is just a copy of the single
68 file which is the script. I'm planning to put my rum calculator
69 and other useful things into the same repo and put it on chiark
70 somewhere. For my reference, this is from tree revision
71 15799130f8d34856b9cefe3c71103564413fa04a
73 * I haven't decided on a final copyright licence. You may treat this
80 Ian Jackson writes ("Re: Choice of vessel for pillaging"):
81 > Ian Jackson writes ("Choice of vessel for pillaging"):
82 > > What I really want is something that redacts it into a table (ideally,
83 > > by trawling the chat log). I don't suppose someone fancies writing
84 > > the yoweb screenscraper :-) ?
86 > Here it is. You run it like this:
87 > ./yoweb-scrape ship-aid ~/yohoho/Aristarchus_midnight_chat-log-iwj
88 > It has various other modes - see the usage message.
92 * Please don't leave it running if you're not in charge. If
93 everyone runs this it will produce precisely the load on the yoweb
94 servers that we want to avoid.
95 * It's Python so it may eat CPU and memory.
96 * You may need to install some python modules of course.
97 * Here's a version which is an attachment rather than asking you
98 to cut-and-paste. That will save on you mangling it and getting
103 yoweb-scrape as a binary blobule, y [Press RETURN to save to a file]