Skip to main content

Broadcast messages for CLI tools, such as a warning for critical bug or notification about new features.

Project description

clicast

Broadcast messages for CLI tools, such as a warning for critical bug or notification about new features.

Quick Start Tutorial

As easy as 1-2-3:

  1. Install:

    pip install clicast
  2. Create your own cast file and make it accessible as an URL. I.e. https://raw.githubusercontent.com/maxzheng/clicast/master/tests/example.cast

    cast "New Message" -f example.cast
    # See 'cast -h' for more options to edit cast file
  3. Import and call check_message:

    from clicast import check_message
    
    def main():
        check_message('https://raw.githubusercontent.com/maxzheng/clicast/master/tests/example.cast',
                      allow_exit=True,
                      header='=' * 80,
                      footer='=' * 80)

CLI Example

Don’t even want to write the bin script to try? I got you covered! :)

$ wget https://raw.githubusercontent.com/maxzheng/clicast/master/bin/cast-example
$ chmod +x cast-example

If you run cast-example for the first time, you will see:

$ ./cast-example
================================================================================
We found a big bad bug. Please try not to step on it!! Icky...
No worries. It will be fixed soon! :)

Version 0.1 has been released! If you upgrade, you will get:
1) Cool feature 1
2) Cool feature 2
So what are you waiting for? :)

Version 0.2 has been released! Upgrade today to get cool features.

There is a small bug over there, so watch out!
================================================================================
Hello World! Pass in '-f' to see message targeted for that option

And run it again:

$ ./cast-example
================================================================================
We found a big bad bug. Please try not to step on it!! Icky...
No worries. It will be fixed soon! :)
================================================================================
Hello World! Pass in '-f' to see message targeted for that option

And now with -f option:

$ ./cast-example -f
================================================================================
We found a big bad bug. Please try not to step on it!! Icky...
No worries. It will be fixed soon! :)

A bug that affects the -f option. (applies only if `clicast.filters.match_cli_args` filter is used)
================================================================================
Hello World! Pass in '-f' to see message targeted for that option

That’s it!

More

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clicast-1.0.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clicast-1.0.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file clicast-1.0.0.tar.gz.

File metadata

  • Download URL: clicast-1.0.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for clicast-1.0.0.tar.gz
Algorithm Hash digest
SHA256 391e55ce63c3fa586bc495177ba9677ae0a88594cee0870f62d5b66718d44d87
MD5 8bb32e4b482db3b0f936cfb3899fac05
BLAKE2b-256 82f5f331d6e55467b397d55f84a4c157a07931148333e8b27846dfd6fbbd1cb4

See more details on using hashes here.

File details

Details for the file clicast-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: clicast-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for clicast-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 382ab5d91dfb003f5838a259a15ac897030c766144a829f00813c111020411d5
MD5 fae3f2b609d888cf17289a7b8e597625
BLAKE2b-256 1abd3993d4c824397c34733e3d226216ac8062bfe678775e88ca02471884487f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page