Hi, i have a ton of SVG files (icons and illustrat...
# android
s
Hi, i have a ton of SVG files (icons and illustrations for the app) that i need to convert to XML files to be used in my android project. Problem is i need to keep this up to date with a resource repo, and manually importing them when something is updated is a pain, especially as if i try to import a file name that already exists, it just skips it instead of overwrite. What i want to do is to have a python script that can convert the files to XML, and then just replace the files in the resource folder. Is there a good tool that can convert SVG to XML files i can use in python?
not kotlin but kotlin colored 2
e
there's a
com.android.ide.common.vectordrawable.Svg2Vector
inside the
com.android.tools:sdk-common
artifact, it's what the IDE uses internally
you could build your own https://android.googlesource.com/platform/tools/base/+/studio-master-dev/vector-drawable-tool or grab one of the many repackagings of it
s
Where could i find some of those repackings? Got no idea how to do that myself 😅 I managed to get a this tool (npm install svg2vectordrawable -g) to somewhat work, but that messed up a lot of the files with minor or major errors, so was pretty much useless).
Nvm, think I found one, and it looks to be working so far 😄 Thanks a lot, kept trying to search for SVG to XML converter, but never found something good before specifically searching "vector-drawable-tool"