# -*- coding: utf-8 -*- # Crates HTML reports for easily finding double-links. # The input files are created by getlanglinks.py # Written by Denny Vrandečić and released 23 June 2012, http://denny.vrandecic.de # Released under the BSD license import os count = 0 for txts in os.listdir('doublelinks') : if txts[-4:] == '.txt' : lang = txts[12:-4] f = open('doublelinks/' + txts, 'r') result = open('doublelinks/doublelinks.' + lang + '.html', 'w') result.write("""
The Wikipedia articles linked to here listed, as of the dump created on June 23rd, 2012, more than one language link to the same other language. This may indicate an error.
' + title + ' to
[[' + link + ']]
Created June 23rd 2012, Denny Vrandečić.
Back to overview page"""); result.close() f.close() print count