#!/usr/bin/env python3
import os
from getpass import getpass

from flask_frozen import Freezer
from manager import Manager

from personal_website.endpoint_generator import freeze_endpoints
from personal_website.flask_app import app

manager = Manager()
freezer = Freezer(app)
freeze_endpoints(freezer)


@manager.command
def build():
    freezer.freeze()


@manager.command
def serve(host='0.0.0.0', port='8000'):
    build()
    print("Running a server on " + host + ":" + port)
    freezer.serve(host=host, port=int(port), debug=True)


@manager.command
def clean():
    os.system("rm -rf personal_website/build/*")


@manager.command
def test():
    clean()
    build()
    os.system("py.test; behave")


@manager.command
def deploy(ip_address, user_name):
    """does an rsync to deploy to the <user>@<ip_address>:~/website"""
    password = getpass('Enter your password: ')
    os.system('sshpass -p "{password}" rsync -arvP personal_website/build/ {user_name}@{ip_address}:~/website'.format(
        user_name=user_name,
        ip_address=ip_address,
        password=password,
    ))


if __name__ == '__main__':
    manager.main()

@@ -323,24 +323,96 @@
 ef build():%0A
+    %22%22%22build the project and saves the output in the build directory%22%22%22%0A
     freezer.
@@ -479,16 +479,95 @@
 8000'):%0A
+    %22%22%22performs a build and hosts a server that runs locally on your system%22%22%22%0A
     buil
@@ -709,24 +709,96 @@
 ef clean():%0A
+    %22%22%22removes all the files that are created by the %60build%60 command%22%22%22%0A
     os.syste
@@ -861,24 +861,113 @@
 def test():%0A
+    %22%22%22runs the complete test suite which includes the unit tests and the smoke tests%22%22%22%0A
     clean()%0A

Add hints for each manage command