Skip to content

Instantly share code, notes, and snippets.

@jmahmood
Created May 19, 2012 08:40
Show Gist options
  • Save jmahmood/2730102 to your computer and use it in GitHub Desktop.
Save jmahmood/2730102 to your computer and use it in GitHub Desktop.
Sticky Study Import File Generator
o = open("Kanji_Vocab_List.txt")
contents = o.read().decode('utf8')
o.close()
c = contents.split()
words = [ (c[i], c[i+1]) for i in range(len(c)) if i%2==0 ]
# This is for testing actually writing the kanji.
output = []
template = u"""%s\t%s\t%s\t%s"""
for k,r in words:
output.append( template % (r, r, r, k))
print "\n".join(output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment