You can create cards from a google spreadsheet. You might find that easier.
I will warn you - it's not very clean code and mostly based on scripts I'd found on GitHub. It's something I threw together over a summer because I needed to learn a lot of Swedish words very quickly, and my usual Anki-adding methods were too slow. Worked out well, but I do keep meaning to come back to it and make it a proper bit of software...