This is a script that goes through each of your villages and generates a nicely-formatted message for the troop totals and currently available troops.
The code is available here: https://pastebin.com/ATBXWvxS - I've not minified it because I'm extremely lazy and don't care. You can copy-paste...