extend trade regex for "I'd"
This commit is contained in:
parent
0f95e53cdc
commit
12773f1543
@ -12,4 +12,4 @@ Chat:
|
||||
sold: 'Sorry, {item} is already sold'
|
||||
Parser:
|
||||
re_log: '(?P<date>\d\d\d\d/\d\d/\d\d \d\d:\d\d:\d\d) (\d+) (\S+) \[(?P<level>\S+) (\S+) (\d+)\] (?P<channel>[#@%$&]?)(?P<ToFrom>To|From)?\s?(?P<guild><\S+>)? ?(?P<user>[^:]+): (?P<message>.*)'
|
||||
re_trade: 'Hi, I would like to buy your ?(?P<nrItems>\d*) (?P<item>.+) (listed )?for (my )?(?P<amount>\d+) (?P<currency>\D+) in (?P<league>\w+)\.?( \(stash tab "(?P<tab>.+)"; position: left (?P<col>\d+), top (?P<row>\d+)\))?'
|
||||
re_trade: 'Hi, I(( would)|(''d)) like to buy your ?(?P<nrItems>\d*) (?P<item>.+) (listed )?for (my )?(?P<amount>\d+) (?P<currency>\D+) in (?P<league>\w+)\.?( \(stash tab "(?P<tab>.+)"; position: left (?P<col>\d+), top (?P<row>\d+)\))?'
|
||||
|
@ -18,3 +18,12 @@ def test_write_to_log_2():
|
||||
text = ' 2021/05/09 15:25:21 14716218 bad [INFO Client 15632] @From iveseee: Hi, I would like to buy your 2 Ancient Orb for my 28 Chaos Orb in Ultimatum.'
|
||||
with open(log_file, 'a') as f:
|
||||
f.write(text)
|
||||
|
||||
|
||||
def test_write_to_log_3():
|
||||
config.read_config(r'config.yaml')
|
||||
log_file = config.get_value('General.log_file')
|
||||
assert(log_file)
|
||||
text = "2021/05/09 17:18:05 21480531 bad [INFO Client 15632] @From <ABC> DYNVMIT: Hi, I'd like to buy your 42 Simulacrum Splinter for my 28 Chaos Orb in Ultimatum."
|
||||
with open(log_file, 'a') as f:
|
||||
f.write(text)
|
||||
|
Loading…
x
Reference in New Issue
Block a user