SVG file from Aruco dictionary

Hello,

I am trying to figure out how to save off the ArUco patterns supplied with OpenCV as an SVG file. Does anyone know how to do this?

Basically, I’m trying to recreate the functionality that this website has, Online ArUco markers generator.

Thanks