direct to main for docker and logging fix

This commit is contained in:
ForeverPyrite
2024-12-10 23:52:01 -05:00
parent deee193a43
commit 48004df115
6 changed files with 21 additions and 14 deletions

View File

@@ -58,8 +58,12 @@ import pytz
from datetime import datetime
def log(str):
with open("logs/log.md", "at") as file:
file.write(str)
try:
with open("logs/log.md", "a") as file:
file.write(str)
except FileNotFoundError:
os.system("touch logs/log.md")
log("#### log.md was not found, so it was just touched.")
### OpenAI Config
@@ -125,4 +129,6 @@ def get_auto_transcript(video_id):
txt_transcript = formatter.format_transcript(transcript)
return txt_transcript
output_stream = StreamOutput()
output_stream = StreamOutput()
log(f"# Main initilized at {datetime.now(pytz.timezone('America/New_York')).strftime('%Y-%m-%d %H:%M:%S')}. Presumeably application starting.")