#!/usr/bin/python3
""" compress webstatic """

from fabric.operations import local
from datetime import datetime


def do_pack():
    """[summary
    """

    local("sudo mkdir -p versions")
    date = datetime.now().strftime("%Y%m%d%H%M%S")
    path = "versions/web_static_{}.tgz".format(date)
    compressed = local("tar -cvzf {} web_static/".format(path), capture=True)
    if compressed:
        return compressed
    else:
        return None
