Skip to content
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

Module Setup #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Module Setup #48

wants to merge 2 commits into from

Conversation

jslay88
Copy link

@jslay88 jslay88 commented Oct 12, 2020

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).

  • remove sys.exit calls from everything but CLI (shouldn't exit someone elses python app if they are using the module).
  • better separation of logging and console output.
  • return discovered emails so when imported as a module, the app importing the harvester has easy/expected access to the data.

This is to make the harvest 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant