From e42a917cd4f4b8f72a1eeab234a90f264a1f6741 Mon Sep 17 00:00:00 2001 From: Thomas Mannay Date: Wed, 30 Jan 2019 19:43:35 +0000 Subject: [PATCH] Refactor --- .gitignore | 1 + seddy.py | 143 ----------------------------------------------- setup.py | 25 +++++++++ src/seddy/__init__.py | 5 ++ src/seddy/__version__.py | 4 ++ src/seddy/main.py | 102 +++++++++++++++++++++++++++++++++ src/seddy/sed.py | 49 ++++++++++++++++ src/seddy/tubes.py | 48 ++++++++++++++++ 8 files changed, 234 insertions(+), 143 deletions(-) create mode 100644 .gitignore delete mode 100755 seddy.py create mode 100644 setup.py create mode 100644 src/seddy/__init__.py create mode 100644 src/seddy/__version__.py create mode 100755 src/seddy/main.py create mode 100644 src/seddy/sed.py create mode 100644 src/seddy/tubes.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b25c15b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/seddy.py b/seddy.py deleted file mode 100755 index 8881f63..0000000 --- a/seddy.py +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/python3 -# See the LICENSE file for licensing information -import re -from time import sleep -from random import choice - -nick = 'seddy' -server = 'chat.freenode.net' -channel = '#example' -gecos = 'A text processing bot' - -receive = '/tmp/{0}.in'.format(server) -send = '/tmp/{0}.out'.format(server) - -parse_msg = re.compile('.* PRIVMSG ' + channel + ' :(.*)') -parse_sed = re.compile('(?