Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is to make the harvester importable and usable as a python module for other python projects. CLI has been broken out into its own script, and utilizes setuptools console_scripts entrypoint.
This also is ready for PyPi upload and pip install from there, and should simplify the distribution of your project.
Upon pip install, a new executable is added to PATH (
email_harvester
) which will invoke the CLI.Additional work is really needed for a full module (ergo, returning data from
EmailHarvester
class instead of just printing/logging), but this is 98% of the work. I have just run out of time for today (will add it sooner or later myself if it isn't added by the time I get back to this).sys.exit
calls from everything but CLI (shouldn't exit someone elses python app if they are using the module).