blob: 60bef33b8d758cf0c086e8adf5d571ad4c8faa87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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()
|