scalyr / scalyr-tool

Command-line tool for accessing Scalyr services
Apache License 2.0
56 stars 37 forks source link

Create separate function for CLI main #47

Closed czerwingithub closed 2 years ago

czerwingithub commented 2 years ago

Background

I'm reusing this source for a GitHub Actions project. Since this repo is not set up as a true Python module, it is a little difficult to reuse it in another project. I think probably we should move it to a true Python module in the long term, but that would impact the ease of use of just having this as a standalone script.

This was the smallest change I could make to allow me to reuse this in another project.

Change

Create a function to perform most of the work to handle the commandline interface and invoke that if run as a script.