From 3a24d883539309544b13825ce3ae6726416d6939 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 28 Jun 2016 00:10:52 +0100 Subject: Make plugins import from the absolute poezio package. --- plugins/admin.py | 4 ++-- plugins/alias.py | 4 ++-- plugins/amsg.py | 4 ++-- plugins/autocorrect.py | 2 +- plugins/bob.py | 4 ++-- plugins/capslock.py | 4 ++-- plugins/change_title.py | 2 +- plugins/close_all.py | 6 +++--- plugins/csi.py | 4 ++-- plugins/cyber.py | 2 +- plugins/day_change.py | 6 +++--- plugins/display_corrections.py | 6 +++--- plugins/double.py | 2 +- plugins/exec.py | 4 ++-- plugins/figlet.py | 2 +- plugins/iq_show.py | 2 +- plugins/irc.py | 8 ++++---- plugins/link.py | 8 ++++---- plugins/marquee.py | 8 ++++---- plugins/mirror.py | 4 ++-- plugins/mpd_client.py | 6 +++--- plugins/otr.py | 16 ++++++++-------- plugins/pacokick.py | 4 ++-- plugins/ping.py | 12 ++++++------ plugins/pipe_cmd.py | 2 +- plugins/pointpoint.py | 2 +- plugins/quote.py | 8 ++++---- plugins/rainbow.py | 4 ++-- plugins/random_nick.py | 2 +- plugins/regex_admin.py | 4 ++-- plugins/reminder.py | 6 +++--- plugins/reorder.py | 6 +++--- plugins/replace.py | 4 ++-- plugins/replace_word.py | 2 +- plugins/revstr.py | 4 ++-- plugins/screen_detach.py | 2 +- plugins/send_delayed.py | 10 +++++----- plugins/shuffle.py | 4 ++-- plugins/simple_notify.py | 8 ++++---- plugins/spaces.py | 4 ++-- plugins/spam.py | 2 +- plugins/status.py | 2 +- plugins/stoi.py | 6 +++--- plugins/tell.py | 6 +++--- plugins/test.py | 4 ++-- plugins/time_marker.py | 2 +- plugins/uptime.py | 4 ++-- 47 files changed, 111 insertions(+), 111 deletions(-) (limited to 'plugins') diff --git a/plugins/admin.py b/plugins/admin.py index c0b3e3da..01672014 100644 --- a/plugins/admin.py +++ b/plugins/admin.py @@ -51,8 +51,8 @@ For affiliations """ -from plugin import BasePlugin -from tabs import MucTab +from poezio.plugin import BasePlugin +from poezio.tabs import MucTab class Plugin(BasePlugin): """ diff --git a/plugins/alias.py b/plugins/alias.py index 3f476b64..839fa3d8 100644 --- a/plugins/alias.py +++ b/plugins/alias.py @@ -64,8 +64,8 @@ Example of the syntax: """ -from plugin import BasePlugin -from common import shell_split +from poezio.plugin import BasePlugin +from poezio.common import shell_split class Plugin(BasePlugin): diff --git a/plugins/amsg.py b/plugins/amsg.py index 01758db0..eea6a0c3 100644 --- a/plugins/amsg.py +++ b/plugins/amsg.py @@ -16,8 +16,8 @@ Command """ -from plugin import BasePlugin -from tabs import MucTab +from poezio.plugin import BasePlugin +from poezio.tabs import MucTab class Plugin(BasePlugin): def init(self): diff --git a/plugins/autocorrect.py b/plugins/autocorrect.py index a482d47f..09e6bf44 100644 --- a/plugins/autocorrect.py +++ b/plugins/autocorrect.py @@ -45,7 +45,7 @@ This variant is useful if you don’t want to care about regular expressions """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin import re allowed_separators = '/#!:;' diff --git a/plugins/bob.py b/plugins/bob.py index cce02b03..b2a6441e 100644 --- a/plugins/bob.py +++ b/plugins/bob.py @@ -22,8 +22,8 @@ Configuration options The time during which the file should stay in cache on the receiving side. """ -from plugin import BasePlugin -import tabs +from poezio.plugin import BasePlugin +from poezio import tabs from pathlib import Path from glob import glob diff --git a/plugins/capslock.py b/plugins/capslock.py index 87200ade..c315fcfa 100644 --- a/plugins/capslock.py +++ b/plugins/capslock.py @@ -1,8 +1,8 @@ """ Once loaded, everything you will send will be IN CAPITAL LETTERS. """ -from plugin import BasePlugin -import xhtml +from poezio.plugin import BasePlugin +from poezio import xhtml class Plugin(BasePlugin): def init(self): diff --git a/plugins/change_title.py b/plugins/change_title.py index 07759bc9..92fcb5c3 100644 --- a/plugins/change_title.py +++ b/plugins/change_title.py @@ -2,7 +2,7 @@ This plugin will set the title of your terminal to the name of the current tab. """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin import sys diff --git a/plugins/close_all.py b/plugins/close_all.py index 1b98213e..6d31c05f 100644 --- a/plugins/close_all.py +++ b/plugins/close_all.py @@ -11,9 +11,9 @@ Commands Close all tabs except the roster and MUC tabs. """ -from plugin import BasePlugin -import tabs -from decorators import command_args_parser +from poezio.plugin import BasePlugin +from poezio import tabs +from poezio.decorators import command_args_parser class Plugin(BasePlugin): diff --git a/plugins/csi.py b/plugins/csi.py index 5fe41666..efc8e4ab 100644 --- a/plugins/csi.py +++ b/plugins/csi.py @@ -20,8 +20,8 @@ Commands .. _CSI: https://xmpp.org/extensions/xep-0352.html """ -from plugin import BasePlugin -import tabs +from poezio.plugin import BasePlugin +from poezio import tabs class Plugin(BasePlugin): def init(self): diff --git a/plugins/cyber.py b/plugins/cyber.py index 67d6cdc7..cb6e0371 100644 --- a/plugins/cyber.py +++ b/plugins/cyber.py @@ -17,7 +17,7 @@ Configuration options The percentage of the time the plugin will activate (randomly). 100 for every message, <= 0 for never. """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin from random import choice, randint import re diff --git a/plugins/day_change.py b/plugins/day_change.py index 6e0c3e1f..2bd56358 100644 --- a/plugins/day_change.py +++ b/plugins/day_change.py @@ -5,10 +5,10 @@ date has changed. """ from gettext import gettext as _ -from plugin import BasePlugin +from poezio.plugin import BasePlugin import datetime -import tabs -import timed_events +from poezio import tabs +from poezio import timed_events class Plugin(BasePlugin): def init(self): diff --git a/plugins/display_corrections.py b/plugins/display_corrections.py index 5169cf18..8ed75e8b 100644 --- a/plugins/display_corrections.py +++ b/plugins/display_corrections.py @@ -22,9 +22,9 @@ Usage """ -from plugin import BasePlugin -from common import shell_split -import tabs +from poezio.plugin import BasePlugin +from poezio.common import shell_split +from poezio import tabs class Plugin(BasePlugin): def init(self): diff --git a/plugins/double.py b/plugins/double.py index 7a9efd80..4f6a3401 100644 --- a/plugins/double.py +++ b/plugins/double.py @@ -1,7 +1,7 @@ """ Double the first word of any message you send in a :ref:`muctab`, making you appear retarded. """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin class Plugin(BasePlugin): def init(self): diff --git a/plugins/exec.py b/plugins/exec.py index 845bfb25..9217bc8a 100644 --- a/plugins/exec.py +++ b/plugins/exec.py @@ -35,8 +35,8 @@ Usage """ -from plugin import BasePlugin -import common +from poezio.plugin import BasePlugin +from poezio import common import subprocess class Plugin(BasePlugin): diff --git a/plugins/figlet.py b/plugins/figlet.py index a7e69172..6e82381b 100644 --- a/plugins/figlet.py +++ b/plugins/figlet.py @@ -11,7 +11,7 @@ Say something in a Chat tab. .. note:: Can create fun things when used with :ref:`The rainbow plugin `. """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin import subprocess class Plugin(BasePlugin): diff --git a/plugins/iq_show.py b/plugins/iq_show.py index 387878f4..7e77a897 100644 --- a/plugins/iq_show.py +++ b/plugins/iq_show.py @@ -2,7 +2,7 @@ Show the exchanged IQs (useful for debugging). """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin from slixmpp.xmlstream.matcher import StanzaPath from slixmpp.xmlstream.handler import Callback diff --git a/plugins/irc.py b/plugins/irc.py index 9a67ffe4..56ce5c9c 100644 --- a/plugins/irc.py +++ b/plugins/irc.py @@ -129,10 +129,10 @@ Example configuration """ -from plugin import BasePlugin -from decorators import command_args_parser -import common -import tabs +from poezio.plugin import BasePlugin +from poezio.decorators import command_args_parser +from poezio import common +from poezio import tabs class Plugin(BasePlugin): diff --git a/plugins/link.py b/plugins/link.py index bca592a1..2c34232c 100644 --- a/plugins/link.py +++ b/plugins/link.py @@ -82,10 +82,10 @@ Options import platform import re -from plugin import BasePlugin -from xhtml import clean_text -import common -import tabs +from poezio.plugin import BasePlugin +from poezio.xhtml import clean_text +from poezio import common +from poezio import tabs url_pattern = re.compile(r'\b(http[s]?://(?:\S+))\b', re.I|re.U) app_mapping = { diff --git a/plugins/marquee.py b/plugins/marquee.py index 78bcc4c9..6abaa344 100644 --- a/plugins/marquee.py +++ b/plugins/marquee.py @@ -34,10 +34,10 @@ Configuration """ -from plugin import BasePlugin -import tabs -import xhtml -from decorators import command_args_parser +from poezio.plugin import BasePlugin +from poezio import tabs +from poezio import xhtml +from poezio.decorators import command_args_parser def move(text, step, spacing): new_text = text + (" " * spacing) diff --git a/plugins/mirror.py b/plugins/mirror.py index e7c475a2..b410422f 100644 --- a/plugins/mirror.py +++ b/plugins/mirror.py @@ -10,8 +10,8 @@ Command **Usage:** ``/mirror`` """ -from plugin import BasePlugin -import tabs +from poezio.plugin import BasePlugin +from poezio import tabs class Plugin(BasePlugin): def init(self): diff --git a/plugins/mpd_client.py b/plugins/mpd_client.py index 2cb0799e..82e94ad1 100644 --- a/plugins/mpd_client.py +++ b/plugins/mpd_client.py @@ -47,10 +47,10 @@ Usage """ -from plugin import BasePlugin -from common import shell_split +from poezio.plugin import BasePlugin +from poezio.common import shell_split from os.path import basename as base -import tabs +from poezio import tabs import mpd class Plugin(BasePlugin): diff --git a/plugins/otr.py b/plugins/otr.py index 72c80093..562bc197 100644 --- a/plugins/otr.py +++ b/plugins/otr.py @@ -186,14 +186,14 @@ import curses from potr.context import NotEncryptedError, UnencryptedMessage, ErrorReceived, NotOTRMessage,\ STATE_ENCRYPTED, STATE_PLAINTEXT, STATE_FINISHED, Context, Account, crypt -import common -import xhtml -from common import safeJID -from config import config -from plugin import BasePlugin -from tabs import ConversationTab, DynamicConversationTab, PrivateTab -from theming import get_theme, dump_tuple -from decorators import command_args_parser +from poezio import common +from poezio import xhtml +from poezio.common import safeJID +from poezio.config import config +from poezio.plugin import BasePlugin +from poezio.tabs import ConversationTab, DynamicConversationTab, PrivateTab +from poezio.theming import get_theme, dump_tuple +from poezio.decorators import command_args_parser OTR_DIR = os.path.join(os.getenv('XDG_DATA_HOME') or '~/.local/share', 'poezio', 'otr') diff --git a/plugins/pacokick.py b/plugins/pacokick.py index 923e759b..bf6bd844 100644 --- a/plugins/pacokick.py +++ b/plugins/pacokick.py @@ -13,9 +13,9 @@ Usage """ from random import choice -from tabs import MucTab +from poezio.tabs import MucTab -from plugin import BasePlugin +from poezio.plugin import BasePlugin class Plugin(BasePlugin): def init(self): diff --git a/plugins/ping.py b/plugins/ping.py index fd3d467c..066ad1f6 100644 --- a/plugins/ping.py +++ b/plugins/ping.py @@ -22,12 +22,12 @@ Command the current interlocutor. """ -from decorators import command_args_parser -from plugin import BasePlugin -from roster import roster -from common import safeJID -from contact import Contact, Resource -import tabs +from poezio.decorators import command_args_parser +from poezio.plugin import BasePlugin +from poezio.roster import roster +from poezio.common import safeJID +from poezio.contact import Contact, Resource +from poezio import tabs import time diff --git a/plugins/pipe_cmd.py b/plugins/pipe_cmd.py index 29404e0f..186df216 100644 --- a/plugins/pipe_cmd.py +++ b/plugins/pipe_cmd.py @@ -19,7 +19,7 @@ Configuration """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin import os import stat import logging diff --git a/plugins/pointpoint.py b/plugins/pointpoint.py index 190dc835..88daae5f 100644 --- a/plugins/pointpoint.py +++ b/plugins/pointpoint.py @@ -33,7 +33,7 @@ Command """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin from random import randrange class Plugin(BasePlugin): diff --git a/plugins/quote.py b/plugins/quote.py index ab503dc1..ba7f4ea3 100644 --- a/plugins/quote.py +++ b/plugins/quote.py @@ -44,10 +44,10 @@ Options time of the message. """ -from plugin import BasePlugin -from xhtml import clean_text -import common -import tabs +from poezio.plugin import BasePlugin +from poezio.xhtml import clean_text +from poezio import common +from poezio import tabs import logging log = logging.getLogger(__name__) diff --git a/plugins/rainbow.py b/plugins/rainbow.py index 0ad5b6dd..a71087a1 100644 --- a/plugins/rainbow.py +++ b/plugins/rainbow.py @@ -12,8 +12,8 @@ Usage .. note:: Can create fun things when used with :ref:`The figlet plugin `. """ -from plugin import BasePlugin -import xhtml +from poezio.plugin import BasePlugin +from poezio import xhtml import random possible_colors = list(range(256)) diff --git a/plugins/random_nick.py b/plugins/random_nick.py index 2c4a2f5b..2c2852dc 100644 --- a/plugins/random_nick.py +++ b/plugins/random_nick.py @@ -11,7 +11,7 @@ automatically be changed to something random, for example: :: """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin from random import choice class Plugin(BasePlugin): diff --git a/plugins/regex_admin.py b/plugins/regex_admin.py index dcc9cebd..b5ca3581 100644 --- a/plugins/regex_admin.py +++ b/plugins/regex_admin.py @@ -26,8 +26,8 @@ Those commands take a regular expression (as defined in the """ -from plugin import BasePlugin -from tabs import MucTab +from poezio.plugin import BasePlugin +from poezio.tabs import MucTab import re diff --git a/plugins/reminder.py b/plugins/reminder.py index 59337189..a5ab1f00 100644 --- a/plugins/reminder.py +++ b/plugins/reminder.py @@ -47,10 +47,10 @@ Will remind you to get up every 1 hour 23 minutes. """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin import curses -import common -import timed_events +from poezio import common +from poezio import timed_events class Plugin(BasePlugin): diff --git a/plugins/reorder.py b/plugins/reorder.py index f1799c12..ab504a47 100644 --- a/plugins/reorder.py +++ b/plugins/reorder.py @@ -54,9 +54,9 @@ And finally, the ``[tab name]`` must be: - For a type ``dynamic``, the bare JID of the contact - For a type ``static``, the full JID of the contact """ -from plugin import BasePlugin -import tabs -from decorators import command_args_parser +from poezio.plugin import BasePlugin +from poezio import tabs +from poezio.decorators import command_args_parser mapping = { 'muc': tabs.MucTab, diff --git a/plugins/replace.py b/plugins/replace.py index 21f2c9af..1949bd6a 100644 --- a/plugins/replace.py +++ b/plugins/replace.py @@ -53,8 +53,8 @@ For more convenience, you can read your nice words from a file, do whatever you want in that function, as long as it returns a string. """ -from plugin import BasePlugin -import tabs +from poezio.plugin import BasePlugin +from poezio import tabs import datetime import random import re diff --git a/plugins/replace_word.py b/plugins/replace_word.py index 2c20a309..ce66dff4 100644 --- a/plugins/replace_word.py +++ b/plugins/replace_word.py @@ -16,7 +16,7 @@ Just use the word in a message. It will be replaced automatically. """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin import re class Plugin(BasePlugin): diff --git a/plugins/revstr.py b/plugins/revstr.py index 53838257..0fa93bb1 100644 --- a/plugins/revstr.py +++ b/plugins/revstr.py @@ -2,8 +2,8 @@ Reverse everything you say (``Je proteste énergiquement`` will become ``tnemeuqigrené etsetorp eJ``) """ -from plugin import BasePlugin -import xhtml +from poezio.plugin import BasePlugin +from poezio import xhtml class Plugin(BasePlugin): def init(self): diff --git a/plugins/screen_detach.py b/plugins/screen_detach.py index e6c02a88..8a00d90f 100644 --- a/plugins/screen_detach.py +++ b/plugins/screen_detach.py @@ -26,7 +26,7 @@ Configuration options .. _client state indication: https://xmpp.org/extensions/xep-0352.html """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin import os import stat import pyinotify diff --git a/plugins/send_delayed.py b/plugins/send_delayed.py index cf35f69c..8c536ea8 100644 --- a/plugins/send_delayed.py +++ b/plugins/send_delayed.py @@ -18,11 +18,11 @@ This plugin adds a command to the chat tabs. """ -from plugin import BasePlugin -from decorators import command_args_parser -import tabs -import common -import timed_events +from poezio.plugin import BasePlugin +from poezio.decorators import command_args_parser +from poezio import tabs +from poezio import common +from poezio import timed_events class Plugin(BasePlugin): diff --git a/plugins/shuffle.py b/plugins/shuffle.py index 3a961bae..1c5cfeb5 100644 --- a/plugins/shuffle.py +++ b/plugins/shuffle.py @@ -2,9 +2,9 @@ Shuffle the words in every message you send in a :ref:`muctab` (may/should confuse the reader). """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin from random import shuffle -import xhtml +from poezio import xhtml class Plugin(BasePlugin): def init(self): diff --git a/plugins/simple_notify.py b/plugins/simple_notify.py index bc2ba8f6..9f35c437 100644 --- a/plugins/simple_notify.py +++ b/plugins/simple_notify.py @@ -84,11 +84,11 @@ Options defined """ -from plugin import BasePlugin -from xhtml import get_body_from_message_stanza -from timed_events import DelayedEvent +from poezio.plugin import BasePlugin +from poezio.xhtml import get_body_from_message_stanza +from poezio.timed_events import DelayedEvent import shlex -import common +from poezio import common class Plugin(BasePlugin): diff --git a/plugins/spaces.py b/plugins/spaces.py index dc6197ee..b0730b62 100644 --- a/plugins/spaces.py +++ b/plugins/spaces.py @@ -2,8 +2,8 @@ Insert a space between each character, in messages that you send, making them horrible to read. """ -from plugin import BasePlugin -import xhtml +from poezio.plugin import BasePlugin +from poezio import xhtml class Plugin(BasePlugin): def init(self): diff --git a/plugins/spam.py b/plugins/spam.py index 9caf9eca..ee1e57cd 100644 --- a/plugins/spam.py +++ b/plugins/spam.py @@ -11,7 +11,7 @@ Configuration """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin class Plugin(BasePlugin): def init(self): diff --git a/plugins/status.py b/plugins/status.py index 5bf21702..b14e5cab 100644 --- a/plugins/status.py +++ b/plugins/status.py @@ -25,7 +25,7 @@ Aliases Set your status to ``xa`` """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin class Plugin(BasePlugin): """ diff --git a/plugins/stoi.py b/plugins/stoi.py index f0b863fe..f3881879 100644 --- a/plugins/stoi.py +++ b/plugins/stoi.py @@ -17,10 +17,10 @@ You only have to load the plugin: **Usage:** ``/stoi`` """ -from plugin import BasePlugin -import tabs +from poezio.plugin import BasePlugin +from poezio import tabs import string -import xhtml +from poezio import xhtml import random char_we_dont_want = string.punctuation+' ’„“”…«»' diff --git a/plugins/tell.py b/plugins/tell.py index 76c9d2f0..2b3eb0ce 100644 --- a/plugins/tell.py +++ b/plugins/tell.py @@ -19,9 +19,9 @@ This plugin defines two new commands for MUC tabs: :term:`/tell` and :term:`/unt Cancel all scheduled messages to *nick*. """ -from plugin import BasePlugin -from decorators import command_args_parser -import tabs +from poezio.plugin import BasePlugin +from poezio.decorators import command_args_parser +from poezio import tabs class Plugin(BasePlugin): def init(self): diff --git a/plugins/test.py b/plugins/test.py index db798684..a518984f 100644 --- a/plugins/test.py +++ b/plugins/test.py @@ -1,5 +1,5 @@ -from plugin import BasePlugin -import tabs +from poezio.plugin import BasePlugin +from poezio import tabs class Plugin(BasePlugin): def init(self): diff --git a/plugins/time_marker.py b/plugins/time_marker.py index 9ef27ee6..f215d2b3 100644 --- a/plugins/time_marker.py +++ b/plugins/time_marker.py @@ -29,7 +29,7 @@ Messages like “2 hours, 25 minutes passed…” are automatically displayed in """ -from plugin import BasePlugin +from poezio.plugin import BasePlugin from datetime import datetime, timedelta class Plugin(BasePlugin): diff --git a/plugins/uptime.py b/plugins/uptime.py index a36274e6..0c471e1a 100644 --- a/plugins/uptime.py +++ b/plugins/uptime.py @@ -11,8 +11,8 @@ Command Retrieve the uptime of the server of ``jid``. """ -from plugin import BasePlugin -from common import parse_secs_to_str, safeJID +from poezio.plugin import BasePlugin +from poezio.common import parse_secs_to_str, safeJID from slixmpp.xmlstream import ET class Plugin(BasePlugin): -- cgit v1.2.3