"""Make SVG mark identical to the master PNG by embedding it.""" from __future__ import annotations import base64 from pathlib import Path ROOT = Path(__file__).resolve().parents[1] BRAND = ROOT / "brand" PNG = BRAND / "prediqo-mark.png" def main() -> None: b64 = base64.b64encode(PNG.read_bytes()).decode("ascii") mark = ( '\n' " \n" f' \n' "\n" ) lockup = ( '\n' f' \n' ' TLOTO\n' "\n" ) targets_mark = [ BRAND / "prediqo-mark.svg", ROOT / "prediqo_web" / "public" / "brand" / "prediqo-mark.svg", ROOT / "prediqo_web" / "public" / "favicon.svg", ROOT / "prediqo_mobile" / "assets" / "brand" / "prediqo-mark.svg", ] targets_lockup = [ BRAND / "prediqo-lockup.svg", ROOT / "prediqo_web" / "public" / "brand" / "prediqo-lockup.svg", ] for path in targets_mark: path.write_text(mark, encoding="utf-8") print(f"wrote {path}") for path in targets_lockup: path.write_text(lockup, encoding="utf-8") print(f"wrote {path}") if __name__ == "__main__": main()