Update migrate script

This commit is contained in:
hahwul 2022-08-15 23:18:05 +09:00
parent de533b951c
commit 3d2390e48b

View File

@ -20,10 +20,11 @@ def get_urls str
return URI.extract(str).uniq
end
file = File.read('./data.json')
data_hash = JSON.parse(file)
def migrate jsonfile
file = File.read(jsonfile)
data_hash = JSON.parse(file)
data_hash.each do | name, obj |
data_hash.each do | name, obj |
filename = name.gsub(' ','_')+".yaml"
# Make object
new_obj = {}
@ -44,4 +45,10 @@ data_hash.each do | name, obj |
# Save yaml file
puts filename
#File.write("./data/#{filename}", yaml_data)
end
end
migrate './data.json'
migrate './Bookmarklets/data.json'
migrate './Browser Extensions/data.json'
migrate './Burp and ZAP Extensions/data.json'