diff --git a/sssg/cli.py b/sssg/cli.py index e58e77e..8efd8e3 100644 --- a/sssg/cli.py +++ b/sssg/cli.py @@ -5,7 +5,10 @@ import sys import os def main(args=sys.argv): - command = args[1] + try: + command = args[1] + except IndexError: + command = "nonexistent" if command == "rebuild": cwd = os.getcwd() @@ -15,3 +18,16 @@ def main(args=sys.argv): os.execv('/bin/sh', ['/bin/sh', '.deploy']) elif command == "update": sssg.liveupdate.liveupdate() + else: + help_text = """ +sssg - the stupid static site generator + +usage: sssg [verb] + +verb: one of + rebuild -- rebuilds the static site into output/ + deploy -- executes the deploy script + update -- rebuild the static site upon any change +""" + + print(help_text)