Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/modules/user/hh.py

29 lines
641 B
Python
Raw Normal View History

2020-06-13 12:43:43 +00:00
import re
2020-08-12 16:01:34 +00:00
2020-06-13 12:43:43 +00:00
def hh(w):
2020-08-15 07:35:46 +00:00
if len(w) > 15:
2020-06-13 12:43:43 +00:00
w = re.findall('..?.?.?.?.?.?.?.?.?.?.?.?.?.?', w)
w = str(w)
2020-08-12 16:01:34 +00:00
w = re.sub('\[', '', w)
w = re.sub('\]', '', w)
w = re.sub(',', '-\n', w)
w = re.sub('\'', '', w)
return (w)
2020-06-13 12:43:43 +00:00
else:
2020-08-12 16:01:34 +00:00
return (w)
2020-08-15 07:10:30 +00:00
2020-09-19 10:35:13 +00:00
2020-08-15 07:10:30 +00:00
def hh1(w):
w = '理由“' + w + ''
if len(w) > 25:
w = re.findall('..?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?', w)
w = str(w)
w = re.sub('\[', '', w)
w = re.sub('\]', '', w)
w = re.sub(',', '-\n', w)
w = re.sub('\'', '', w)
return (w)
else:
2020-09-19 10:35:13 +00:00
return (w)