e3d6952517
store package versions reqs added encoding compiled renamed Reveal file when done Remove reveal temp dont do big files dont store full name, use first and last later added gu8i minsize cleanup Gui, utils, etc cleanup from pyinstaller gui done for now filetypes fix Progress bar, multithreading GUI Chnages, progress bars, more error handling. Add distribution gitignore add make mac Added spec file Make Win fix ValueError bug rebuild mac Windows EXE mac app rename Readme added readme updates, and example on attribution.py delete setup remove prints remove threading remove requirement
26 lines
673 B
Python
26 lines
673 B
Python
__author__ = 'tyrelsouza'
|
|
import os
|
|
import json
|
|
|
|
|
|
def get_dropbox_dir():
|
|
"""
|
|
Windows and Mac get dropox dir for Business or fallback to personal
|
|
"""
|
|
if os.name == "nt":
|
|
dropbox_file = os.path.join(os.getenv('APPDATA'), 'Dropbox', 'info.json')
|
|
else:
|
|
dropbox_file = os.path.expanduser("~/.dropbox/info.json")
|
|
|
|
with open(dropbox_file) as dbf:
|
|
dbconfig = json.loads(dbf.read())
|
|
|
|
if "business" in dbconfig:
|
|
dropbox_dir = dbconfig['business']['path']
|
|
elif "personal" in dbconfig:
|
|
dropbox_dir = dbconfig['personal']['path']
|
|
else:
|
|
dropbox_dir = os.path.expanduser("~")
|
|
|
|
return dropbox_dir
|