"""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'))


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

- """H/t to eholtam for posting in slack"""
  
+ import json, os, pprint
- 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'))
  
+ # To list all dropbox data
+ pprint.pprint(data)
+ print('')
- print("Business: ")
- f = open(os.path.expanduser('~/.dropbox/info.json'), 'r').read()
- data = json.loads(f)
- print(data.get('business', {}).get('path', '').replace('', 'None'))
  
+ # 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
## Code Before:
"""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'))

## Instruction:
Update dropbox folder location script
## Code After:

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', ''))
