File indexing completed on 2023-05-30 12:38:28
0001 #!/usr/bin/env python2 0002 0003 import sys 0004 import configparser, os 0005 0006 config = configparser.ConfigParser() 0007 config.readfp(open(sys.argv[2],'r')) 0008 0009 enconfig = configparser.ConfigParser() 0010 enconfig.readfp(open(sys.argv[1],'r')) 0011 0012 for identifier, string in config.items("messages"): 0013 if len(string) == 0: 0014 string = enconfig.get("messages", identifier) 0015 0016 out = "<section begin=" + identifier 0017 out += " />" + string 0018 out += "<section end=" + identifier + " /> " 0019 print out 0020 # outarr.append(out) 0021 # outfile = open('mediawiki/'+f+'.mw', 'w') 0022 # outfile.write('\n'.join(outarr)+'\n')