11 lines
298 B
Python
11 lines
298 B
Python
from datetime import datetime, timezone
|
|
from pathlib import Path
|
|
|
|
MIME_MAP = { ".cbz": "application/vnd.comicbook+zip" }
|
|
|
|
def now_rfc3339():
|
|
return datetime.now(timezone.utc).isoformat()
|
|
|
|
def mime_for(path: Path) -> str:
|
|
return MIME_MAP.get(path.suffix.lower(), "application/octet-stream")
|