whyliam / whyliam.workflows.youdao

使用有道翻译你想知道的单词和语句
http://blog.naaln.com/2015/05/repeat-create-the-wheel-alfred-plugin-youdao/
MIT License
1.09k stars 133 forks source link

建议增加驼峰,下划线的处理 #119

Open zok2 opened 1 year ago

zok2 commented 1 year ago

增加 : import re

main 函数下

query = wf.args[0].strip() 增加: query = query.replace('_', ' ') query = re.sub(r'([a-z])([A-Z])', r'\1 \2', query)