AlexKM commited on
Commit
d522f59
1 Parent(s): 8db961d

Upload random.sh

Browse files
Files changed (1) hide show
  1. random.sh +38 -0
random.sh ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ text_one=("A painting of a" "A pencil art sketch of a" "An illustration of a" "A photograph of a")
4
+ text_two=("spinning" "dreaming" "watering" "loving" "eating" "drinking" "sleeping" "repeating" "surreal" "psychedelic")
5
+ text_three=("fish" "egg" "peacock" "watermelon" "pickle" "horse" "dog" "house" "kitchen" "bedroom" "door" "table" "lamp" "dresser" "watch" "logo" "icon" "tree"
6
+ "grass" "flower" "plant" "shrub" "bloom" "screwdriver" "spanner" "figurine" "statue" "graveyard" "hotel" "bus" "train" "car" "lamp" "computer" "monitor")
7
+ styles=("Art Nouveau" "Camille Pissarro" "Michelangelo Caravaggio" "Claude Monet" "Edgar Degas" "Edvard Munch" "Fauvism" "Futurism" "Impressionism"
8
+ "Picasso" "Pop Art" "Modern art" "Surreal Art" "Sandro Botticelli" "oil paints" "watercolours" "weird bananas" "strange colours")
9
+
10
+ pickword() {
11
+ local array=("$@")
12
+ ARRAY_RANGE=$((${#array[@]}-1))
13
+ RANDOM_ENTRY=`shuf -i 0-$ARRAY_RANGE -n 1`
14
+ UPDATE=${array[$RANDOM_ENTRY]}
15
+ }
16
+
17
+
18
+ # Generate some images
19
+ for number in {1..50}
20
+ do
21
+ # Make some random text
22
+ pickword "${text_one[@]}"
23
+ TEXT=$UPDATE
24
+ pickword "${text_two[@]}"
25
+ TEXT+=" "$UPDATE
26
+ pickword "${text_three[@]}"
27
+ TEXT+=" "$UPDATE
28
+ pickword "${text_three[@]}"
29
+ TEXT+=" and a "$UPDATE
30
+ pickword "${styles[@]}"
31
+ TEXT+=" in the style of "$UPDATE
32
+ pickword "${styles[@]}"
33
+ TEXT+=" and "$UPDATE
34
+
35
+ python generate.py -p "$TEXT" -o "$number".png
36
+ done
37
+
38
+