add help text
This commit is contained in:
parent
ae6a433484
commit
fad0555960
18
sssg/cli.py
18
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)
|
||||
|
Loading…
Reference in New Issue
Block a user