Skip to content

Instantly share code, notes, and snippets.

@jackperry
Created May 19, 2010 00:25
Show Gist options
  • Select an option

  • Save jackperry/405761 to your computer and use it in GitHub Desktop.

Select an option

Save jackperry/405761 to your computer and use it in GitHub Desktop.
f = open('idnum2itemdisplaynametable.txt', 'r')
g = open('output.txt', 'w')
for line in f:
x = line.replace('#',',"',1)
y = x.replace('#','","","");',1)
if y[1].isdigit():
z = "REPLACE INTO `item_meta` VALUES (" + y
g.write(z)
else:
pass
f.close
g.close
@kylehotchkiss
Copy link
Copy Markdown

Why not a database?

@jackperry
Copy link
Copy Markdown
Author

This is just a Python script to parse the translation files into the proper format to import into the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment