Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Pataclop/Movinyl
Browse files Browse the repository at this point in the history
  • Loading branch information
niniack committed Apr 16, 2020
2 parents 0646faa + 418f9ef commit a0c3da5
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 22 deletions.
1 change: 1 addition & 0 deletions generate_infos.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def ecris (nom, police, saveName, taille):

raw=sys.argv[1]
raw=raw.replace("_", " ")
raw=raw.replace("\"", "")
word_list = raw.split()
year=word_list[-1]
length=len(raw)
Expand Down
16 changes: 8 additions & 8 deletions planche.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

def ecris (nom, police, taille, largeur):

para = textwrap.wrap(nom, width=largeur)
para = textwrap.wrap(nom, width=35)

MAX_W, MAX_H = largeur, largeur//10
MAX_W, MAX_H = largeur, largeur//5
im = PIL.Image.new('RGBA', (MAX_W, MAX_H), (0, 0, 0, 0))
draw = ImageDraw.Draw(im)

Expand Down Expand Up @@ -65,13 +65,13 @@ def faitou (im_number):
lines = f.readlines()
f.close()
count=0
l=5
h=5
l=18
h=10
for planche in range (im_number//(l*h)+1):
planche_name = "planche" + str(planche) + ".png"
L=10000
H=10000
out= PIL.Image.new('RGBA', (L,H), (0,0,0,255))
L=36000
H=20000
out= PIL.Image.new('RGBA', (L,H+H//50), (0,0,0,255))
positions=[0]*(2*l*h)
cmp = 0
resized_disk_size=int((8.5*L)/(l*10))
Expand All @@ -87,7 +87,7 @@ def faitou (im_number):
im = raw.convert("RGBA")
im_resize=im.resize((resized_disk_size,resized_disk_size), PIL.Image.LANCZOS) #we have l*h slots, we want the disk to be 90% of the size of the slot.
out.paste(im_resize, (positions[2*x],positions[2*x+1]), im_resize) #paste the disc at the right place
page_num=ecris(lines[count], 'futura medium bt.ttf', 50, int(L/l))
page_num=ecris(lines[count], 'futura medium bt.ttf', 45, int(L/l))

out.paste(page_num, (positions[2*x]-int((1.5*L)/(l*10))//2,positions[2*x+1]+int((8.4*L)/(l*10))), page_num)
print (x)
Expand Down
96 changes: 83 additions & 13 deletions reference/encyclopedia.txt
Original file line number Diff line number Diff line change
@@ -1,61 +1,97 @@
"12_Angry_Men_1957" 119 119 119 169 169 169 21 21 21 87 87 87 220 220 220
"2010_1984" 119 7 26 207 221 227 63 86 49 108 104 100 75 61 59
"2010_1984" 119 7 26 207 221 227 63 86 49 108 104 100 75 61 59
"28_Days_Later_2002" 12 10 7 37 27 14 146 132 109 54 52 41 59 44 18
"A_Bug's_Life_1998" 97 109 57 43 64 20 60 39 34 60 39 34 173 160 123
"A_Clockwork_Orange_1971" 154 26 49 191 192 195 145 119 108 129 127 130 69 68 73
"Alien_1978" 193 195 190 35 77 117 33 54 70 81 85 86 115 120 121
"Alien_3_1992" 36 37 41 79 58 42 107 110 118 108 93 83 193 149 115
"Aliens_1986" 34 51 53 14 15 16 72 75 76 26 58 73 67 16 15
"Amelie_2001" 184 176 137 147 121 60 81 58 14 64 65 23 103 95 45
"American_History_X_1998" 185 185 184 132 119 102 88 70 53 108 108 107 108 108 107
"American_Ultra_2015" 25 59 81 111 138 133 10 35 51 166 186 181 81 85 76
"Apocalypse_Now_1979" 179 161 121 96 102 99 126 101 63 44 53 54 221 163 108
"Apollo_13_1995" 179 188 195 127 109 100 105 91 82 32 26 22 84 85 84
"Apollo_13_1995" 126 127 133 85 82 80 75 62 53 74 73 71 62 40 29
"Arrival_2016" 99 107 103 21 36 38 58 73 76 81 72 59 203 208 209
"Avatar_2009" 74 72 115 18 42 76 57 93 57 43 68 86 132 146 146
"Avengers_Infinity_War_2018" 107 78 62 57 61 73 106 98 91 85 83 84 186 187 186
"Baby_Driver_2017" 125 122 111 43 58 59 84 77 65 60 63 58 73 60 47
"Back_to_the_Future_1985" 175 179 183 115 97 86 53 44 43 77 74 76 161 156 151
"Back_to_the_Future_Part_II_1989" 199 191 209 89 101 120 133 127 129 75 68 65 56 67 87
"Bambi_1942" 193 71 12 223 206 201 53 85 84 104 115 137 120 113 99
"Beneath_the_Planet_of_the_Apes_1970" 136 153 167 76 87 60 76 64 54 81 79 72 113 107 100
"Big_Hero_6_2014" 97 87 167 164 123 127 185 188 196 173 159 154 98 111 142
"Blade_Runner_1982" 43 37 25 140 177 171 73 63 43 43 97 102 99 97 80
"Blade_Runner_1982" 164 107 37 177 184 167 150 159 146 130 75 20 39 57 46
"Blade_Runner_2049_2017" 164 107 37 177 184 167 150 159 146 130 75 20 39 57 46
"Brave_2012" 84 58 30 72 37 14 116 114 109 27 26 24 102 93 79
"Brice_3_2016" 242 212 89 171 177 170 134 114 72 95 133 97 47 37 19
"Brother_Bear_2003" 174 85 34 21 71 94 82 48 25 93 95 107 137 128 134
"Captain_America_The_First_Avenger_2011" 95 76 63 28 35 40 58 39 30 73 78 80 109 105 100
"Cars_2006" 162 106 75 209 218 221 159 161 166 190 168 155 117 115 123
"Cars_3_2017" 31 135 72 170 151 141 175 180 190 92 68 61 70 80 129
"Chicken_Run_2000" 21 28 46 80 47 26 38 35 30 111 104 96 52 59 65
"Cinderella_1950" 155 173 186 120 100 97 63 83 102 144 137 134 38 53 71
"Cinema_Paradiso_1988" 186 188 186 130 122 112 91 90 89 60 55 51 78 65 53
"Cobra_1986" 95 24 26 92 88 88 35 36 39 66 57 54 51 51 53
"Contact_1997" 170 177 186 75 66 108 135 132 134 72 74 84 71 59 53
"Crocodile_Dundee_in_Los_Angeles_2001" 119 123 96 115 124 145 106 98 92 59 48 37 149 148 156
"Dawn_of_the_Planet_of_the_Apes_2014" 39 62 63 18 34 32 33 47 44 59 45 27 113 126 124
"Deadpool_2_2018" 176 179 171 53 125 125 162 142 113 105 121 120 26 50 54
"Deepwater_Horizon_2016" 18 62 40 118 63 31 198 137 45 18 68 74 221 245 225
"Delicatessen_1991" 104 84 44 78 49 21 183 151 95 147 96 42 116 62 23
"District_9_2009" 204 204 193 123 125 119 155 152 142 27 34 30 125 116 106
"Despicable_Me_2010" 129 159 175 99 73 64 142 118 98 87 126 159 74 42 37
"Dinosaur_2000" 18 31 47 144 118 71 78 80 66 48 33 14 77 94 62
"District_9_2009" 204 204 193 123 125 119 155 152 142 27 34 30 125 116 106
"Django_Unchained_2012" 77 46 28 172 153 134 137 135 139 133 114 29 32 18 15
"Dumbo_1941" 116 149 158 134 96 50 24 67 108 140 123 91 128 129 83
"Dune_1984" 236 225 203 212 179 146 88 89 84 129 127 116 49 45 39
"Eddie_the_Eagle_2016" 154 155 138 49 43 35 92 87 74 137 135 118 76 52 28
"Enter_the_Void_2009" 102 21 16 7 1 0 92 31 122 196 179 152 21 42 19
"Eternal_Sunshine_of_the_Spotless_Mind_2004" 151 146 145 125 134 140 83 86 93 77 62 56 139 121 117
"Everest_2015" 166 186 187 29 53 66 121 118 109 139 140 132 90 110 116
"Ex_Machina_2015" 74 91 82 34 44 40 63 13 12 117 135 132 85 78 63
"Fantasia_2000_1999" 25 56 126 102 65 52 46 126 155 53 28 31 128 99 86
"Fight_Club_1999" 137 151 140 53 74 71 92 100 81 55 56 39 18 28 24
"Finding_Dory_2016" 59 170 188 30 67 91 52 87 108 22 33 39 49 52 55
"Forrest_Gump_1994" 65 82 48 90 85 74 198 205 211 32 26 24 97 96 89
"Frozen_2013" 66 135 188 127 124 187 163 177 210 57 73 151 107 99 106
"Full_Metal_Jacket_1987" 239 242 244 139 136 132 92 88 81 68 86 104 35 54 73
"Fury_2014" 139 163 169 69 88 103 43 51 61 51 24 3 59 62 66
"Gattaca_1997" 39 115 203 162 130 79 23 39 26 104 77 39 59 57 56
"Gone_with_the_Wind_1939" 97 80 70 76 60 48 76 33 17 62 49 38 59 26 13
"GoodFellas_1990" 90 48 40 116 108 100 65 38 30 85 79 74 49 21 17 66 56 50
"Hard_Candy_2005" 78 91 92 191 142 115 168 179 177 118 97 80 39 98 99
"Her_2013" 129 60 45 178 154 132 127 111 91 27 23 17 62 76 67
"Harry_Potter_and_the_Chamber_of_Secrets_2002" 25 34 39 80 77 68 76 54 35 97 101 98 58 50 39
"Harry_Potter_and_the_Deathly_Hallows_Part_1_2010" 85 92 80 48 47 38 56 62 54 25 25 21 75 74 58
"Harry_Potter_and_the_Deathly_Hallows_Part_2_2011" 14 19 14 100 119 99 143 166 140 22 28 21 52 67 58
"Harry_Potter_and_the_Goblet_of_Fire_2005" 22 38 44 47 55 50 85 98 90 14 27 32 62 72 65
"Harry_Potter_and_the_Half-Blood_Prince_2009" 28 33 28 144 162 160 74 77 70 13 19 17 54 42 25
"Harry_Potter_and_the_Order_of_the_Phoenix_2007" 13 29 38 94 75 83 26 34 37 53 45 42 45 64 69
"Harry_Potter_and_the_Sorcerer's_Stone_2001" 16 34 64 143 93 53 118 109 95 55 40 26 55 49 42
"Hellboy_II_The_Golden_Army_2008" 99 53 20 56 49 40 33 60 65 63 32 12 16 40 49
"Her_2013" 129 60 45 178 154 132 127 111 91 27 23 17 62 76 67
"Hook_1991" 161 155 164 82 55 45 115 113 127 70 72 91 114 88 79
"Horton_Hears_a_Who_2008" 139 170 196 156 108 134 165 146 124 168 167 164 70 72 60
"Howl's_Moving_Castle_2004" 133 148 107 116 151 141 97 64 46 38 39 40 118 120 89
"Ice_Age_2002" 35 94 117 140 173 201 122 92 82 106 102 106 94 72 69
"Inception_2010" 129 131 127 100 89 77 86 89 88 82 64 48 65 65 63 39 27 20
"Independence_Day_1996" 46 62 67 127 125 116 28 39 43 111 102 86 62 61 55
"Independence_Day_Resurgence_2016" 6 18 26 29 63 73 90 93 81 61 89 92 142 155 144
"Inside_Out_2015" 107 61 190 137 119 135 158 92 138 214 192 198 243 240 243
"Joy_2015" 71 82 99 56 56 57 123 104 78 93 79 67 113 115 118
"Jumanji_1995" 76 72 57 36 55 27 58 62 60 103 102 92 151 158 153
"Jurassic_Park_1993" 28 41 72 115 96 89 169 158 159 97 96 102 118 109 109
"Kick-Ass_2010" 197 199 196 175 151 119 179 137 88 82 90 85 89 153 138
"Kill_Bill:_Vol._I_2003" 42 114 105 30 78 56 63 47 34 182 177 143 192 194 172
"Kill_Bill:_Vol._II_2004" 5 6 2 180 166 124 231 232 230 105 107 99 89 68 42
"Kill_Bill:_Vol._1_2003" 42 114 105 30 78 56 63 47 34 182 177 143 192 194 172
"Kill_Bill:_Vol._2_2004" 5 6 2 180 166 124 231 232 230 105 107 99 89 68 42
"Kong_Skull_Island_2017" 153 139 86 69 26 16 187 189 102 167 171 152 86 75 45
"La_Femme_Nikita_1990" 146 165 159 66 55 39 27 44 94 58 76 57 89 113 108
"Leon_The_Professional_1994" 70 55 37 159 142 111 91 73 51 183 168 144 30 24 19
"Mad_Max_Fury_Road_2015" 17 78 124 145 104 70 151 124 106 180 147 126 224 204 204
"Metropolis_2001" 79 84 91 153 110 74 138 49 29 176 175 182 101 48 26
"Million_Dollar_Baby_2004" 118 126 116 64 72 64 68 90 86 87 115 111 171 176 160
"Moana_2016" 169 113 145 104 239 203 175 150 130 47 77 121 184 202 209
"Monsters_University_2013" 38 22 69 133 118 90 68 76 95 63 36 25 178 180 169
"Monsters_Inc_2001" 34 64 107 183 136 105 142 125 120 78 50 47 115 130 151
"Monsters_University_2013" 38 22 69 133 118 90 68 76 95 63 36 25 178 180 169
"Mrs_Doubtfire_1993" 159 154 152 56 45 42 100 86 76 188 182 180 130 122 117
"Nausicaa_of_the_Valley_of_the_Wind_1984" 203 165 79 122 150 155 190 184 159 107 82 66 89 132 151
"Nemo_2003" 212 154 118 145 200 207 159 149 228 56 171 215 42 81 120
Expand All @@ -75,30 +111,52 @@
"Shrek_the_Third_2007" 128 130 181 44 34 28 102 58 41 164 130 110 177 158 194
"Shutter_Island_2010" 75 89 54 86 98 75 69 87 85 106 104 89 39 47 43
"Sicario_2015" 169 170 157 137 126 88 30 43 45 92 84 59 89 93 83
"Spider_Man_2002" 127 143 165 169 159 157 135 109 99 107 99 99 64 55 54
"Sin_City_A_Dame_to_Kill_For_2014" 74 74 74 114 114 114 56 55 55 38 38 38 21 21 21
"Spider-Man_2002" 101 115 142 138 122 116 82 75 76 56 53 56 69 52 47
"Spirited_Away_2001" 110 127 73 117 84 70 99 52 38 143 146 119 99 52 38
"Star_Trek_Into_Darkness_2013" 142 32 13 80 162 166 98 46 64 7 90 119 148 174 180
"Star_Wars_Episode_II_Attack_of_the_Clones_2002" 183 128 91 178 190 189 104 79 60 87 93 94 66 70 71
"Star_Wars_Episode_III_Revenge_of_the_Sith_2005" 169 20 19 44 36 90 95 95 101 121 111 102 41 40 45
"Star_Wars_Episode_IV_A_New_Hope_1977" 9 44 125 248 255 255 106 157 213 162 142 133 45 38 41
"Star_Wars_Episode_VII_The_Force_Awakens_2015" 9 44 125 139 139 152 72 2 14 162 190 198 3 8 10
"Stuart_Little_1999" 68 55 31 116 112 119 81 48 31 112 85 66 83 72 69
"Superbad_2007" 160 144 116 176 172 160 138 132 124 94 90 86 72 58 47
"Tangled_2010" 96 143 146 61 41 44 30 61 68 3 19 70 114 101 101
"Tarzan_1999" 114 100 59 21 27 48 126 102 65 57 76 78 71 74 62
"Terminator_Salvation_2009" 55 54 47 159 167 161 52 63 60 107 114 109 66 70 65
"The_Abyss_1989" 78 109 193 103 106 98 63 113 127 47 71 80 24 67 98
"The_Beach_2000" 81 93 57 50 47 40 129 130 120 74 91 98 33 32 30
"The_Big_Lebowski_1998" 175 162 158 151 114 101 102 93 92 30 23 26 91 76 73
"The_Big_Short_2015" 202 198 202 150 152 156 96 90 88 57 57 58 89 101 109
"The_Book_of_Life_2014" 187 163 126 136 79 93 86 39 58 53 52 82 163 75 49
"The_Brice_Man_2005" 180 181 148 177 160 79 120 121 90 75 71 41 130 112 57
"The_Chronicles_of_Narnia:_The_Lion,_the_Witch_and_the_Wardrobe_2005" 111 108 108 107 86 62 6 54 63 53 47 38 28 19 9
"The_Fifth_Element_1997" 113 77 140 82 59 40 122 102 85 64 56 57 53 63 84
"The_Founder_2016" 203 203 185 137 139 117 62 65 52 118 117 97 50 54 44
"The_Fox_and_the_Hound_1981" 128 147 141 104 89 67 147 168 170 69 91 98 94 111 110
"The_Girl_Who_Kicked_the_Hornet's_Nest_2009" 108 89 51 40 27 18 74 72 71 77 62 43 114 112 111
"The_Girl_Who_Played_with_Fire_2009" 148 136 119 83 85 83 99 82 65 116 115 109 50 34 21
"The_Godfather_1972" 201 192 177 155 135 116 69 49 35 39 29 20 117 102 87
"The_Godfather_Part_2_1974" 157 162 162 138 102 76 131 117 110 68 48 37 161 134 113
"The_Godfather_Part_3_1990" 98 65 59 133 100 90 84 62 56 170 141 126 36 23 20
"The_Good_the_Bad_and_the_Ugly_1966" 203 213 229 158 162 178 99 98 108 84 73 72 155 94 87
"The_Godfather:_Part_II_1974" 157 162 162 138 102 76 131 117 110 68 48 37 161 134 113
"The_Godfather:_Part_III_1990" 98 65 59 133 100 90 84 62 56 170 141 126 36 23 20
"The_Golden_Compass_2007" 10 44 61 85 103 112 91 81 63 108 101 84 165 170 143
"The_Good,_the_Bad_and_the_Ugly_1966" 203 213 229 158 162 178 99 98 108 84 73 72 155 94 87
"The_Great_Gatsby_2013" 69 52 44 129 123 112 58 59 57 105 84 75 92 91 85
"The_Great_Mouse_Detective_1986" 108 78 97 43 60 80 34 77 122 82 72 88 75 51 47
"The_Hateful_Eight_2015" 99 110 117 161 182 188 70 103 121 41 39 44 15 7 18
"The_Hunger_Games_Mockingjay_Part_1_2014" 148 173 173 113 105 85 64 59 42 88 104 101 45 51 47
"The_Hunchback_of_Notre_Dame_1996" 16 32 103 172 87 29 95 92 110 79 49 41 67 71 95
"The_Hunger_Games_2012" 119 112 123 38 55 68 76 49 37 74 83 85 47 62 63
"The_Hunger_Games_Mockingjay_-_Part_1_2014" 102 128 127 56 40 16 36 44 40 68 80 77 70 65 51
"The_Hunger_Games_Mockingjay_-_Part_2_2015" 96 60 21 67 98 112 115 128 125 57 44 28 44 57 63
"The_Jungle_Book_1967" 160 184 118 25 65 113 116 109 81 144 148 129 92 91 67
"The_King's_Speech_2010" 102 122 124 55 61 66 45 41 41 31 25 27 95 101 105
"The_Lord_of_the_Rings_The_Fellowship_of_the_Ring_2001" 41 86 72 77 130 128 106 89 61 73 74 46 17 40 44
"The_Martian_2015" 139 92 57 92 96 102 95 69 49 178 174 189 174 96 50
"The_Matrix_Revolutions_2003" 56 93 52 40 59 84 41 82 169 83 137 101 70 77 58
"The_Prestige_2006" 109 116 122 62 64 64 51 47 42 30 34 35 35 28 20
"The_Silence_of_the_Lambs_1991" 134 79 53 99 99 98 44 30 21 85 82 78 25 31 30
"The_Simpsons_Movie_2007" 67 160 156 187 121 88 170 146 95 130 92 58 72 130 116
"The_Social_Network_2010" 14 12 6 107 92 62 89 68 32 57 60 50 85 93 83
"The_Terminator_1984" 171 116 53 18 48 60 72 108 112 119 131 124 84 79 70
"The_Wolf_of_Wall_Street_2013" 208 206 199 147 137 131 105 99 98 117 94 84 48 39 37
"The_Wolverine_2013" 199 191 188 119 99 84 97 93 91 64 72 77 30 32 36
Expand All @@ -107,10 +165,22 @@
"Toy_Story_1995" 75 59 111 176 151 124 43 65 102 220 201 149 135 109 89
"Toy_Story_2_1999" 67 83 119 103 113 141 190 169 155 103 67 52 158 106 77
"Toy_Story_3_2010" 103 111 58 36 49 67 154 143 122 173 122 88 125 126 145
"Treasure_Planet_2002" 146 102 86 42 46 78 106 37 20 105 99 125 28 20 53
"Underworld_2003" 7 11 16 34 54 70 58 72 82 30 40 47 44 57 63
"Underworld_Awakening_2012" 0 0 0 44 68 73 14 19 20 14 41 49 54 88 95 8 24 29 73 114 120
"Underworld_Evolution_2006" 101 132 130 77 78 71 29 63 67 8 32 36 41 75 80
"Underworld_Rise_of_the_Lycans_2009" 9 31 39 57 71 70 228 190 133 12 20 23 44 48 45
"Up_2009" 172 132 157 153 172 197 185 164 160 138 118 106 87 89 94
"V_for_Vendetta_2005" 32 53 69 88 64 37 89 102 108 22 21 18 51 62 70
"WALL_E_2008" 95 145 161 211 197 180 94 108 120 143 117 100 91 63 50
"Wanted_2008" 131 134 126 78 70 58 49 40 31 76 80 74 61 48 36
"Warrior_2011" 85 67 40 135 154 146 76 91 86 20 17 13 60 72 68
"Wild_Wild_West_1999" 50 36 25 73 57 47 99 102 123 51 52 64 31 22 17
"Wreck-It_Ralph_2012" 194 158 148 153 162 142 132 71 64 164 96 85 73 33 27
"X_Men_Dark_Phoenix_2019" 132 123 58 133 127 117 107 94 74 72 74 73 48 38 25
"X_Men_Origins_Wolverine_2009" 168 168 167 64 71 67 70 57 46 157 133 131 56 81 76
"X_Men_The_Last_Stand_2006" 25 96 92 86 109 118 81 75 68 125 90 60 147 158 162
"X-Men_Days_of_Future_Past_2014" 208 183 134 4 2 36 74 91 96 100 91 70 74 91 96
"Yes_Man_2008" 33 42 57 126 110 92 152 139 123 191 189 184 64 54 48
"Zombieland_2009" 126 123 116 89 68 43 72 53 32 78 73 65 55 39 23
"Zootopia_2016" 180 143 128 86 87 98 24 54 86 49 42 43 193 168 164
4 changes: 3 additions & 1 deletion src/page/page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ void insert_in_frame(std::string name, int aa1, int aa2, int aa3,int aa4,int aa5

int main(int argc, char const *argv[])
{
insert_in_frame(argv[1],
std::string name = argv[1];
name.erase(std::remove(name.begin(), name.end(), '\"'), name.end());
insert_in_frame(name,
atoi(argv[2]),
atoi(argv[3]),
atoi(argv[4]),
Expand Down

0 comments on commit a0c3da5

Please sign in to comment.