from typing import Union
from pathlib import Path


def pretty_path(path: Union[Path, str]) -> str:
    """convert paths like .../ArchiveBox/archivebox/../output/abc into output/abc"""
    pwd = Path('.').resolve()
    # parent = os.path.abspath(os.path.join(pwd, os.path.pardir))
    return str(path).replace(str(pwd) + '/', './')