Initial commit - clean repository without history
This commit is contained in:
23
constants.py
Normal file
23
constants.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# constants.py
|
||||
from init import *
|
||||
import socket
|
||||
import json
|
||||
from datetime import date, datetime
|
||||
import os
|
||||
|
||||
LISTFILE = os.path.join(ROOT_DIR_APP, "dir_backups.json")
|
||||
CONF_FILE = os.path.join(ROOT_DIR_APP, "config.json")
|
||||
HOSTNAME = socket.gethostname()
|
||||
HOST_BACKUP_FOLDER = os.path.join(ROOT_DIR_BACKUPS, HOSTNAME)
|
||||
DATETODAY = date.today()
|
||||
TIMENOW = datetime.now().strftime("%H:%M:%S")
|
||||
TIMEDATA = '[ ' + str(DATETODAY) + ' - ' + str(TIMENOW) + ' ]'
|
||||
|
||||
with open(LISTFILE, "r") as listfile:
|
||||
JSON_LIST = json.load(listfile)
|
||||
|
||||
with open(CONF_FILE, "r") as conf_file:
|
||||
JSON_CONF = json.load(conf_file)
|
||||
|
||||
print(TIMEDATA)
|
||||
|
||||
Reference in New Issue
Block a user