Commit graph

62 commits

Author SHA1 Message Date
jesopo
da1f1fce08 add !notitle to bypass auto-title 2019-11-20 17:59:26 +00:00
jesopo
5d01db8514 move all datetime-related code from utils/__init__ to utils.datetime 2019-11-15 13:59:09 +00:00
jesopo
a962fcf434 dont print full stacktrace when getting a url's title fails 2019-11-14 13:22:49 +00:00
jesopo
07c7afcf2e use utils.parse.line_normalise in title.py 2019-10-31 10:27:42 +00:00
jesopo
10b5b19cff don't try to parse empty <title>s 2019-10-31 10:27:00 +00:00
jesopo
930794c414 don't assume we're in a channel when we're not (title.py) 2019-10-31 10:26:00 +00:00
jesopo
07a3ba5222 strip '"<>() from <title> words when checking for title/url difference 2019-10-28 12:25:23 +00:00
jesopo
6b8323b6f5 also split auto-title words on / 2019-10-09 12:58:25 +01:00
jesopo
8e4c0f4963 ignore one-char "words" in <title> if they're not a "letter" 2019-10-04 11:20:35 +01:00
jesopo
8f927afdc9 don't auto-title when a URL contains most of it's <title> 2019-10-04 10:52:07 +01:00
jesopo
f306213cb8 'is_localhost()' -> 'host_permitted()' 2019-09-30 15:15:20 +01:00
jesopo
3d3b990ff6 only show auto-title when response code is 200 2019-09-20 15:56:14 +01:00
jesopo
ad45848abb Revert "switch to using IRCBot.http_client() in title.py"
This reverts commit 748008cf36.
2019-09-11 18:08:37 +01:00
jesopo
748008cf36 switch to using IRCBot.http_client() in title.py 2019-09-11 17:54:55 +01:00
jesopo
4a97c9eb0d refactor utils.http.requests to support a Request object 2019-09-11 17:44:07 +01:00
jesopo
03c7e8f066 return matching string from buffer.find() as most uses were redundantly regexing 2019-08-13 13:48:03 +01:00
jesopo
73fd3f37ce Allow url shorteners to be specified per-channel 2019-08-05 10:48:16 +01:00
jesopo
1aab5c4c64 Actually use sanitised url when getting <title> 2019-07-02 14:36:18 +01:00
jesopo
df5f29f943 use utils.http.url_sanitise() in title.py 2019-07-02 14:16:16 +01:00
jesopo
ae9d099a41 Refactor set/channelset/serverset/botset in to 'utils.Setting' objects 2019-06-28 23:16:05 +01:00
jesopo
c5785a2d14 implement @utils.kwarg() magic, use it for command.regex hooks 2019-06-26 14:37:41 +01:00
jesopo
19755778b6 event doesn't exist in _get_title 2019-06-25 18:04:36 +01:00
jesopo
12181bfec6 Add system to have multiple url shorteners and chose which to use 2019-06-25 17:53:00 +01:00
jesopo
98e1202c78 Allow command.regex hooks to opt-in to being triggered from a /me
closes #68
2019-06-16 18:40:25 +01:00
jesopo
268c5adb3c Add depends-on hashflags to relevant modules 2019-05-25 21:40:06 +01:00
jesopo
cf29c37112 Add usage examples for all settings 2019-05-23 10:28:14 +01:00
jesopo
9a5ba753d0 event.eat() in command.regex for !title 2019-05-21 09:54:51 +01:00
jesopo
e4bc57b3cc Actually check auto-title setting 2019-05-19 10:44:48 +01:00
jesopo
4e0e63e7f8 Hand over regex-based-command responsibilities to commands module 2019-05-18 18:35:47 +01:00
jesopo
920c1d2cd8 Log URL when we fail to get a <title> 2019-05-07 14:44:29 +01:00
jesopo
0114d35d4c Add a mechanism to ignore specific commands for a whole network 2019-05-06 17:08:56 +01:00
jesopo
347253249e Add a setting to automatically shorten URLs when their title is retrieved 2019-04-28 00:35:41 +01:00
jesopo
437418d006 Use is-ignored export in title.py to ignore users for auto-title 2019-04-27 14:55:48 +01:00
jesopo
7643a962bd Refuse to get the title for any url that points locall 2019-04-25 15:58:58 +01:00
jesopo
dffee4d223 Move REGEX_URL out of isgd.py and title.py in to utils.http 2019-04-24 15:46:54 +01:00
jesopo
df42f1d9c5 Store full non-hashed auto-title url in setting value 2019-04-24 15:07:02 +01:00
jesopo
71eb640fbd Add ability to track (and show) who first send a specific link that was
auto-titled
2019-04-24 14:48:15 +01:00
jesopo
b1e40e8d4c Move HTTPWrongContentTypeException catch above Exception catch 2019-03-01 23:29:07 +00:00
jesopo
4467ba8ab6 specifically handle HTTPWrongContentTypeException in title.py 2019-02-28 23:30:09 +00:00
jesopo
b9e71ec833 title is already a parsed string from _get_title() (title.py) 2019-02-09 13:38:09 +00:00
jesopo
8bbfd1d1c3 Add empty params arg to log call (title.py) 2019-02-09 13:37:21 +00:00
jesopo
3fae5c52cd Forgot to import EventManager (title.py, youtube.py) 2019-02-09 10:57:32 +00:00
jesopo
31367b2b5d Eat youtube URLs on LOW priority, switch auto-title to MONITOR priority 2019-02-09 10:56:06 +00:00
jesopo
9f6aa93082 Actually return title text, not html Tag object (title.py) 2019-02-09 10:38:44 +00:00
jesopo
2ac5a53131 Add a setting to get the title from URLs automatically (title.py) 2019-02-09 10:35:37 +00:00
jesopo
381e0ae336 Error log failure to get title of a url (title.py) 2019-01-21 14:39:20 +00:00
jesopo
793d234a0b 'utils.http.get_url' -> 'utils.http.request', return a Response object from
utils.http.request
2018-12-11 22:26:38 +00:00
jesopo
87fc3cda55 Catch exceptions in modules/title.py 2018-10-19 10:31:45 +01:00
jesopo
773d11f6cb Change all instances of stdout.write+return to raise utils.EventError in
modules
2018-10-16 15:09:58 +01:00
jesopo
376825ea96 Mark command hooks that are aliases ('g' vs 'google') 2018-10-10 10:42:41 +01:00