# Script to make io-plurals

import os
import codecs
import sys

template = u"""
{{-start-}}
<<<{STEM}i>>>
==Ido==
===Noun===
'''{{SUBST:PAGENAME}}'''

# {{plural of|{STEM}o|lang=io}}

{{-stop-}}


"""

def main():
    global template
    if len(sys.argv) != 2:
        print "Usage: %s STEM" % sys.argv[0]
        return

    f = codecs.open("io.txt", "a", "utf-8")
    f.write(template.replace(u"{STEM}", sys.argv[1]))
    f.close()
    print "Done! now `python io.py`"

if __name__ == "__main__":
    main()