This is neat!
I wrote a similarish tool for converting SVG to code at Last Job™: https://github.com/biowink/SVGeez (though, it's questionable how well it works beyond the specific use case of the app it's for..though in theory it should work fine!)
(even the name is similar ;))
I bumped into issues when transforming complex paths into single paths. I suppose leveraging SVGO is a better plan for that. Kudos!