Commit Graph

122 Commits

Author SHA1 Message Date
James Lu
95f6b1698e Aka, Alias: replace obsolete LastFM example 2022-07-09 14:15:57 -07:00
Valentin Lorentz
4b892c2b1d all: Update .pot and .po files 2022-02-06 00:14:47 +01:00
Valentin Lorentz
ed9dffdd7f supybot-plugin-doc: Remove extra space + regenerate all READMEs. 2021-12-04 03:19:12 +01:00
Valentin Lorentz
828fff9cc0 supybot-plugin-doc: Add missing newlines + regenerate all READMEs. 2021-12-04 02:50:28 +01:00
Valentin Lorentz
63eb6672ea Revert generic 'The Limnoria Contributors' in copyright notices
This commit reverts db7ef3f025
(though it keeps the year updates)

After discussion with several people, it seems better to mention
copyright owners explicitly. eg. https://reuse.software/faq/#vcs-copyright
explains the issue of using VCSs to track copyright.

As db7ef3f025 only replaced mentions
of my name with 'The Limnoria Contributors', this commit only needs
to undo that + add one person who contributed to setup.py.
2021-10-17 09:57:55 +02:00
Valentin Lorentz
db7ef3f025 all: Add generic 'The Limnoria Contributors' to copyright notices.
No need to bother with details (that are all outdated / out of sync
anyway), just look up the git history.
2021-08-01 21:54:49 +02:00
Valentin Lorentz
fec6959acb all plugins: regenerate READMEs 2021-04-22 00:29:15 +02:00
Valentin Lorentz
82fbfcffa4 all plugins: regenerate READMEs 2021-04-17 20:09:33 +02:00
Valentin Lorentz
cd02444f87 supybot-plugin-doc: Add labels for all command and config variables
So they can be referenced from elsewhere in the doc.
2021-04-06 00:33:07 +02:00
Valentin Lorentz
833af36b08 all plugins: auto-generate READMEs
Starting with this commit, there should be no "original" text
in READMEs.
Instead, the entire text should be in docstrings, and READMEs
should be automatically generated from these docstrings.

Motivation:

* The same help is available both via IRC and in the README
  (although the README can be more detailed, as only the first
  paragraph will be shown on IRC)
* This will allow auto-generating plugin help on docs.limnoria.net
  using the same content as the README, as it's sourced from the
  docstrings

Additionally, this converts all READMEs from Markdown to ReST,
because the documentation already uses ReST, and other docstrings
in the codebase are in ReST for this reason.
2021-04-05 17:42:31 +02:00
Valentin Lorentz
21657f31ee Aka, Alias: Remove mentions of Alias in the Aka documentation, and explain Alias is deprecated 2021-04-05 15:00:02 +02:00
Valentin Lorentz
78dc45e99e Aka: eliminate race condition in tests?
Sometimes (very rarely), the test errors with:

```
======================================================================
FAIL: testHistsearch (Aka.test.AkaChannelTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/supybot/test.py", line 214, in runTest
    originalRunTest()
  File "/usr/lib/python3/dist-packages/supybot/plugins/Aka/test.py", line 67, in testHistsearch
    self.assertResponse('histsearch .*', '@echo foo')
  File "/usr/lib/python3/dist-packages/supybot/test.py", line 402, in assertResponse
    self.assertEqual(m.args[1], expectedResponse,
AssertionError: '@aka add histsearch "last --from [cif true[80 chars]"]]"' != '@echo foo'
- @aka add histsearch "last --from [cif true \"echo test\" \"echo test\"] --regexp [concat \"m/$1/\" [re s/g// \"@2\"]]"
+ @echo foo
 : '@echo foo' != '@aka add histsearch "last --from [cif true \\"echo test\\" \\"echo test\\"] --regexp [concat \\"m/$1/\\" [re s/g// \\"@2\\"]]"'
```

ie. histsearch returns the 'aka add' message instead of the 'echo foo'
one.

My guess is that if they happen too closely to each other, they get
added to the history in the wrong order (how? it's not threaded)

So this commit works around the issue by making the regexp unambiguous.
2021-02-21 00:18:03 +01:00
Valentin Lorentz
e2d72c5a43 Fix msgfmt warnings. 2020-03-26 22:10:28 +01:00
James Lu
4528a847e4 Aka, Google, String: fix more DeprecationWarning in tests (#1328) 2020-01-26 11:31:28 -08:00
James Lu
ff899f5158 Aka, Debug: cleanup imports 2020-01-26 10:42:43 -08:00
Valentin Lorentz
9ab908759a Use importlib instead of imp.
importlib is deprecated.
2020-01-26 12:00:08 +01:00
James Lu
9291fbd4a0 All plugins: set Limnoria contributors as maintainer 2019-11-16 11:41:13 -08:00
James Lu
9eecedee93 Fill in author info for plugins missing it 2019-10-27 12:59:37 -07:00
Johannes Löthberg
27e7d6a9ac Aka: Add web UI (#1373)
* utils.web: Import html escaping functions

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>

* Aka: Add web interface for browsing Akas

Fixes #1226.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>

* httpserver: Actually handle KeyError in unhook

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>

* test: FakeHTTPConnection: Don't decode data in send

BaseHTTPRequestHandler expects to get bytes, so we can't decode the sent
data.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>

* test: HTTPPluginTestCase: Use BytesIO instead of StringIO

BaseHTTPRequestHandler expects bytes, not strings.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>

* test: HTTPPluginTestCase: Rewind wfile to 0 before reading the response

Otherwise the read pointer is at the end of the file.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>

* Aka: Add basic web UI tests

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2019-10-10 17:27:34 +02:00
Valentin Lorentz
696254ff1b Use irc.isChannel instead of ircutils.isChannel when possible.
It's aware of the network's 'chantypes'.
2019-08-04 21:52:40 +02:00
Valentin Lorentz
bee98f6711 Conditional: Do not use noReply() after running the command.
As the command already calls reply() or noReply(), calling noReply()
there had disastrous effects:

* if reply() was called, noReply() erases the argument
* if noReply() was called, calling noReply() a second time erases **the next argument** (because the current argument was already erased).

This was 'caused' by the change of behavior of noReply() in 543edccd41.
2017-10-26 09:55:52 +02:00
Ken Spencer
76c73a57b9 Use a prefix-less help string, don't assume a '@' prefix (#1309)
* Use a prefix-less help string, don't assume a '@' prefix

* Nickometer: follow through on plugin.py with ` -> '
2017-10-25 21:19:37 +02:00
Valentin Lorentz
543edccd41 Properly handle noReplies() in nested commands.
This fix prevents the bot from replying 'Error: I tried to send you an empty message'
when 'utilities ignore' is called from an Aka.
2017-10-21 15:37:43 +02:00
Valentin Lorentz
0998651f61 Aka: Escape the command in help strings, so they can be copy-pasted into @aka add. 2017-10-01 10:40:23 +02:00
Valentin Lorentz
087fa71d63 Aka: Tell in the help message what channel the aka is for. 2017-08-20 19:55:28 +02:00
Valentin Lorentz
5272bf3a86 Aka: Fix combination of required and optional arguments.
Was broken by 7f43727835 (why?)
2017-08-18 18:30:22 +02:00
Marc Chevalier
99b4a7289b Aka: fix backquote matching in readme 2017-05-04 14:58:48 +02:00
Valentin Lorentz
7f43727835 Aka: Proper mitigation of expansion bomb. 2017-04-17 11:05:04 +02:00
Valentin Lorentz
3075a41a3b Aka: Allow more than one in an aka. Closes GH-1283. 2017-04-17 10:53:26 +02:00
Valentin Lorentz
5452d4194a Aka: Remove first elements of the 'args' list in a single pass. 2017-04-17 10:31:43 +02:00
Valentin Lorentz
6936e3d634 Aka: make @list --keys reply on a single line, even if supybot.reply.oneToOne is False. Closes GH-1225. 2016-03-11 21:00:01 +01:00
Valentin Lorentz
6b3766dcd1 Remove trailing spaces. 2016-01-27 14:04:58 +01:00
Sujeet Akula
c44d2007c4 add desc for wizard 2016-01-27 08:03:05 -05:00
Valentin Lorentz
56d4cbec08 Aka: Fix Python 2 compatibility. 2015-12-02 09:06:34 +01:00
Valentin Lorentz
3fde279e50 Aka: Fix database name. 2015-12-02 07:55:00 +00:00
Valentin Lorentz
e1d0c232ea Aka: Deprecate SQLAlchemy backend. 2015-11-07 18:29:43 +01:00
James Lu
dbd12e9c0c Aka: allow filtering 'list' by Aka lock status
This adds two mutually incompatible options to Aka list: --locked and --unlocked
2015-08-29 17:21:17 -07:00
Valentin Lorentz
aa98d987a7 Fix imports to minisix. 2015-08-11 17:01:58 +02:00
Valentin Lorentz
c3a2c800f1 Remove need for 2to3. 2015-08-11 16:50:23 +02:00
Valentin Lorentz
2c380a4c3a Remove fix_xrange. 2015-08-10 19:36:07 +02:00
Valentin Lorentz
be6bc1a734 Remove need for fix_unicode. 2015-08-10 18:52:51 +02:00
Valentin Lorentz
216c5d213f Replace sys.version_info[0] usages with minisix.PY{2,3}. 2015-08-09 00:23:03 +02:00
Valentin Lorentz
be118c3338 Remove use of fix_dict fixer. 2015-08-08 23:08:49 +02:00
James Lu
97228afb7d Aka.search: be case insensitive and handle "not found" errors correctly
Closes #1110.
2015-05-18 14:53:30 -07:00
James Lu
308eea922e Aka: add a 'search' command.
Closes ProgVal/Limnoria#1081.
2015-04-26 22:20:24 -07:00
James Lu
5bd2c5eaaf Aka: add 'aka list --keys'
This allows one to view just the list of Akas without their commands,
similar to the older 'list aka' behavior.
2015-01-14 21:39:31 -05:00
GLolol
c492cb40e1 Aka: add a missing '.' in the error message 2014-12-26 16:21:20 -05:00
GLolol
b76cff73a8 Revert "Aka: update converters to use 'channel' instead of 'somethingWithoutSpaces'"
This reverts commit 231c250b75.
2014-12-26 16:18:39 -05:00
GLolol
4a70a9a79c Merge branch 'testing' into aka-2
Conflicts:
	plugins/Aka/plugin.py
2014-12-26 14:05:32 -05:00
James Lu
231c250b75 Aka: update converters to use 'channel' instead of 'somethingWithoutSpaces' 2014-12-22 19:57:26 -08:00