This commit is contained in:
Lynne 2018-09-09 03:41:59 +00:00
parent 728595aee2
commit d2bb4e7cc4
4 changed files with 6 additions and 5 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@ clientcred.secret
usercred.secret usercred.secret
run.sh run.sh
corpus.txt corpus.txt
meme.jpg

BIN
drake.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

10
gen.py
View file

@ -91,16 +91,16 @@ if random.randint(1, 3) == 2:
badchoice = random.choice(bad) badchoice = random.choice(bad)
goodchoice = random.choice(good) goodchoice = random.choice(good)
subprocess.run(args = ["convert", "drake.jpg", "-pointsize", "30", subprocess.run(args = ["convert", "memes/drake.jpg", "-pointsize", "30",
"-gravity", "center", "-draw", "-gravity", "center", "-draw",
"text 20,-150 '{}'".format(badchoice), "drakeout.jpg"]) "text 20,-150 '{}'".format(badchoice), "meme.jpg"])
subprocess.run(args = ["convert", "drakeout.jpg", "-pointsize", "30", subprocess.run(args = ["convert", "meme.jpg", "-pointsize", "30",
"-gravity", "center", "-draw", "-gravity", "center", "-draw",
"text 20,50 '{}'".format(goodchoice), "text 20,50 '{}'".format(goodchoice),
"-quality", "10", "drakeout.jpg"]) "-quality", "10", "meme.jpg"])
media = "drakeout.jpg" media = "meme.jpg"
media_description = "A Drake meme. Drake is disgusted by {}, and is pleased by {}.".format(badchoice, goodchoice) media_description = "A Drake meme. Drake is disgusted by {}, and is pleased by {}.".format(badchoice, goodchoice)
else: else: