import os

def version_processor(request):
    version_file_path = os.path.join(os.path.dirname(__file__), "../../version")

    try:
        with open(version_file_path, "r", encoding="utf-8") as file:
            version = file.read().strip()
    except FileNotFoundError:
        version = "Version not found"

    return {"version": version}
