from datetime import datetime
from pathlib import Path


def main():
    conf_root = Path("conf")
    timestamp = datetime.now().strftime("%Y-%m-%d %X")
    print(f"cuefig struct at {conf_root.absolute()}")
    file_list = [
        conf_root / "__init__.py",
        conf_root / "config.py",
        conf_root / "config_deploy.py",
    ]
    if conf_root.exists():
        print(f"{conf_root.absolute()} already exists")
    else:
        conf_root.mkdir()

    for path in file_list:
        if path.exists():
            print(f"{path.absolute()} already exists")
            continue
        with open(path, mode="w", encoding="utf8") as f:
            print(f'# Generated by cuefig at {timestamp}', file=f)


__all__ = ('main',)

if __name__ == '__main__':
    main()

from datetime import datetime
from pathlib import Path


def main():
    conf_root = Path("conf")
    timestamp = datetime.now().strftime("%Y-%m-%d %X")
    print(f"cuefig struct at {conf_root.absolute()}")
    file_list = [
        conf_root / "__init__.py",
        conf_root / "config.py",
        conf_root / "config_deploy.py",
    ]
    if conf_root.exists():
        print(f"{conf_root.absolute()} already exists")
    else:
        conf_root.mkdir()

    for path in file_list:
        if path.exists():
            print(f"{path.absolute()} already exists")
            continue
        with open(path, mode="w", encoding="utf8") as f:
            print(f'# Generated by cuefig at {timestamp}', file=f)


__all__ = ('main',)

if __name__ == '__main__':
    main()
