mv moin_strings_* to string_constants

This commit is contained in:
urlbot
2015-06-21 23:03:54 +02:00
parent e428d3e0a0
commit 3bb83b6f4a
2 changed files with 15 additions and 14 deletions

View File

@@ -11,7 +11,7 @@ import traceback
import urllib.parse
from local_config import conf, set_conf
from common import *
from string_constants import excuses
from string_constants import excuses, moin_strings_hi, moin_strings_bye
from urlbot import extract_title
from functools import wraps
@@ -121,19 +121,6 @@ def parse_skynet(**args):
@pluginfunction('moin', 'parse hi/bye', ptypes_PARSE)
def parse_moin(**args):
moin_strings_hi = [
'Hi',
'Guten Morgen', 'Morgen',
'Moin',
'Tag', 'Tach',
'NAbend', 'Abend',
'Hallo', 'Hello'
]
moin_strings_bye = [
'Nacht', 'gN8', 'N8',
'bye',
]
for direction in [moin_strings_hi, moin_strings_bye]:
for d in direction:
words = re.split(r'\W+', args['data'])

View File

@@ -473,3 +473,17 @@ The math co-processor had an overflow error that leaked out and shorted the RAM
Leap second overloaded RHEL6 servers
DNS server drank too much and had a hiccup
'''.split('\n')[1:-1]
moin_strings_hi = [
'Hi',
'Guten Morgen', 'Morgen',
'Moin',
'Tag', 'Tach',
'NAbend', 'Abend',
'Hallo', 'Hello'
]
moin_strings_bye = [
'Nacht', 'gN8', 'N8',
'bye',
]