Skip to content

Module Setup#48

Open
jslay88 wants to merge 2 commits intomaldevel:masterfrom
jslay88:module
Open

Module Setup#48
jslay88 wants to merge 2 commits intomaldevel:masterfrom
jslay88:module

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