You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
494 B
13 lines
494 B
import os
|
|
import json
|
|
def load(asset):
|
|
direct = os.getcwd()
|
|
path = '{}{sep}Assets{sep}{}'.format(direct,asset + '.txt',**{'sep':os.sep})
|
|
return json.loads(open(path,'r').read())
|
|
def save(asset,asset_name):
|
|
direct = os.getcwd()
|
|
path = '{}{sep}Assets{sep}{}'.format(direct,asset_name + '.txt',**{'sep':os.sep})
|
|
file = open(path,'w')
|
|
file.write(json.dumps(asset, sort_keys=True,indent=4, separators=(',', ': ')))
|
|
print('Saved as: {}'.format(asset_name))
|
|
return
|