#!/usr/bin/python
"""H/t to eholtam for posting in slack"""

import json
import os

print("Personal: ")
f = open(os.path.expanduser('~/.dropbox/info.json'), 'r').read()
data = json.loads(f)
print(data.get('personal', {}).get('path', '').replace('', 'None'))

print("Business: ")
f = open(os.path.expanduser('~/.dropbox/info.json'), 'r').read()
data = json.loads(f)
print(data.get('business', {}).get('path', '').replace('', 'None'))

#!/usr/bin/python

import json, os, pprint

f = open(os.path.expanduser('~/.dropbox/info.json'), 'r').read()
data = json.loads(f)

# To list all dropbox data
pprint.pprint(data)
print('')

# Or to find just the paths
for i in ['personal', 'business']:
    print('{}:'.format(i.capitalize()))
    print(data.get(i, {}).get('path', ''))

Update dropbox folder location script
Update dropbox folder location script
