-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for localising regexps #18
base: master
Are you sure you want to change the base?
Conversation
Add the first locale, IT, that we care for right now Needed improvements include a better way to package the local regular expressions
Add the first locale, IT, that we care for right now Needed improvements include a better way to package the local regular expressions
tests for all locales
- Is this what travis is really complaining about? Fix _test_test file name error for italian test
@kulpreet I like this configuration approach towards language specific regex. Going to take a closer look, resolve some issues, and get @kageurufu thoughts. |
I like the idea of this, although I would prefer to store the localized regex in something readable through the standard library instead of bringing in an extra dependency just to read YAML files. Perhaps even just have a python module and |
Based on PR #18, modified to no longer require pyyaml This keeps email_reply_parser stdlib only, and allows easy addition of new locales without needing to parse config files
This looks great - is this library still maintained? It would be great to get language support in here. |
I needed to parse out emails for Italian users. All my users are Italian.
The regexps were all in English. I needed to support Italian regular expressions.
So I made some changes, which hopefully will allow other contributors to provide regular expressions in other languages.
Changes include:
EmailReplyParser
class to alocales.yaml
fileEmailReplyParser.read
andEmailReplyParser.parse_reply
Dependency added
pyyaml
to parse thelocales.yaml
. So added that tosetup.py
as arequires
andtests_require
option.Possible Improvements
locales.yaml
insetup
usingpackage_data
. I am new to Python, so didn't make much progress on it. But if someone can advise me what is the best approach to allow setup/install/runtime selection of configuration options - I am happy to make those changes.