Skip to content
Snippets Groups Projects
Commit 0026f5bc authored by Daniel STAN's avatar Daniel STAN
Browse files

Ajout d'un converter initial

parent a3d0fee0
No related branches found
No related tags found
No related merge requests found
import json
import glob
import os
# Basic converter to json, avec roles nounous partout
init_path = '/home/dstan/crans/passwords/'
final_path = '/home/dstan/crans/passwords/v2/'
os.chdir(init_path)
filenames = glob.glob('*.asc')
encoder=json.JSONEncoder()
for filename in filenames:
nf = file(final_path+filename[:-4]+'.json','w')
nf.write(encoder.encode({'roles':['nounous']\
,'contents':open(filename).read()}))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment