exit() import sys, os import time import datetime import glob import subprocess import shutil from frogmon.uConfig import CONF from frogmon.uLogger import LOG from frogmon.uCommon import COM from frogmon.uGlobal import GLOB # 프로그램 시작 GLOB.directoryInit(GLOB.whoami(), "DOORs") configFileNM = COM.gHomeDir + COM.gSetupFile controlFileNM = COM.gHomeDir + COM.gControlFile user_id = GLOB.readConfig(configFileNM, 'SETUP', 'user_id', '0') dev_id = GLOB.readConfig(configFileNM, 'AGENT', 'id', '0') # 함수 정의 mWhoami = GLOB.whoami() mUsbDir = "/mnt/usb_stick" mFaceDir = COM.gHomeDir + "faces/" GLOB.folderMaker(mFaceDir) print("whoami = %s" % mWhoami)
COM.gstrYMDHMS, name) f.write(data) else: with open(fileNM, 'w', encoding='utf-8') as f: data = '{"DOOR_OPEN_TIME" : "%s", "NAME" : "%s" }' % ( COM.gstrYMDHMS, name) f.write(data) rc = 0 except Exception as e: LOG.writeLn("[jsonAppend ERROR]: %s" % e) return rc # 프로그램 시작 GLOB.directoryInit('pi', "DOORs") path = COM.gHomeDir + "faces/" faceLogPath = COM.gHomeDir + "facelog/" metrixImg = COM.gHomeDir + "metrix.png" GLOB.folderMaker(path) GLOB.folderMaker(faceLogPath) GLOB.folderMaker(COM.gJsonDir) #from frogmon.ulogger import LOG configFileNM = COM.gHomeDir + COM.gSetupFile controlFileNM = COM.gHomeDir + COM.gControlFile user_id = GLOB.readConfig(configFileNM, 'SETUP', 'user_id', '0') dev_id = GLOB.readConfig(configFileNM, 'AGENT', 'id', '0')