diff --git a/sync.py b/sync.py index 705c58b..6dc1ff3 100755 --- a/sync.py +++ b/sync.py @@ -1,5 +1,6 @@ #! /usr/bin/env python3 +from logging import log import os import subprocess @@ -60,7 +61,7 @@ def sync(root, pubnix, exclude=None): "--partial", "--progress", "--verbose", - os.path.join(root, str()), + os.path.join(root, ""), ] for item in exclude: args.extend(["--exclude", os.path.join(str(), item)]) @@ -71,14 +72,10 @@ def sync(root, pubnix, exclude=None): def main(): root = os.path.dirname(os.path.realpath(__file__)) root = os.path.join(root, "out", "web") - dns_length = max([len(pubnix.dn) for pubnix in PUBNIXES]) - for pubnix in PUBNIXES: - print() - print(pubnix) - # print(f'{pubnix.dn.rjust(dns_length)} → ', end=str(), flush=True) - sync(root, pubnix, exclude=["__pycache__", "pgp.asc"]) - # print(pubnix.disk_free()) - # print(pubnix.os()) + for pn in PUBNIXES: + log() + log(pn) + sync(root, pn, exclude=["__pycache__", "pgp.asc"]) if __name__ == "__main__":