Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
Riesi | 7a0cf0a5ee | |
Stefan Riesenberger | 84948470e0 | |
Stefan Riesenberger | 9e3046e544 | |
Stefan Riesenberger | 23d453a91f |
|
@ -1,3 +1,8 @@
|
|||
# This repository is abandoned!
|
||||
# New repository at https://github.com/Riesi/frog_emojis
|
||||
# Mirror at https://git.froggi.es/Riesi/frog_emojis
|
||||
|
||||
### -------------------------------------------------------------------------------------------------------------------
|
||||
Most of theses frogs are based on the SVGs of the twitter emoji set (https://twemoji.twitter.com). Others are unique designs with other inspirations in mind.
|
||||
|
||||
Have fun using them! 🐸
|
||||
|
|
35
gen_png.py
|
@ -1,5 +1,22 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
###########################################################################
|
||||
# Copyright (C) 2022 Stefan Riesenberger
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
###########################################################################
|
||||
|
||||
import glob
|
||||
import ntpath
|
||||
import subprocess
|
||||
|
@ -24,8 +41,15 @@ def raster_graphics(files):
|
|||
print('\n------------------------------\n'+ str(frogs) + ' remaining...\nRastering ' + str(name)+'\n')
|
||||
frogs = frogs - 1
|
||||
for s in sizes:
|
||||
subprocess.run(["inkscape", f, "-C", "-w", str(s), "--export-filename=./png/fixed_width/"+str(s)+"/"+name+".png"],timeout=30)
|
||||
subprocess.run(["inkscape", f, "-C", "-h", str(s), "--export-filename=./png/fixed_height/"+str(s)+"/"+name+".png"],timeout=30)
|
||||
# make sure the subdirectories exist
|
||||
width_path = "./png/fixed_width/"+str(s)+"/"+str(os.path.dirname(f.removeprefix('svg/').removesuffix('.svg')))
|
||||
height_path = "./png/fixed_height/"+str(s)+"/"+str(os.path.dirname(f.removeprefix('svg/').removesuffix('.svg')))
|
||||
if not( os.path.exists(width_path) and os.path.exists(height_path) ):
|
||||
os.makedirs(width_path ,exist_ok=True)
|
||||
os.makedirs(height_path ,exist_ok=True)
|
||||
# invoke Inkscape to raster the given vector graphics
|
||||
subprocess.run(["inkscape", f, "-C", "-w", str(s), "--export-filename="+str(width_path)+"/"+name+".png"],timeout=30)
|
||||
subprocess.run(["inkscape", f, "-C", "-h", str(s), "--export-filename="+str(height_path)+"/"+name+".png"],timeout=30)
|
||||
|
||||
# git add given files
|
||||
def git_add_raster(files):
|
||||
|
@ -92,10 +116,11 @@ if len(sys.argv) == 1:
|
|||
create_tag()
|
||||
else:
|
||||
if sys.argv[1] == 'all':
|
||||
files = [f for f in glob.glob("./svg**/*.svg", recursive=True)]
|
||||
files = [f for f in glob.glob("svg**/*.svg", recursive=True)]
|
||||
else:
|
||||
for f in sys.argv:
|
||||
if os.path.exists("./svg/"+f+".svg"):
|
||||
files.append("./svg/"+f+".svg")
|
||||
f = f.removeprefix('svg/').removesuffix('.svg')
|
||||
if os.path.exists("svg/"+f+".svg"):
|
||||
files.append("svg/"+f+".svg")
|
||||
raster_graphics(files)
|
||||
|
||||
|
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 774 B |
After Width: | Height: | Size: 669 B |
After Width: | Height: | Size: 855 B |
Before Width: | Height: | Size: 790 B |
Before Width: | Height: | Size: 685 B |
Before Width: | Height: | Size: 879 B |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 318 KiB After Width: | Height: | Size: 318 KiB |
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 269 KiB |
After Width: | Height: | Size: 443 KiB |
Before Width: | Height: | Size: 454 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 7.8 KiB |
After Width: | Height: | Size: 774 B |
Before Width: | Height: | Size: 863 B After Width: | Height: | Size: 847 B |
After Width: | Height: | Size: 696 B |
Before Width: | Height: | Size: 790 B |
Before Width: | Height: | Size: 699 B |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 318 KiB After Width: | Height: | Size: 318 KiB |
Before Width: | Height: | Size: 354 KiB After Width: | Height: | Size: 354 KiB |
After Width: | Height: | Size: 358 KiB |
Before Width: | Height: | Size: 368 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |