diff options
-rwxr-xr-x | migrate | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +#! /usr/bin/env python + +import json +import sys + +ENTRIES_FILE = "saucypy.json" + +def main(): + source = sys.argv[1] # 'source', get it? + data = {} + for line in open( source ): + key, value = line.split() + data[key] = value + json.dump( data, open( ENTRIES_FILE, "w" ), indent = 4, sort_keys = True ) + +if __name__ == "__main__": + main() |