diff options
author | Alasdair Colley <alnessy@hotmail.com> | 2014-07-17 17:18:06 +0200 |
---|---|---|
committer | Alasdair Colley <alnessy@hotmail.com> | 2014-07-17 17:18:06 +0200 |
commit | 10a3d0e498b9305809c6efdefc25da994f458666 (patch) | |
tree | 524979e4d44ab9b418bf09d74f94ba93069258ca /migrate | |
parent | 3587745199bfb4e2c546f9ad1bdd484692c42162 (diff) |
adding migration script to convert old blasource entries to the new format
Diffstat (limited to 'migrate')
-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() |