예제 #1
0
파일: data.py 프로젝트: grokit/dcore
def notesRoot():
    dataLocation = os.path.expanduser('~/notes_db')
    try:
        # If you are using dcore system, take root from there.
        import dcore.data as data
        dataLocation = data.dcoreData()
        dataLocation = os.path.join(dataLocation, 'notes_db')
    except ImportError as e:
        pass

    #If want to test...
    #dataLocation = os.path.expanduser('~/Downloads/notes_db')
    return dataLocation
예제 #2
0

import sys
import os
import argparse
import platform

try:
    from tkinter import Tk
except:
    pass

import dcore.data as data
    
path_ext_folder = data.pathExt()
cacheFile = os.path.join(data.dcoreData(), '%s.cache' % os.path.split(__file__)[1])
cacheFilePerimated = cacheFile + ".deleted"
tempBatch = cacheFile + '.temp.bat'

def rememberDirs():
    dirs = [os.getcwd()]
    
    dirs += getFileContent()

    bad = [d for d in dirs if not os.path.isdir(d) and not (len(d.split(',')) == 2 and os.path.isdir(d.split(',')[1]))]
    print('Removing non-existent directories: %s.' % bad)
    dirs = [d for d in dirs if d not in bad]
    
    setFileContent( dirs )
    
    # need to read again because might be different if there are duplicates
예제 #3
0
파일: options.py 프로젝트: grokit/dcore
import os

import dcore.data as data

dbFile = os.path.join(data.dcoreData(), 'work_tracking_db.json')
htmlFile = os.path.join(data.dcoreData(), 'work_tracking.html')
dataFile = os.path.join(data.dcoreData(), 'data.js')
mainDir = os.path.abspath(os.path.dirname(__file__))
utFolder = os.path.abspath('./unit_tests_inout')

예제 #4
0
def getPrivateDataFilename():
    return os.path.join(data.dcoreData(), "private_file_v2")