chiark / gitweb /
Ian Jackson [Thu, 30 May 2019 10:13:40 +0000 (11:13 +0100)]
FishPond: Use in all other bots
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 30 May 2019 10:08:23 +0000 (11:08 +0100)]
FishPond: introduce new class and use in Servus-chiark
The configuration class `fish' appears in every bot, but it also
contains initial values of state variables used by the implementation.
Move those into their own class, and make it a base class of
Servus-chiark's pond. Since we are duck typing, it is OK to not yet
update the other bots.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 29 May 2019 14:19:03 +0000 (15:19 +0100)]
blame: Print the filename with blame #last
In principle we could have got this from "git blame" but (1) that
makes parsing this more annoying and (2) by rights this should come
from the fish cfg so that it can be a display name at some point.
The main effect is to print something like:
13:41 <Servus> Modified flirts 2011-05-31: new fish from Alice
rather than:
13:41 <Servus> Modified 2011-05-31: new fish from Alice
I have not taken the trouble to touch the three open-coded special
cases for blame #trouts etc. I thought that was beyond the call of
duty. In those cases it will print:
13:41 <Servus> Modified fish? 2011-05-31: new fish from Alice
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 29 May 2019 14:18:18 +0000 (15:18 +0100)]
blame: Put the filename in the loadblame result
We are going to use this to say what kind of fish it was, in
~blame #last.
We also need to change the two places where this is destructured.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 29 May 2019 14:11:27 +0000 (15:11 +0100)]
blame #last: Blame the right thing
Previously this would search all the blame databases. This is wrong,
it should search the one corresponding to the last fish. Now that we
have last_cfg, and the db info is in the cfg, we can do that.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 29 May 2019 14:05:56 +0000 (15:05 +0100)]
blame: Move blame db information into the cfg
These should never have been separate.
We abolish the ad-hoc tbdb, fbdbk etc. variables. Instead, we put
this all in the cfg. It is OK to extend the cfg since the code does
not destructure it but instead always indexes it. So bot instances
without blame will not mind.
blameq needs to fish it out again for the benefit of the open-coded
conditions on "#trouts" etc. I'm not fixing that right now.
The deleted lines like this
tbdb,tbdbk=loadblame("trouts")
have different variable names than the inserted lines like this
tdb,tdbk = cfgs[0][7]
because, unaccountably, the global variable names are different to
the local variables inside blameq.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 29 May 2019 13:55:06 +0000 (14:55 +0100)]
fish: Pass cfgs to blameq
This open-coding of three separate things, with blameq having magic
knowledge of which one is which, is completely wrong. blameq should
take a list. The various Xdb Xdbk should in the cfgs too.
A step towards this is for blameq to get the cfgs.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 29 May 2019 13:50:03 +0000 (14:50 +0100)]
fish: track last_cfg too
No-one uses this yet. So no functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Matthew Vernon [Tue, 14 May 2019 13:25:48 +0000 (14:25 +0100)]
new flirt from Emperor (apropos remarks made about a cyclist)
Matthew Vernon [Wed, 3 Apr 2019 13:54:14 +0000 (14:54 +0100)]
new trout from jtn ( https://theoatmeal.com/comics/idiocy )
Matthew Vernon [Wed, 27 Feb 2019 14:32:45 +0000 (14:32 +0000)]
new trouts from rejs
Matthew Vernon [Wed, 27 Feb 2019 14:32:19 +0000 (14:32 +0000)]
new flirts from rejs
Matthew Vernon [Tue, 5 Feb 2019 09:20:56 +0000 (09:20 +0000)]
new trout from jtn
Matthew Vernon [Thu, 31 Jan 2019 15:37:52 +0000 (15:37 +0000)]
new trout from jtn
Matthew Vernon [Thu, 17 Jan 2019 18:01:50 +0000 (18:01 +0000)]
Output the date of first mention, not the current date
...this is in the code path where the URL was mentioned on a previous
date, so we should output the date of first mention (self.localfirst)
not the current date (n).
Matthew Vernon [Thu, 10 Jan 2019 19:29:12 +0000 (19:29 +0000)]
new trout from chelgrian (no, not the album by Bride)
Matthew Vernon [Tue, 11 Dec 2018 16:34:31 +0000 (16:34 +0000)]
strip more garbage out of twitter urls (esp the ?s=[:digits:]) tracking code - thanks cjwatson
Matthew Vernon [Wed, 28 Nov 2018 20:36:22 +0000 (20:36 +0000)]
Add blame-filtering
This simply works on the md5 of the offending commit message, and
replaces it with new text.
blame_filter.py is a simple dictionary of md5: replacement pairs; it
is not committed itself (and is ignored by git)
Matthew Vernon [Mon, 10 Dec 2018 16:30:35 +0000 (16:30 +0000)]
0-pad times (so 13:03 rather than 13:3)
Matthew Vernon [Fri, 23 Nov 2018 15:04:26 +0000 (15:04 +0000)]
New trout from Diziet (apropos what 🔥 looks like)
Matthew Vernon [Wed, 14 Nov 2018 11:17:29 +0000 (11:17 +0000)]
Correct tyop in flirt from rjk
Matthew Vernon [Fri, 9 Nov 2018 17:12:14 +0000 (17:12 +0000)]
new flirt from Diziet
Matthew Vernon [Thu, 8 Nov 2018 19:00:48 +0000 (19:00 +0000)]
Adjust url-observation, per chiark.irc discussion
Servus now describes URLs without adjective, as these were felt to be
discouraging. Further, it won't mention a URL within 5 minutes of its
previous mention. Time is now given as a timestamp, rather than the
"about X minutes/hours ago"
Matthew Vernon [Wed, 7 Nov 2018 19:35:54 +0000 (19:35 +0000)]
Don't remark on URLs that are repeated after a short period
If a URL has been mentioned in the recent past, then it'll be
obviously visible in-channel, and it was probably a mistake
(e.g. mentioning a URL you meant to ~twit), so no need to comment on
it.
Ian Jackson [Thu, 25 Oct 2018 16:26:14 +0000 (17:26 +0100)]
url observations: Rename `urlcomplaints' variable to `urlinfos'
These are no longer complaints.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Conflicts:
commands.py
Matthew Vernon [Wed, 7 Nov 2018 19:17:56 +0000 (19:17 +0000)]
url observations: make the "complaints" less complainy
Based on Ian Jackson's re-wording, but tweaked a little to suit my
taste better.
Ian Jackson [Thu, 25 Oct 2018 16:04:44 +0000 (17:04 +0100)]
main: Drop daft try/expect
This serves only to obfuscate. The result is that, for example, if
you don't have the twitter module, you get this error message:
acrobat: configuration module Servus-chiark.py not found
which is a lie.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Matthew Vernon [Wed, 10 Oct 2018 16:16:29 +0000 (17:16 +0100)]
Remove trout in light of objections
Matthew Vernon [Mon, 24 Sep 2018 15:37:30 +0000 (16:37 +0100)]
new trout from rjk
Matthew Vernon [Tue, 28 Aug 2018 12:45:30 +0000 (13:45 +0100)]
new flirt from Emperor (SatW board game)
Matthew Vernon [Tue, 21 Aug 2018 15:47:07 +0000 (16:47 +0100)]
correct typo (missing : )
Jonathan David Amery [Tue, 14 Aug 2018 20:01:06 +0000 (21:01 +0100)]
Add a limit to tweet expansion recursion.
Signed-off-by: Matthew Vernon <matthewv@chiark.greenend.org.uk>
Jonathan David Amery [Tue, 14 Aug 2018 11:05:10 +0000 (12:05 +0100)]
Add exemplar servus_twapi_oauth.txt file.
Signed-off-by: Matthew Vernon <matthewv@chiark.greenend.org.uk>
Jonathan David Amery [Tue, 14 Aug 2018 11:05:09 +0000 (12:05 +0100)]
With the new embedded tweet code there's no reason not to expand embedded tweets inside embedded tweets.
Signed-off-by: Matthew Vernon <matthewv@chiark.greenend.org.uk>
Jonathan David Amery [Tue, 14 Aug 2018 11:05:08 +0000 (12:05 +0100)]
Fix for embedded tweet support:
Problem:
* Overly long embedded tweets cause Acrobat to go over the server's
line length limit which causes the message to be silently discarded
because of a lack of error handling in automsg.
Solutions:
* Make each tweet in an embedded tweet chain a seperate message
- this requires getTweet to now return a list
* Did not fix automsg at all
Signed-off-by: Matthew Vernon <matthewv@chiark.greenend.org.uk>
Matthew Vernon [Mon, 11 Jun 2018 12:29:53 +0000 (13:29 +0100)]
new flirts from rejs
Matthew Vernon [Mon, 11 Jun 2018 12:29:31 +0000 (13:29 +0100)]
new trouts from rejs
Matthew Vernon [Sat, 28 Apr 2018 21:20:34 +0000 (22:20 +0100)]
New trouts from rjk
Matthew Vernon [Tue, 10 Apr 2018 15:16:47 +0000 (16:16 +0100)]
new trout from Emperor (based on previous)
Matthew Vernon [Tue, 10 Apr 2018 15:16:28 +0000 (16:16 +0100)]
new trout from rjk
Matthew Vernon [Thu, 1 Mar 2018 15:47:12 +0000 (15:47 +0000)]
new trouts from rjk
Matthew Vernon [Wed, 28 Feb 2018 14:57:55 +0000 (14:57 +0000)]
new flirt from jtn
Matthew Vernon [Fri, 16 Feb 2018 16:14:06 +0000 (16:14 +0000)]
new trout from jtn
Matthew Vernon [Thu, 8 Feb 2018 20:23:17 +0000 (20:23 +0000)]
new flirts from rejs
Matthew Vernon [Thu, 8 Feb 2018 20:23:00 +0000 (20:23 +0000)]
new trouts from rejs
Matthew Vernon [Sun, 14 Jan 2018 17:10:44 +0000 (17:10 +0000)]
New trouts from jtn
Matthew Vernon [Mon, 8 Jan 2018 11:25:39 +0000 (11:25 +0000)]
New trout from adam
Matthew Vernon [Mon, 1 Jan 2018 17:48:25 +0000 (17:48 +0000)]
New trout from Midwinter
Matthew Vernon [Thu, 30 Nov 2017 18:04:52 +0000 (18:04 +0000)]
New flirt from jtn (after fivemack)
Matthew Vernon [Thu, 26 Oct 2017 10:06:47 +0000 (11:06 +0100)]
new trout from rjk
Matthew Vernon [Thu, 12 Oct 2017 07:08:28 +0000 (08:08 +0100)]
new trout from jtn [https://en.wikipedia.org/wiki/Paperclip_maximizer]
Matthew Vernon [Fri, 15 Sep 2017 10:04:19 +0000 (11:04 +0100)]
new trout from rjk
Matthew Vernon [Wed, 6 Sep 2017 08:26:08 +0000 (09:26 +0100)]
new trout from adam (bbc.co.uk/news/uk-england-bristol-
41167296)
Matthew Vernon [Tue, 5 Sep 2017 08:36:16 +0000 (09:36 +0100)]
new trout from jtn
Matthew Vernon [Mon, 4 Sep 2017 15:36:58 +0000 (16:36 +0100)]
new trouts from rejs
Matthew Vernon [Thu, 27 Jul 2017 16:18:58 +0000 (17:18 +0100)]
new trout from rjk
Matthew Vernon [Wed, 21 Jun 2017 15:35:51 +0000 (16:35 +0100)]
New trout from Emperor
Matthew Vernon [Wed, 31 May 2017 15:11:36 +0000 (16:11 +0100)]
new trout from Diziet
Matthew Vernon [Wed, 8 Mar 2017 16:15:59 +0000 (16:15 +0000)]
New trout from rjk
Matthew Vernon [Mon, 16 Jan 2017 16:12:57 +0000 (16:12 +0000)]
new trout from rjk (ref Alt-J song)
Matthew Vernon [Sun, 15 Jan 2017 22:37:53 +0000 (22:37 +0000)]
new flirt from fivemack
Matthew Vernon [Tue, 10 Jan 2017 22:35:21 +0000 (22:35 +0000)]
new flirt from rejs
Matthew Vernon [Tue, 10 Jan 2017 22:35:01 +0000 (22:35 +0000)]
new trouts from rejs
Matthew Vernon [Wed, 4 Jan 2017 17:06:24 +0000 (17:06 +0000)]
New trout from Emperor (improved by ceb)
Matthew Vernon [Tue, 20 Dec 2016 15:20:33 +0000 (15:20 +0000)]
New trout from rjk
Matthew Vernon [Thu, 17 Nov 2016 16:19:03 +0000 (16:19 +0000)]
Updates for newer version of python-twitter (new twitter API)
These are changes to support what will eventually be version 3.2 of
python-twitter; for the time being we are running of a git clone of
the devel branch, which supports the newer twitter API (so e.g. tweets
quoting other tweets work properly); it doesn't look like an upstream
release of 3.2 is going to happen any time soon.
Author: Adam Bernard
Signed-off-by: Matthew Vernon
Matthew Vernon [Mon, 14 Nov 2016 16:41:38 +0000 (16:41 +0000)]
new flirt from rjk
Matthew Vernon [Sat, 5 Nov 2016 12:58:08 +0000 (12:58 +0000)]
new flirt from rjk [ref Better off Dead]
Matthew Vernon [Wed, 2 Nov 2016 12:10:52 +0000 (12:10 +0000)]
New slash from Diziet
Matthew Vernon [Mon, 17 Oct 2016 16:21:10 +0000 (17:21 +0100)]
new slash from rejs
Matthew Vernon [Mon, 17 Oct 2016 16:20:51 +0000 (17:20 +0100)]
New flirt from rejs
Matthew Vernon [Mon, 17 Oct 2016 16:20:31 +0000 (17:20 +0100)]
New trouts from rejs
Matthew Vernon [Mon, 26 Sep 2016 12:07:39 +0000 (13:07 +0100)]
new trout from adam
Matthew Vernon [Wed, 14 Sep 2016 10:37:16 +0000 (11:37 +0100)]
Patch from adam to allow - in video URLs
Matthew Vernon [Thu, 8 Sep 2016 20:28:33 +0000 (21:28 +0100)]
new trout from rjk
Matthew Vernon [Fri, 19 Aug 2016 11:43:45 +0000 (12:43 +0100)]
New trouts from Emperor (pp climbing)
Matthew Vernon [Tue, 2 Aug 2016 10:59:34 +0000 (11:59 +0100)]
new trout from jtn [bbc.co.uk/news/uk-politics-
36160135]
Matthew Vernon [Mon, 18 Jul 2016 22:40:47 +0000 (23:40 +0100)]
new flirt from rejs
Matthew Vernon [Mon, 18 Jul 2016 22:40:25 +0000 (23:40 +0100)]
new trouts from rejs
Matthew Vernon [Thu, 14 Jul 2016 18:35:12 +0000 (19:35 +0100)]
New trouts from Emperor
Matthew Vernon [Thu, 14 Jul 2016 18:34:17 +0000 (19:34 +0100)]
New trout from rjk
Matthew Vernon [Tue, 12 Jul 2016 21:06:08 +0000 (22:06 +0100)]
Patch from adam to expand quoted tweet (1 level only)
Matthew Vernon [Mon, 11 Jul 2016 07:23:14 +0000 (08:23 +0100)]
new trout from rjk
Matthew Vernon [Tue, 5 Jul 2016 17:13:56 +0000 (18:13 +0100)]
new trout from rjk
Matthew Vernon [Mon, 4 Jul 2016 12:56:36 +0000 (13:56 +0100)]
new flirt from fivemack
Matthew Vernon [Mon, 4 Jul 2016 12:55:25 +0000 (13:55 +0100)]
new flirt from ceb
Matthew Vernon [Thu, 16 Jun 2016 14:49:11 +0000 (15:49 +0100)]
Restore correct handling of multi-line tweets
Matthew Vernon [Tue, 14 Jun 2016 18:43:52 +0000 (19:43 +0100)]
Improve UTF-8 handling, multiple media links, url expanders
This patch has 3 improvements:
* understands links to multiple media items, spits out URLs for each
picture &c.
* understands a range of URL-shorteners, expands them
* improves UTF-8 handling
signed-off-by: adamb
Matthew Vernon [Fri, 20 May 2016 13:29:57 +0000 (14:29 +0100)]
Expand video URLs
The previous patch gave you the photo link for the video, not the
video itself; this fixes that (and handles non-ascii better again,
though it's a bit of a hack having to UTF-8 it twice).
patch by adam
Matthew Vernon [Thu, 19 May 2016 20:22:26 +0000 (21:22 +0100)]
Expand URLs and unescape &<> in tweets
This expands the URLs in tweets (instead of the t.co shorturls that
you get currently).
Patch by adamb
Matthew Vernon [Thu, 21 Apr 2016 15:05:50 +0000 (16:05 +0100)]
new flirt from rjk
Matthew Vernon [Wed, 20 Apr 2016 06:40:48 +0000 (07:40 +0100)]
new slashes from rejs
Matthew Vernon [Wed, 20 Apr 2016 06:40:29 +0000 (07:40 +0100)]
new flirts from rejs
Matthew Vernon [Wed, 20 Apr 2016 06:39:45 +0000 (07:39 +0100)]
new trouts from rejs
Matthew Vernon [Fri, 15 Apr 2016 11:33:54 +0000 (12:33 +0100)]
new trout from jtn [cf hard stare]
Matthew Vernon [Thu, 24 Mar 2016 15:36:40 +0000 (15:36 +0000)]
new trouts from rjk
Matthew Vernon [Sat, 19 Mar 2016 16:29:10 +0000 (16:29 +0000)]
new trout from rjk [ref: Truth Coming Out of Her Well to Shame Mankind]
Matthew Vernon [Wed, 24 Feb 2016 16:31:24 +0000 (16:31 +0000)]
new trout from rjk
Matthew Vernon [Sat, 13 Feb 2016 15:20:05 +0000 (15:20 +0000)]
new trout from rjk
Matthew Vernon [Fri, 15 Jan 2016 13:59:43 +0000 (13:59 +0000)]
new trout from rjk