-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backup now stores metadata and data in json file. github push functionality is being worked on. there is time zone in the config and a time module
- Loading branch information
Showing
5 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import os | ||
from git import Repo | ||
import modules.config as config | ||
|
||
# Gives the location of the YAML Configuration File | ||
location = os.environ.get("config", "config.yaml") | ||
# Set yaml config as conf | ||
conf = config.importConfig(location) | ||
|
||
def setDir(location): | ||
repo = Repo(location) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import time | ||
from datetime import date | ||
import os | ||
import modules.config as config | ||
|
||
# Gives the location of the YAML Configuration File | ||
location = os.environ.get("config", "config.yaml") | ||
# Set yaml config as conf | ||
conf = config.importConfig(location) | ||
|
||
os.environ['TZ'] = conf["databases"]["postgres"]["tz"] | ||
|
||
def getTime(): | ||
now = time.localtime() | ||
current_time = time.strftime("%H:%M:%S", now) | ||
currentDateTime = str(date.today()) + " " + str(current_time) # Todays Date | ||
return currentDateTime |