From 752af56774ff1a50ca68f3c3505d1d376cf773db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Wed, 4 Sep 2019 16:23:59 +0200 Subject: [PATCH] {assets/tools,lib{canvas,gui,rtl,tools}}/*.py: update copyright legends. assets/text/ImgurApiKey.py.template: updated from assets/text/MiRCARTImgurApiKey.py.template. librtl/IrcClient.py: minor cleanup. --- ...ey.py.template => ImgurApiKey.py.template} | 6 ++-- assets/tools/IrcMiRCARTBot.py | 2 +- assets/tools/MiRCARTCanonicalise.py | 2 +- assets/tools/MiRCARTReduce.py | 2 +- assets/tools/MiRCARTToAnsi.py | 2 +- assets/tools/MiRCARTToPngFile.py | 2 +- libcanvas/Canvas.py | 2 +- libcanvas/CanvasBackend.py | 2 +- libcanvas/CanvasExportStore.py | 2 +- libcanvas/CanvasImportStore.py | 2 +- libcanvas/CanvasJournal.py | 2 +- libcanvas/Colours.py | 2 +- libgui/GuiCanvasInterface.py | 2 +- libgui/GuiCanvasInterfaceAbout.py | 2 +- libgui/GuiFrame.py | 2 +- libgui/GuiGeneralFrame.py | 2 +- librtl/IrcClient.py | 33 +++++++++---------- libtools/Tool.py | 2 +- libtools/ToolCircle.py | 2 +- libtools/ToolFill.py | 2 +- libtools/ToolLine.py | 2 +- libtools/ToolRect.py | 2 +- libtools/ToolSelect.py | 2 +- libtools/ToolSelectClone.py | 2 +- libtools/ToolSelectMove.py | 2 +- libtools/ToolText.py | 2 +- 26 files changed, 42 insertions(+), 45 deletions(-) rename assets/text/{MiRCARTImgurApiKey.py.template => ImgurApiKey.py.template} (53%) diff --git a/assets/text/MiRCARTImgurApiKey.py.template b/assets/text/ImgurApiKey.py.template similarity index 53% rename from assets/text/MiRCARTImgurApiKey.py.template rename to assets/text/ImgurApiKey.py.template index 5c98c4d..4036061 100644 --- a/assets/text/MiRCARTImgurApiKey.py.template +++ b/assets/text/ImgurApiKey.py.template @@ -1,11 +1,11 @@ #!/usr/bin/env python3 # -# MiRCARTImgurApiKey.py -- melp? -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# ImgurApiKey.py -- XXX +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # This project is licensed under the terms of the MIT licence. # -class MiRCARTImgurApiKey(object): +class ImgurApiKey(object): imgurApiKey = None # vim:expandtab foldmethod=marker sw=4 ts=4 tw=120 diff --git a/assets/tools/IrcMiRCARTBot.py b/assets/tools/IrcMiRCARTBot.py index ec8ee85..7e3e4c9 100755 --- a/assets/tools/IrcMiRCARTBot.py +++ b/assets/tools/IrcMiRCARTBot.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # IrcMiRCARTBot.py -- IRC<->MiRC2png bot (for EFnet #MiRCART) -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # This project is licensed under the terms of the MIT licence. # diff --git a/assets/tools/MiRCARTCanonicalise.py b/assets/tools/MiRCARTCanonicalise.py index 87673f3..1e417e2 100755 --- a/assets/tools/MiRCARTCanonicalise.py +++ b/assets/tools/MiRCARTCanonicalise.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # MiRCARTCanonicalise.py -- canonicalise mIRC art {from,to} file (for munki) -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # This project is licensed under the terms of the MIT licence. # diff --git a/assets/tools/MiRCARTReduce.py b/assets/tools/MiRCARTReduce.py index 65a1694..2637be8 100755 --- a/assets/tools/MiRCARTReduce.py +++ b/assets/tools/MiRCARTReduce.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # MiRCARTReduce.py -- efficiently encode mIRC art {from,to} file -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # This project is licensed under the terms of the MIT licence. # diff --git a/assets/tools/MiRCARTToAnsi.py b/assets/tools/MiRCARTToAnsi.py index f73c484..33ae046 100755 --- a/assets/tools/MiRCARTToAnsi.py +++ b/assets/tools/MiRCARTToAnsi.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # MiRCARTToAnsi.py -- ToAnsi mIRC art {from,to} file (for munki) -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # This project is licensed under the terms of the MIT licence. # diff --git a/assets/tools/MiRCARTToPngFile.py b/assets/tools/MiRCARTToPngFile.py index 896a29c..ea035dd 100755 --- a/assets/tools/MiRCARTToPngFile.py +++ b/assets/tools/MiRCARTToPngFile.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # MiRCARTToPngFile.py -- convert ASCII w/ mIRC control codes to monospaced PNG (for EFnet #MiRCART) -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # This project is licensed under the terms of the MIT licence. # diff --git a/libcanvas/Canvas.py b/libcanvas/Canvas.py index 3b212f6..53bcc46 100644 --- a/libcanvas/Canvas.py +++ b/libcanvas/Canvas.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # Canvas.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # from CanvasBackend import CanvasBackend diff --git a/libcanvas/CanvasBackend.py b/libcanvas/CanvasBackend.py index cf2ef97..ed0255c 100644 --- a/libcanvas/CanvasBackend.py +++ b/libcanvas/CanvasBackend.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # CanvasBackend.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # from Colours import Colours diff --git a/libcanvas/CanvasExportStore.py b/libcanvas/CanvasExportStore.py index f153bdd..0632d6f 100644 --- a/libcanvas/CanvasExportStore.py +++ b/libcanvas/CanvasExportStore.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # CanvasExportStore.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # import io, os, tempfile diff --git a/libcanvas/CanvasImportStore.py b/libcanvas/CanvasImportStore.py index 12058b7..92c04f2 100644 --- a/libcanvas/CanvasImportStore.py +++ b/libcanvas/CanvasImportStore.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # CanvasImportStore.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # This project is licensed under the terms of the MIT licence. # diff --git a/libcanvas/CanvasJournal.py b/libcanvas/CanvasJournal.py index 6122303..65163fc 100644 --- a/libcanvas/CanvasJournal.py +++ b/libcanvas/CanvasJournal.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # CanvasJournal.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # class CanvasJournal(): diff --git a/libcanvas/Colours.py b/libcanvas/Colours.py index c1f2ff9..6f13eab 100644 --- a/libcanvas/Colours.py +++ b/libcanvas/Colours.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # Colours.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # # diff --git a/libgui/GuiCanvasInterface.py b/libgui/GuiCanvasInterface.py index ec932dc..873eca1 100644 --- a/libgui/GuiCanvasInterface.py +++ b/libgui/GuiCanvasInterface.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # GuiCanvasInterface.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # from ToolCircle import ToolCircle diff --git a/libgui/GuiCanvasInterfaceAbout.py b/libgui/GuiCanvasInterfaceAbout.py index dfad725..76eb65e 100644 --- a/libgui/GuiCanvasInterfaceAbout.py +++ b/libgui/GuiCanvasInterfaceAbout.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # GuiCanvasInterfaceAbout.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # from glob import glob diff --git a/libgui/GuiFrame.py b/libgui/GuiFrame.py index 3cf98fc..b66cfba 100644 --- a/libgui/GuiFrame.py +++ b/libgui/GuiFrame.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # GuiFrame.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # from Canvas import Canvas, haveUrllib diff --git a/libgui/GuiGeneralFrame.py b/libgui/GuiGeneralFrame.py index fb6dd92..163ad95 100644 --- a/libgui/GuiGeneralFrame.py +++ b/libgui/GuiGeneralFrame.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # GuiGeneralFrame.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # import os, sys, wx diff --git a/librtl/IrcClient.py b/librtl/IrcClient.py index f746054..6761f51 100644 --- a/librtl/IrcClient.py +++ b/librtl/IrcClient.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -# mirc2png -- convert ASCII w/ mIRC control codes to monospaced PNG (for EFnet #MiRCART) -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# IrcClient.py -- XXX +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # This project is licensed under the terms of the MIT licence. # @@ -10,10 +10,6 @@ import select, socket, time class IrcClient: """Non-blocking abstraction over the IRC protocol""" - serverHname = serverPort = None; - clientNick = clientIdent = clientGecos = None; - clientSocket = clientSocketFile = None; - clientNextTimeout = None; clientQueue = None; # {{{ close(self): Close connection to server def close(self): @@ -46,6 +42,16 @@ class IrcClient: self.queue("USER", self.clientIdent, "0", "0", self.clientGecos) return True # }}} + # {{{ queue(self, *args): Parse and queue single line to server from list + def queue(self, *args): + msg = ""; argNumMax = len(args); + for argNum in range(argNumMax): + if argNum == (argNumMax - 1): + msg += ":" + args[argNum] + else: + msg += args[argNum] + " " + self.clientQueue.append((msg + "\r\n").encode()) + # }}} # {{{ readline(self, timeout=30): Read and parse single line from server into canonicalised list, honouring timers def readline(self, timeout=30): if self.clientNextTimeout: @@ -80,16 +86,6 @@ class IrcClient: msg = [""] + msg[0:] return msg # }}} - # {{{ queue(self, *args): Parse and queue single line to server from list - def queue(self, *args): - msg = ""; argNumMax = len(args); - for argNum in range(argNumMax): - if argNum == (argNumMax - 1): - msg += ":" + args[argNum] - else: - msg += args[argNum] + " " - self.clientQueue.append((msg + "\r\n").encode()) - # }}} # {{{ unqueue(self, timeout=15): Send all queued lines to server, honouring timers def unqueue(self, timeout=15): while self.clientQueue: @@ -120,7 +116,8 @@ class IrcClient: # # __init__(self, serverHname, serverPort, clientNick, clientIdent, clientGecos): initialisation method def __init__(self, serverHname, serverPort, clientNick, clientIdent, clientGecos): - self.serverHname = serverHname; self.serverPort = serverPort; - self.clientNick = clientNick; self.clientIdent = clientIdent; self.clientGecos = clientGecos; + self.clientGecos, self.clientIdent, self.clientNick = clientGecos, clientIdent, clientNick + self.clientNextTimeout, self.clientQueue, self.clientSocket, self.clientSocketFile = None, None, None, None + self.serverHname, self.serverPort = serverHname, serverPort # vim:expandtab foldmethod=marker sw=4 ts=4 tw=120 diff --git a/libtools/Tool.py b/libtools/Tool.py index 3718794..1847880 100644 --- a/libtools/Tool.py +++ b/libtools/Tool.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # Tool.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # class Tool(): diff --git a/libtools/ToolCircle.py b/libtools/ToolCircle.py index 89c6023..f72eb68 100644 --- a/libtools/ToolCircle.py +++ b/libtools/ToolCircle.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # ToolCircle.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # from Tool import Tool diff --git a/libtools/ToolFill.py b/libtools/ToolFill.py index 31a3552..368cda3 100644 --- a/libtools/ToolFill.py +++ b/libtools/ToolFill.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # ToolFill.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # from Tool import Tool diff --git a/libtools/ToolLine.py b/libtools/ToolLine.py index 6a6d93f..6b0bfc5 100644 --- a/libtools/ToolLine.py +++ b/libtools/ToolLine.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # ToolLine.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # from Tool import Tool diff --git a/libtools/ToolRect.py b/libtools/ToolRect.py index 99bb207..106f8bf 100644 --- a/libtools/ToolRect.py +++ b/libtools/ToolRect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # ToolRect.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # from Tool import Tool diff --git a/libtools/ToolSelect.py b/libtools/ToolSelect.py index ac67213..5bbebcf 100644 --- a/libtools/ToolSelect.py +++ b/libtools/ToolSelect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # ToolSelect.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # from Tool import Tool diff --git a/libtools/ToolSelectClone.py b/libtools/ToolSelectClone.py index 2113511..e8148ef 100644 --- a/libtools/ToolSelectClone.py +++ b/libtools/ToolSelectClone.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # ToolSelectClone.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # from ToolSelect import ToolSelect diff --git a/libtools/ToolSelectMove.py b/libtools/ToolSelectMove.py index 58b22ce..3be8cdf 100644 --- a/libtools/ToolSelectMove.py +++ b/libtools/ToolSelectMove.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # ToolSelectMove.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # from ToolSelect import ToolSelect diff --git a/libtools/ToolText.py b/libtools/ToolText.py index 0e886c3..a7b02aa 100644 --- a/libtools/ToolText.py +++ b/libtools/ToolText.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # ToolText.py -- XXX -# Copyright (c) 2018 Lucio Andrés Illanes Albornoz +# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz # from Tool import Tool