INNER CODE UNIT · Python

resolve_podcast_path

DataTalksClub/datatalksclub.github.io · scripts/add_dateadded_from_git.py:35

def resolve_podcast_path(podcast_file: str) -> Optional[Path]:
    """Resolve a podcast file path relative to the project root."""
    project_root = get_project_root()
    file_path = Path(podcast_file)

    if file_path.exists():
        return file_path.resolve()

    candidate = project_root / podcast_file
    if candidate.exists():
        return candidate.resolve()

    return None


def get_file_creation_date(file_path: Path) -> Optional[str]:
    """
    Get the date when a file was first added to git.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…