This commit is contained in:
Gabriel Kheisa 2023-11-27 14:34:37 +00:00
parent cff77f0689
commit 540542e947
6 changed files with 454 additions and 224 deletions

660
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,8 +15,5 @@
"cookie-parser": "^1.4.6",
"ejs": "^3.1.6",
"dotenv": "^16.3.1"
},
"devDependencies": {
"nodemon": "^2.2.9"
}
}
}

View File

@ -79,7 +79,7 @@ app.post('/process', (req, res) => {
sessionCookie = "";
return res.status(400).send(`Don't tamper the cookie, please return to <a href="/">home</a>`);
}
const text1 = sanitizeInput(req.body.text1);
const text1 = sanitizeInput(req.body.text1).slice(0, 120);
const text_session = String(sessionCookie);
const sql = 'INSERT INTO meme_ronaldo (text, value) VALUES (?, ?)';

0
videos/683074264.mp4 Normal file → Executable file
View File

11
videos/render.py Normal file → Executable file
View File

@ -13,7 +13,7 @@ bendera = 0
theteks = ""
picture = VideoFileClip("video.mp4")
thesize = 25
thesize = 20
def checkindo():
@ -43,9 +43,10 @@ def checkindo():
theteks = text_dbd
tp = theteks.split(",")
t1 = textwrap.fill(tp[0].upper(), thesize)
t2 = " "
t10 = "10 KETIKA 11"
texts = [t1,t2,t3,t4,t5,t6,t7,t8,t9]
texts = [t1, t2]
step = 3 #each 15 sec: 0, 15, 30
@ -57,12 +58,12 @@ def checkindo():
durations = [8,0]
for text,t,duration in zip(texts, starts, durations):
txt_clip = TextClip(text, fontsize = 40, color='white', font="Roboto Mono", stroke_color="black")
txt_clip = TextClip(text, fontsize = 24, color='white',font="DejaVu-Serif-Bold", stroke_color="black")
txt_clip = txt_clip.set_start(t)
txt_clip = txt_clip.set_pos('bottom').set_duration(duration)
txt_clips.append(txt_clip)
final_video = CompositeVideoClip([picture,txt_clips[0],txt_clips[1],txt_clips[2],txt_clips[3],txt_clips[4],txt_clips[5],txt_clips[6],txt_clips[7],txt_clips[8]])
final_video = CompositeVideoClip([picture,txt_clips[0],txt_clips[1]])
final_video.write_videofile(str(user_empty)+".mp4")
@ -73,7 +74,7 @@ def checkindo():
sql = "UPDATE meme_ronaldo SET status = \'"+ "1" +"\' WHERE session = \'" + str(user_empty) +"\'"
sql = "UPDATE meme_ronaldo SET status = \'"+ "1" +"\' WHERE value = \'" + str(user_empty) +"\'"
mycursor.execute(sql)
# myresult = mycursor.fetchall()
mydb.commit()

0
videos/video.mp4 Normal file → Executable file
View File