1
0
Fork 0
Commit Graph

941 Commits

Author SHA1 Message Date
nemunaire 3cfbfd96b0 Let main thread manage consumer threads 2015-09-28 11:59:37 +02:00
nemunaire ee1910806c [news] Introduce new module News: it fetchs atom feed from a website and display it 2015-09-28 11:53:55 +02:00
nemunaire a4f4bb799c Extract atom from networking module to core 2015-09-28 11:53:29 +02:00
nemunaire 471feca8fb [networking.atom] use Datetime to store internal dates and can get an ordered list of elements 2015-09-28 11:53:11 +02:00
nemunaire bbf5acafbb [mediawiki] fix OpenSearch: can have empty description 2015-09-25 15:48:09 +02:00
nemunaire 7a1ad6430c [whois] update module
* change intra-bocal URL to fix CertificateError
	* fix 23.tf trombi URL
	* add a catch when trying trombi URL
2015-09-24 11:29:51 +02:00
nemunaire 4cb8b0f1a6 Improve help
On hook declaration, we can now add a help and/or a help_usage argument
	to provide a simple way to the user to be informed.

	For example:

	```python
	@hook("cmd_hook", "news", help_usage={"URL": "Display the latests news from a given URL"})
	def cmd_news(msg):
	    [...]
	```

	will be displayed on !help !news as:

	> Usage for command !news from module news: !news URL: Display the latests news from a given URL

	Or for module commands help:

	```python
	@hook("cmd_hook", "news", help="display latests news")
	def cmd_news(msg):
	    [...]
	```

	will be displayed on !help mymodule (assuming this hook is in the
	module named mymodule) as:

	> Available commands for module news: news: display latests news

	Obviously, both `help` and `help_usage` can be present. If `help_usage`
	doesn't exist, help on usage will display the content of help.
2015-09-24 11:29:51 +02:00
nemunaire 4f7d89a3a1 [ycc] Dusting module, now named tinyurl 2015-09-24 11:29:50 +02:00
nemunaire be776405e3 Dusting URL stacking modules: fixing error when using channel list as response 2015-09-24 11:29:50 +02:00
nemunaire 3c51b1f03b Add assertion on class initialization 2015-09-24 11:29:49 +02:00
nemunaire ecd9457691 Help: display on the right place, not always to private conversation 2015-09-24 11:29:49 +02:00
nemunaire 35ba5c03c9 [more] Allow method chaining 2015-09-24 11:29:49 +02:00
Max 8018369800 Add global tracking hook 2015-09-24 11:29:48 +02:00
nemunaire d74a9067c0 [bonneannee] Command for the nextyear doesn't require argument anymore 2015-09-24 11:29:48 +02:00
nemunaire d5f07ec338 Display a basic error to IM user on uncatched exception 2015-09-24 11:29:47 +02:00
Max e915c4930c Fix #2 ; Add chronopost and colis privé support 2015-09-24 11:29:47 +02:00
nemunaire 760da8ef61 tools.web: don't try to striphtml content that is not str or buffer 2015-09-24 11:29:47 +02:00
nemunaire 9b2bc27374 tools.web: restore Python3.3 behavior: don't check server certificate 2015-09-24 11:29:46 +02:00
nemunaire 8988dd0d41 striphtml: also convert ´ and collapse multiple space, as HTML display do 2015-09-24 11:29:46 +02:00
nemunaire 9fa8902f1a Invalid fd are < 0, not only -1 2015-09-24 11:29:46 +02:00
nemunaire beeb5573e1 Define class variables in __init__ 2015-09-24 11:29:45 +02:00
nemunaire ac3ed0d492 [alias] huge refactoring 2015-09-24 11:29:44 +02:00
nemunaire 9686f36522 Add a function to guess the closest word for a miss input 2015-09-24 11:29:44 +02:00
nemunaire ec9481e65b [networking] Add !title command to display the title of a page 2015-09-24 11:29:43 +02:00
nemunaire e837f9c8e5 Improve formating of size function and test it 2015-09-24 11:29:43 +02:00
nemunaire 969210a723 [networking] Avoid exception when port is not defined on socket error 2015-09-24 11:29:37 +02:00
nemunaire 2b0593a51e Add tool to calculate string distance 2015-09-23 18:06:21 +02:00
nemunaire 6147eef19b [mediawiki] Help user find the article he want to read if it doesn't exist 2015-09-23 10:57:25 +02:00
nemunaire 67cd66b922 [mediawiki] Handle # 2015-09-23 10:57:25 +02:00
Max 710896f711 [suivi] Now using nemubot.tools.web for queries 2015-08-26 12:18:24 +02:00
Max 5b039edb62 Updated tracking module to support colissimo 2015-08-26 12:18:24 +02:00
nemunaire d1c28fc4a3 [networking] New function to get a list of watched URL 2015-08-26 12:18:24 +02:00
nemunaire c27540eb87 web: reduce timeout from 15 to 7 seconds 2015-08-26 12:18:23 +02:00
nemunaire 88a8e0fe59 web: can make POST request 2015-08-26 12:18:23 +02:00
nemunaire 0208a5d552 Allow socket to print messages 2015-08-26 12:18:23 +02:00
nemunaire a00c354287 Add a factory to help connecting to servers 2015-08-26 12:18:22 +02:00
nemunaire d269468287 Let consumer parse the message instead of server 2015-08-26 12:18:22 +02:00
nemunaire a1ac7d480d Split server message parsing from message retrieving 2015-08-26 12:18:22 +02:00
nemunaire 3c15d35fca [alias] Dusting module 2015-08-26 12:18:21 +02:00
nemunaire 4d51bc1fda Dusting modules 2015-08-26 12:18:20 +02:00
nemunaire 4bc8bc3c12 Dusting modules 2015-08-26 12:17:22 +02:00
Max b5e4acdb70 [jsonbot] replacing spaces with %20 in queried url 2015-08-26 12:17:22 +02:00
Max 6e226f0fb3 [nextstop] Updated nextstop with destination option 2015-08-26 12:17:22 +02:00
nemunaire b75c54419f [ddg] Dusting + !safeoff handling 2015-08-26 12:17:21 +02:00
nemunaire 787a5fd3da Web tool raise more IRCException 2015-08-26 12:17:21 +02:00
nemunaire 000c67e45e Can return Response in help_full function 2015-08-26 12:17:21 +02:00
nemunaire ae4a303554 Fix #74 2015-08-26 12:17:21 +02:00
nemunaire 6415e4a697 [networking] Handle ConnectionError exceptions 2015-08-26 12:17:20 +02:00
nemunaire 3b8195b81b [alias] Variable replacement can operate on slice list.
In addition to ${1}, ${2}, ... you can now use slice: ${1:5} or ${1:}.
	The effect is to join arguments with a space character.
2015-08-26 12:17:20 +02:00
Max dc681fdc35 [jsonbot] now taking all cmd args 2015-08-26 12:17:20 +02:00