/simplescript

Make shell scripts from python functions

Primary LanguagePythonApache License 2.0Apache-2.0

Simple Script

  • Latest Version

Make a shell script from a python function. Generates an argument parser for the function using argparse by inspecting the function arguments.

#! /usr/bin/python
from simplescript import simplescript

@simplescript
def myscript(a_flag=False, a_string="default"):
    """An example script"""
    if a_flag:
        print a_string

Install using pip:

pip install simplescript