mirror of
https://github.com/gabrielkheisa/meme-generator-nodejs
synced 2024-11-22 11:31:42 +07:00
update
This commit is contained in:
parent
cff77f0689
commit
540542e947
622
package-lock.json
generated
622
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -15,8 +15,5 @@
|
|||||||
"cookie-parser": "^1.4.6",
|
"cookie-parser": "^1.4.6",
|
||||||
"ejs": "^3.1.6",
|
"ejs": "^3.1.6",
|
||||||
"dotenv": "^16.3.1"
|
"dotenv": "^16.3.1"
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"nodemon": "^2.2.9"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -79,7 +79,7 @@ app.post('/process', (req, res) => {
|
|||||||
sessionCookie = "";
|
sessionCookie = "";
|
||||||
return res.status(400).send(`Don't tamper the cookie, please return to <a href="/">home</a>`);
|
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 text_session = String(sessionCookie);
|
||||||
|
|
||||||
const sql = 'INSERT INTO meme_ronaldo (text, value) VALUES (?, ?)';
|
const sql = 'INSERT INTO meme_ronaldo (text, value) VALUES (?, ?)';
|
||||||
|
0
videos/683074264.mp4
Normal file → Executable file
0
videos/683074264.mp4
Normal file → Executable file
11
videos/render.py
Normal file → Executable file
11
videos/render.py
Normal file → Executable file
@ -13,7 +13,7 @@ bendera = 0
|
|||||||
theteks = ""
|
theteks = ""
|
||||||
picture = VideoFileClip("video.mp4")
|
picture = VideoFileClip("video.mp4")
|
||||||
|
|
||||||
thesize = 25
|
thesize = 20
|
||||||
|
|
||||||
|
|
||||||
def checkindo():
|
def checkindo():
|
||||||
@ -43,9 +43,10 @@ def checkindo():
|
|||||||
theteks = text_dbd
|
theteks = text_dbd
|
||||||
tp = theteks.split(",")
|
tp = theteks.split(",")
|
||||||
t1 = textwrap.fill(tp[0].upper(), thesize)
|
t1 = textwrap.fill(tp[0].upper(), thesize)
|
||||||
|
t2 = " "
|
||||||
t10 = "10 KETIKA 11"
|
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
|
step = 3 #each 15 sec: 0, 15, 30
|
||||||
@ -57,12 +58,12 @@ def checkindo():
|
|||||||
durations = [8,0]
|
durations = [8,0]
|
||||||
|
|
||||||
for text,t,duration in zip(texts, starts, durations):
|
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_start(t)
|
||||||
txt_clip = txt_clip.set_pos('bottom').set_duration(duration)
|
txt_clip = txt_clip.set_pos('bottom').set_duration(duration)
|
||||||
txt_clips.append(txt_clip)
|
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")
|
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)
|
mycursor.execute(sql)
|
||||||
# myresult = mycursor.fetchall()
|
# myresult = mycursor.fetchall()
|
||||||
mydb.commit()
|
mydb.commit()
|
||||||
|
0
videos/video.mp4
Normal file → Executable file
0
videos/video.mp4
Normal file → Executable file
Loading…
Reference in New Issue
Block a user