adding dependent scripts

This commit is contained in:
Dita Aji Pratama 2025-02-18 16:45:46 +07:00
parent ad26252269
commit 9239d79bd8
2 changed files with 27 additions and 0 deletions

13
scripts/loggorilla.py Normal file
View File

@ -0,0 +1,13 @@
import datetime
def prcss(loc, msg):
print(f"[loggorilla][{datetime.datetime.now()}][\033[32mprcss\033[39m][\033[95m{loc}\033[39m] {msg}", flush=True)
def accss(loc, msg):
print(f"[loggorilla][{datetime.datetime.now()}][\033[36maccss\033[39m][\033[95m{loc}\033[39m] {msg}", flush=True)
def fyinf(loc, msg):
print(f"[loggorilla][{datetime.datetime.now()}][\033[93mfyinf\033[39m][\033[95m{loc}\033[39m] {msg}", flush=True)
def error(loc, msg):
print(f"[loggorilla][{datetime.datetime.now()}][\033[31merror\033[39m][\033[95m{loc}\033[39m] {msg}", flush=True)

14
scripts/synthesai.py Normal file
View File

@ -0,0 +1,14 @@
import requests
def generate(auth, payload):
url = "https://api.synthesia.io/v2/videos"
headers = { "Authorization" : auth, "accept" : "application/json", "content-type" : "application/json" }
response = requests.post(url, json=payload, headers=headers)
return response
def retrieve(auth, video_id):
url = f"https://api.synthesia.io/v2/videos/{video_id}"
headers = { "Authorization": auth, "accept": "application/json" }
response = requests.get(url, headers=headers)
return response