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. This is as follows: send or receive a message on the crew
39 officer chat, or send (not receive!) a private message, of the
41 /a <pirate>... /d <pirate>...
42 /a <ship>: <pirate>... /d <ship>: <pirate>...
43 <pirate> and <ship> can be in any case and will be converted to
44 the proper mixed-case form automatically. <ship>, if it is not
45 provided, will be assumed to be the one you're on (so officers
46 shouldn't send these runes unless only one ship is out). If <ship>
47 is supplied it may be the full ship name, or only the second word.
52 /a smart sunfish: copperkatie
53 These are actually sent by typing in the chat box things like:
56 since other formulations interpret the scraper command as a YPP
57 chat command. This is deliberate and makes it harder to invoke by
60 These messages can also be sent by some other officer in your crew
61 while you are off the vessel (although currently a bug means that
62 if you board some _other_ vessel then these messages for the vessel
63 you come back to may not be properly recorded).
65 The program will notice that a pirate is on board if you give them
66 a stationing order or they abandon a duty station (in circumstances
67 where the game reports this in the log, which doesn't seem to be
68 all the time), and from many of the other messages that occur.
70 Other things to mention:
72 * There's nothing really resembling a manual.
74 * It doesn't notice when you yourself disembark. That's because
75 that's not recorded in the chat log.
77 * Many people may find the output rather basic - it's ASCII art - and
78 it's not very customisable.
80 * It spends a while reading the whole of your chat log which can be
81 very long. Perhaps it should be smarter (eg, bisect the log
82 to find `nearly now').
84 * It could have lots more features in general.
86 * The `tabulate details of my whole crew' mode takes a long time
87 to run. This is normal; it's trying to spread the load on yoweb
88 (perhaps excessively so).
90 * I have it in git right now but here is just a copy of the single
91 file which is the script. I'm planning to put my rum calculator
92 and other useful things into the same repo and put it on chiark
93 somewhere. For my reference, this is from tree revision
94 15799130f8d34856b9cefe3c71103564413fa04a
96 * I haven't decided on a final copyright licence. You may treat this
99 * The program will become confused when the clocks change,
100 particularly when they go backwards. This is due to the chat log
101 containing timestamps in local time without a timezone. If this
102 bothers you, make everything be in UTC. If it does get confused,
103 you can fix it by logging off and logging on again (perhaps waiting
104 until after the duplicated hour has passed) as that writes a new
105 date record to the log and starts a new series of timestamps.
107 * You have to enable the chat log for the ship-aid mode.
113 Ian Jackson writes ("Re: Choice of vessel for pillaging"):
114 > Ian Jackson writes ("Choice of vessel for pillaging"):
115 > > What I really want is something that redacts it into a table (ideally,
116 > > by trawling the chat log). I don't suppose someone fancies writing
117 > > the yoweb screenscraper :-) ?
119 > Here it is. You run it like this:
120 > ./yoweb-scrape ship-aid ~/yohoho/Aristarchus_midnight_chat-log-iwj
121 > It has various other modes - see the usage message.
123 A couple more things:
125 * Please don't leave it running if you're not in charge. If
126 everyone runs this it will produce precisely the load on the yoweb
127 servers that we want to avoid.
128 * It's Python so it may eat CPU and memory.
129 * You may need to install some python modules of course.
130 * Here's a version which is an attachment rather than asking you
131 to cut-and-paste. That will save on you mangling it and getting
136 yoweb-scrape as a binary blobule, y [Press RETURN to save to a file]