Logo Search packages:      
Sourcecode: kanjisaver version File versions  Download package

fix_kanjih.py

#!/usr/bin/env python

import sys, re

f = open(sys.argv[1], 'r')
kanjih = f.readlines()

for line in kanjih:
      rmatch = re.match(r'{"(.*)","(.*)","(.*)","","",""},', line)
      if rmatch != None:
            rline = line
            rline = '{"%s","%s","","","%s",""},\n' % (rmatch.groups()[0], rmatch.groups()[1], rmatch.groups()[2])
            print rline
            kanjih[kanjih.index(line)] = rline

f = open(sys.argv[1]+'FIX', 'w')
f.writelines(kanjih)
f.close()

Generated by  Doxygen 1.6.0   Back to index