From 0b7bac1a7ae53d91a9637d3463c8cae2936da16a Mon Sep 17 00:00:00 2001 From: LostQuasar Date: Wed, 17 Aug 2022 20:37:48 -0400 Subject: [PATCH] Shrink svg files --- assets/eyes/left/base.svg | 5 ++-- assets/eyes/left/evil.svg | 5 ++-- assets/eyes/left/happy.svg | 5 ++-- assets/eyes/left/small.svg | 11 ++++---- assets/eyes/left/squint.svg | 5 ++-- assets/eyes/right/base.svg | 5 ++-- assets/eyes/right/evil.svg | 5 ++-- assets/eyes/right/happy.svg | 5 ++-- assets/eyes/right/small.svg | 9 +++---- assets/eyes/right/squint.svg | 5 ++-- assets/flag/flag_ace.svg | 11 +++----- assets/flag/flag_agender.svg | 11 +++----- assets/flag/flag_demisexual.svg | 9 +++---- assets/flag/flag_enby.svg | 11 +++----- assets/flag/flag_pan.svg | 7 +++-- assets/flag/flag_progress.svg | 23 ++++++++--------- assets/flag/flag_trans.svg | 9 +++---- assets/fur/arcticfox/base.svg | 17 ++++++------ assets/fur/arcticfox/snug.svg | 19 +++++++------- assets/fur/cat/base.svg | 20 +++++--------- assets/fur/fox/base.svg | 15 +++++------ assets/fur/fox/snug.svg | 17 ++++++------ assets/hand/arcticfox/big_left.svg | 5 ++-- assets/hand/arcticfox/big_right.svg | 5 ++-- assets/hand/arcticfox/left.svg | 5 ++-- assets/hand/arcticfox/right.svg | 5 ++-- assets/hand/cat/big_left.svg | 5 ++-- assets/hand/cat/big_right.svg | 5 ++-- assets/hand/cat/left.svg | 5 ++-- assets/hand/cat/right.svg | 5 ++-- assets/hand/fox/big_left.svg | 5 ++-- assets/hand/fox/big_right.svg | 5 ++-- assets/hand/fox/left.svg | 5 ++-- assets/hand/fox/right.svg | 5 ++-- assets/holding/crowbar.svg | 12 +++------ assets/holding/cup.svg | 11 +++----- assets/holding/cup_liquid/coffee.svg | 5 ++-- assets/holding/cup_liquid/hot_coco.svg | 5 ++-- assets/holding/egg.svg | 9 +++---- assets/holding/heart.svg | 7 +++-- assets/holding/knife.svg | 13 +++++----- assets/mouth/cat/w_mouth.svg | 5 ++-- assets/mouth/fox/w_mouth.svg | 5 ++-- assets/nose/fox/base.svg | 7 +++-- assets/nose/fox/evil.svg | 7 +++-- assets/nose/fox/happy.svg | 7 +++-- assets/nose/fox/squint.svg | 7 +++-- assets/overlay/blanket.svg | 7 +++-- assets/overlay/blanket_ear/arcticfox.svg | 7 +++-- assets/overlay/blanket_ear/cat.svg | 7 +++-- assets/overlay/blanket_ear/fox.svg | 7 +++-- assets/overlay/blush.svg | 28 +++++++++----------- assets/overlay/boop_hand.svg | 5 ++-- assets/overlay/steam.svg | 5 ++-- assets/overlay/zzz.svg | 9 +++---- src/main.py | 33 ++++++++++++------------ 56 files changed, 208 insertions(+), 289 deletions(-) diff --git a/assets/eyes/left/base.svg b/assets/eyes/left/base.svg index c688088..4ae8a46 100644 --- a/assets/eyes/left/base.svg +++ b/assets/eyes/left/base.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/eyes/left/evil.svg b/assets/eyes/left/evil.svg index 533c4bc..13d1ab9 100644 --- a/assets/eyes/left/evil.svg +++ b/assets/eyes/left/evil.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/eyes/left/happy.svg b/assets/eyes/left/happy.svg index d504e20..015c2ea 100644 --- a/assets/eyes/left/happy.svg +++ b/assets/eyes/left/happy.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/eyes/left/small.svg b/assets/eyes/left/small.svg index 4bcabeb..3d26830 100644 --- a/assets/eyes/left/small.svg +++ b/assets/eyes/left/small.svg @@ -1,7 +1,6 @@ - - - - - - + + + + + diff --git a/assets/eyes/left/squint.svg b/assets/eyes/left/squint.svg index 27a5a27..268ac95 100644 --- a/assets/eyes/left/squint.svg +++ b/assets/eyes/left/squint.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/eyes/right/base.svg b/assets/eyes/right/base.svg index 7dd15ac..6cd9f9e 100644 --- a/assets/eyes/right/base.svg +++ b/assets/eyes/right/base.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/eyes/right/evil.svg b/assets/eyes/right/evil.svg index 2098272..45357ba 100644 --- a/assets/eyes/right/evil.svg +++ b/assets/eyes/right/evil.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/eyes/right/happy.svg b/assets/eyes/right/happy.svg index d7b5a8c..597368b 100644 --- a/assets/eyes/right/happy.svg +++ b/assets/eyes/right/happy.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/eyes/right/small.svg b/assets/eyes/right/small.svg index 365c0df..fb2322f 100644 --- a/assets/eyes/right/small.svg +++ b/assets/eyes/right/small.svg @@ -1,7 +1,4 @@ - - - - - - + + + diff --git a/assets/eyes/right/squint.svg b/assets/eyes/right/squint.svg index 5b4cdcd..f389ab1 100644 --- a/assets/eyes/right/squint.svg +++ b/assets/eyes/right/squint.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/flag/flag_ace.svg b/assets/flag/flag_ace.svg index 38b0d58..8c89ac6 100644 --- a/assets/flag/flag_ace.svg +++ b/assets/flag/flag_ace.svg @@ -1,9 +1,6 @@ - - - - - - - + + + + diff --git a/assets/flag/flag_agender.svg b/assets/flag/flag_agender.svg index 298d6f4..4dfed43 100644 --- a/assets/flag/flag_agender.svg +++ b/assets/flag/flag_agender.svg @@ -1,9 +1,6 @@ - - - - - - - + + + + diff --git a/assets/flag/flag_demisexual.svg b/assets/flag/flag_demisexual.svg index 8def0a5..e547c82 100644 --- a/assets/flag/flag_demisexual.svg +++ b/assets/flag/flag_demisexual.svg @@ -1,7 +1,6 @@ - - - - - + + + + diff --git a/assets/flag/flag_enby.svg b/assets/flag/flag_enby.svg index 43d87ab..4d1ffe9 100644 --- a/assets/flag/flag_enby.svg +++ b/assets/flag/flag_enby.svg @@ -1,9 +1,6 @@ - - - - - - - + + + + diff --git a/assets/flag/flag_pan.svg b/assets/flag/flag_pan.svg index 6a821d5..0ca5094 100644 --- a/assets/flag/flag_pan.svg +++ b/assets/flag/flag_pan.svg @@ -1,6 +1,5 @@ - - - - + + + diff --git a/assets/flag/flag_progress.svg b/assets/flag/flag_progress.svg index dd6ca14..c29defa 100644 --- a/assets/flag/flag_progress.svg +++ b/assets/flag/flag_progress.svg @@ -1,14 +1,13 @@ - - - - - - - - - - - - + + + + + + + + + + + diff --git a/assets/flag/flag_trans.svg b/assets/flag/flag_trans.svg index d2d486f..7eb76ed 100644 --- a/assets/flag/flag_trans.svg +++ b/assets/flag/flag_trans.svg @@ -1,8 +1,5 @@ - - - - - - + + + diff --git a/assets/fur/arcticfox/base.svg b/assets/fur/arcticfox/base.svg index 1ed9328..2645995 100644 --- a/assets/fur/arcticfox/base.svg +++ b/assets/fur/arcticfox/base.svg @@ -1,11 +1,10 @@ - - - - - - - - - + + + + + + + + diff --git a/assets/fur/arcticfox/snug.svg b/assets/fur/arcticfox/snug.svg index 533c6bc..ab28cf8 100644 --- a/assets/fur/arcticfox/snug.svg +++ b/assets/fur/arcticfox/snug.svg @@ -1,12 +1,11 @@ - - - - - - - - - - + + + + + + + + + diff --git a/assets/fur/cat/base.svg b/assets/fur/cat/base.svg index 97ca7a4..d7291ee 100644 --- a/assets/fur/cat/base.svg +++ b/assets/fur/cat/base.svg @@ -1,15 +1,9 @@ - - - - - - - + + + + + + - - - - - - + diff --git a/assets/fur/fox/base.svg b/assets/fur/fox/base.svg index 9cfc53f..4c3d44e 100644 --- a/assets/fur/fox/base.svg +++ b/assets/fur/fox/base.svg @@ -1,10 +1,9 @@ - - - - - - - - + + + + + + + diff --git a/assets/fur/fox/snug.svg b/assets/fur/fox/snug.svg index acfa0d0..2af1a63 100644 --- a/assets/fur/fox/snug.svg +++ b/assets/fur/fox/snug.svg @@ -1,11 +1,10 @@ - - - - - - - - - + + + + + + + + diff --git a/assets/hand/arcticfox/big_left.svg b/assets/hand/arcticfox/big_left.svg index 3384437..c227f7f 100644 --- a/assets/hand/arcticfox/big_left.svg +++ b/assets/hand/arcticfox/big_left.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/hand/arcticfox/big_right.svg b/assets/hand/arcticfox/big_right.svg index 3f6aeb3..2047658 100644 --- a/assets/hand/arcticfox/big_right.svg +++ b/assets/hand/arcticfox/big_right.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/hand/arcticfox/left.svg b/assets/hand/arcticfox/left.svg index f3b94a2..a5d1c64 100644 --- a/assets/hand/arcticfox/left.svg +++ b/assets/hand/arcticfox/left.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/hand/arcticfox/right.svg b/assets/hand/arcticfox/right.svg index 828dfae..d58b553 100644 --- a/assets/hand/arcticfox/right.svg +++ b/assets/hand/arcticfox/right.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/hand/cat/big_left.svg b/assets/hand/cat/big_left.svg index 4c4c915..5793d85 100644 --- a/assets/hand/cat/big_left.svg +++ b/assets/hand/cat/big_left.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/hand/cat/big_right.svg b/assets/hand/cat/big_right.svg index 084ddbc..c8d5c60 100644 --- a/assets/hand/cat/big_right.svg +++ b/assets/hand/cat/big_right.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/hand/cat/left.svg b/assets/hand/cat/left.svg index f310fc7..d7547da 100644 --- a/assets/hand/cat/left.svg +++ b/assets/hand/cat/left.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/hand/cat/right.svg b/assets/hand/cat/right.svg index e40a39a..de0c716 100644 --- a/assets/hand/cat/right.svg +++ b/assets/hand/cat/right.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/hand/fox/big_left.svg b/assets/hand/fox/big_left.svg index 5a4760f..eabd2c5 100644 --- a/assets/hand/fox/big_left.svg +++ b/assets/hand/fox/big_left.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/hand/fox/big_right.svg b/assets/hand/fox/big_right.svg index f2eea3b..50dd0c4 100644 --- a/assets/hand/fox/big_right.svg +++ b/assets/hand/fox/big_right.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/hand/fox/left.svg b/assets/hand/fox/left.svg index c16d93c..19363d3 100644 --- a/assets/hand/fox/left.svg +++ b/assets/hand/fox/left.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/hand/fox/right.svg b/assets/hand/fox/right.svg index 52d57fd..b8171d1 100644 --- a/assets/hand/fox/right.svg +++ b/assets/hand/fox/right.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/holding/crowbar.svg b/assets/holding/crowbar.svg index fbbd3bf..5313100 100644 --- a/assets/holding/crowbar.svg +++ b/assets/holding/crowbar.svg @@ -1,9 +1,5 @@ - - - - - - - - + + + + diff --git a/assets/holding/cup.svg b/assets/holding/cup.svg index c238f92..45db395 100644 --- a/assets/holding/cup.svg +++ b/assets/holding/cup.svg @@ -1,8 +1,5 @@ - - - - - - - + + + + diff --git a/assets/holding/cup_liquid/coffee.svg b/assets/holding/cup_liquid/coffee.svg index 1f290ac..6eac667 100644 --- a/assets/holding/cup_liquid/coffee.svg +++ b/assets/holding/cup_liquid/coffee.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/holding/cup_liquid/hot_coco.svg b/assets/holding/cup_liquid/hot_coco.svg index b3a494a..39f5408 100644 --- a/assets/holding/cup_liquid/hot_coco.svg +++ b/assets/holding/cup_liquid/hot_coco.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/holding/egg.svg b/assets/holding/egg.svg index d38135b..099aace 100644 --- a/assets/holding/egg.svg +++ b/assets/holding/egg.svg @@ -1,7 +1,4 @@ - - - - - - + + + diff --git a/assets/holding/heart.svg b/assets/holding/heart.svg index 067f2f0..7a65e77 100644 --- a/assets/holding/heart.svg +++ b/assets/holding/heart.svg @@ -1,5 +1,4 @@ - - - - + + + diff --git a/assets/holding/knife.svg b/assets/holding/knife.svg index 8880ed7..03dbe43 100644 --- a/assets/holding/knife.svg +++ b/assets/holding/knife.svg @@ -1,9 +1,8 @@ - - - - - - - + + + + + + diff --git a/assets/mouth/cat/w_mouth.svg b/assets/mouth/cat/w_mouth.svg index 03bb2dc..a04f745 100644 --- a/assets/mouth/cat/w_mouth.svg +++ b/assets/mouth/cat/w_mouth.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/mouth/fox/w_mouth.svg b/assets/mouth/fox/w_mouth.svg index fd43ca8..646c1db 100644 --- a/assets/mouth/fox/w_mouth.svg +++ b/assets/mouth/fox/w_mouth.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/nose/fox/base.svg b/assets/nose/fox/base.svg index 5ad7e47..3e20c8a 100644 --- a/assets/nose/fox/base.svg +++ b/assets/nose/fox/base.svg @@ -1,5 +1,4 @@ - - - - + + + diff --git a/assets/nose/fox/evil.svg b/assets/nose/fox/evil.svg index b0995c1..baf0b61 100644 --- a/assets/nose/fox/evil.svg +++ b/assets/nose/fox/evil.svg @@ -1,5 +1,4 @@ - - - - + + + diff --git a/assets/nose/fox/happy.svg b/assets/nose/fox/happy.svg index 9f10d8f..1af922c 100644 --- a/assets/nose/fox/happy.svg +++ b/assets/nose/fox/happy.svg @@ -1,5 +1,4 @@ - - - - + + + diff --git a/assets/nose/fox/squint.svg b/assets/nose/fox/squint.svg index c5f42f9..9ecdaca 100644 --- a/assets/nose/fox/squint.svg +++ b/assets/nose/fox/squint.svg @@ -1,5 +1,4 @@ - - - - + + + diff --git a/assets/overlay/blanket.svg b/assets/overlay/blanket.svg index 06defa4..c98a451 100644 --- a/assets/overlay/blanket.svg +++ b/assets/overlay/blanket.svg @@ -1,5 +1,4 @@ - - - - + + + diff --git a/assets/overlay/blanket_ear/arcticfox.svg b/assets/overlay/blanket_ear/arcticfox.svg index 4fd286d..002d991 100644 --- a/assets/overlay/blanket_ear/arcticfox.svg +++ b/assets/overlay/blanket_ear/arcticfox.svg @@ -1,5 +1,4 @@ - - - - + + + diff --git a/assets/overlay/blanket_ear/cat.svg b/assets/overlay/blanket_ear/cat.svg index f9c2583..6ef3c54 100644 --- a/assets/overlay/blanket_ear/cat.svg +++ b/assets/overlay/blanket_ear/cat.svg @@ -1,5 +1,4 @@ - - - - + + + diff --git a/assets/overlay/blanket_ear/fox.svg b/assets/overlay/blanket_ear/fox.svg index 7eee6e2..4376bda 100644 --- a/assets/overlay/blanket_ear/fox.svg +++ b/assets/overlay/blanket_ear/fox.svg @@ -1,5 +1,4 @@ - - - - + + + diff --git a/assets/overlay/blush.svg b/assets/overlay/blush.svg index 380a3fb..bf7221c 100644 --- a/assets/overlay/blush.svg +++ b/assets/overlay/blush.svg @@ -1,20 +1,16 @@ - - - - - - - + + + + + + + + - - - - - - - - - + + + + diff --git a/assets/overlay/boop_hand.svg b/assets/overlay/boop_hand.svg index 6b1e49d..68c58d0 100644 --- a/assets/overlay/boop_hand.svg +++ b/assets/overlay/boop_hand.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/overlay/steam.svg b/assets/overlay/steam.svg index 8b1d9a5..613626f 100644 --- a/assets/overlay/steam.svg +++ b/assets/overlay/steam.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/assets/overlay/zzz.svg b/assets/overlay/zzz.svg index 58e68db..7eb0311 100644 --- a/assets/overlay/zzz.svg +++ b/assets/overlay/zzz.svg @@ -1,6 +1,5 @@ - - - - - + + + + diff --git a/src/main.py b/src/main.py index 957cbe5..413f16a 100644 --- a/src/main.py +++ b/src/main.py @@ -4,26 +4,25 @@ import toml CONFIG["svg.file_path"] = "../assets/" - with open("../definitions.toml", "r") as def_file: - definitions = toml.loads(def_file.read()) + definitions = toml.loads(def_file.read()) with open("../designs.toml", "r") as design_file: - designs = toml.loads(design_file.read()) + designs = toml.loads(design_file.read()) partsList = [] for key in designs: - currentDesign = designs[key] - for part in currentDesign: - for url in definitions[part]: - partsList.append(url) - svg_parts = [] - for part in partsList: - svg_parts.append(SVG(part)) - Figure( - "128", - "128", - *svg_parts, - SVG("credits.svg") - ).save("../output/vector/"+key+".svg") - svg2png(url="../output/vector/"+key+".svg", write_to="../output/512/"+key+".png", output_width=512) + currentDesign = designs[key] + for part in currentDesign: + for url in definitions[part]: + partsList.append(url) + svg_parts = [] + for part in partsList: + svg_parts.append(SVG(part)) + Figure( + "128", + "128", + *svg_parts, + SVG("credits.svg") + ).save("../output/vector/"+key+".svg") + svg2png(url="../output/vector/"+key+".svg", write_to="../output/512/"+key+".png", output_width=512) print("Done!") \ No newline at end of file