def METHOD_NAME(file):
    txt = open(file).read()
    while 1:
        m = re.search(r"\[\[([^]|]+)([^]]*)\]\]", txt, re.MULTILINE)
        if not m: break
        origstr = "[[" + m.groups()[0] + m.groups()[1] + "]]"
        print origstr
        x = m.groups()[0]
        if 'Image:' in origstr:
            txt = txt.replace(origstr, "")
        else:
            txt = txt.replace(origstr, "`%s <http://magiclantern.wikia.com/wiki/%s>`_" % (x, urllib.quote(x)))
    #~ sub("INSTALL.rst", , ")
    f = open(file,"w")
    f.write(txt)
    f.close()